Audit Log Typings - #611
lillithrosepup wants to merge 12 commits into
Conversation
aa144ef to
4bebbe9
Compare
commit: |
|
TODO:
|
01c12df to
1c1301c
Compare
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It is a DRAFT adding 56 reverse-engineered schemas with new discriminator/allOf patterns and no accompanying test workflow or completed test run, so it needs human verification against captured traffic.
Review effort: Balanced
Findings: 1
What changed in this PR
This PR replaces the previously free-form GroupAuditLogEntry.data (type: object with an inline example) with a fully-typed, discriminated model of VRChat's group audit log. GroupAuditLogEntry is now allOf: [GroupAuditLogEntryBase, GroupAuditLogEntryEvent], where GroupAuditLogEntryEvent is a oneOf keyed by a discriminator on eventType (with a 3.2.1 defaultMapping catch-all to GroupAuditLogEntryUnknown). Each of the 32 known eventTypes gets its own entry schema plus a dedicated data payload schema, with shared primitives (StringChange, BooleanChange, StringListChange, UserIdChange, DataEmpty, DataUnknown) and allOf reuse between create/delete payload pairs. This is a documentation-only change that strengthens generated client typings for the group audit log endpoints. The PR is explicitly marked DRAFT, with the pnpm test -w session -w <workflow> evidence checkbox left unchecked.
Changes:
- Split
GroupAuditLogEntryinto a shared base + a discriminatedoneOfof 32 event types plus anUnknownfallback. - Added per-event
datapayload schemas, reusing shared change-wrapper and base payload schemas via$ref/allOf. - Removed the old inline
data/targetIddefinitions and example fromGroupAuditLogEntry.yaml.
| File | Description |
|---|---|
GroupAuditLogEntry.yaml |
Reworked to allOf of base + event discriminator; drops inline data/targetId/example. |
GroupAuditLogEntryBase.yaml |
New shared fields (actorId, created_at, eventType, groupId, id, etc.). |
GroupAuditLogEntryEvent.yaml |
discriminator + defaultMapping + oneOf over all 32 event schemas and Unknown. |
GroupAuditLogEntryUnknown.yaml |
Catch-all event using eventType with not: enum of the known types. |
GroupAuditLogEntryGroup*.yaml (32 files) |
One wrapper per eventType binding a const eventType, targetId, and a data $ref. |
GroupAuditLogEntryDataGroup*.yaml (data payloads) |
Per-event payload shapes; create/delete pairs share a base via allOf. |
GroupAuditLogEntryDataEmpty.yaml / DataUnknown.yaml |
Closed empty payload / open (additionalProperties: true) payload. |
GroupAuditLogEntry{String,Boolean,StringList,UserId}Change.yaml |
Reusable before/after change wrappers for update payloads. |
Observations from review: All $ref targets resolve, the discriminator mapping/oneOf/Unknown-not-enum sets are internally consistent, defaultMapping is valid in the 3.2.1 source and stripped by the downlevel plugin for 3.1/3.0 bundles, and the newly introduced allOf composition is handled correctly by close-schemas (unevaluatedProperties). The main substantive issue is inconsistent targetId typing (see inline comment). Per the repo's evidence conventions, the new schemas are not yet backed by any test/arazzo.yaml workflow, and the test checkbox is unchecked.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Head branch was pushed to by a user without write access
943f676 to
5b80ae4
Compare
5b80ae4 to
e450b3c
Compare
Pulled from an active group's logs, a test group's, and some inferred (iconId, nameplateId)
|
@ariesclark re-requesting review, ive double checked everything & implemented the |

Closes #No issue submitted, discussed in discordEvidence
pnpm lintpassespnpm test -w session -w <workflow>passes