Symptom
cancel-invitation writes status: 'canceled' onto the sys_invitation row. But the spec enum this item's source names as the authority does not include canceled:
- Spec (authority named by the item):
InvitationStatus = z.enum(['pending', 'accepted', 'rejected', 'expired']) — packages/spec/src/identity/organization.zod.ts:105. Four values, no canceled.
- Platform object (what actually gets written): a divergent 5-value select including
canceled — packages/platform-objects/src/identity/sys-invitation.object.ts:214: status: Field.select(['pending', 'accepted', 'rejected', 'expired', 'canceled'], …).
Consequence: anything validating an invitation against InvitationSchema (which composes InvitationStatus) rejects a canceled row. Both refs confirmed present on origin/main.
Root cause
A spec-vs-platform-object contract divergence: the two definitions of the invitation status vocabulary disagree by one value. The platform object treats canceled as a legitimate terminal state (it is even used in a listView filter, sys-invitation.object.ts:158 filters status in ['expired','rejected','canceled']), while the spec enum omits it.
Decision needed (routing / authority)
This needs a maintainer ruling on which side is authoritative, then reconcile the other:
- If the spec enum is the contract of record → add
canceled to InvitationStatus (organization.zod.ts:105). This is the likely direction, hence domain:spec.
- If the spec deliberately excludes
canceled → the platform object and the cancel-invitation writer must stop producing it (use rejected/expired semantics, or drop the value).
Filed under domain:spec (the enum) with a note to reconcile the platform object; flag the decision rather than assume the fix side.
Reproduction
- Create an invitation (
status:'pending').
cancel-invitation on it.
- Read the row →
status:'canceled'.
- Validate that row against
InvitationSchema / InvitationStatus → rejected, because canceled is not in the spec enum.
Source
Extracted from the QA run #7663 (framework 92f26f7, console 09987b680).
Symptom
cancel-invitationwritesstatus: 'canceled'onto thesys_invitationrow. But the spec enum this item'ssourcenames as the authority does not includecanceled:InvitationStatus = z.enum(['pending', 'accepted', 'rejected', 'expired'])—packages/spec/src/identity/organization.zod.ts:105. Four values, nocanceled.canceled—packages/platform-objects/src/identity/sys-invitation.object.ts:214:status: Field.select(['pending', 'accepted', 'rejected', 'expired', 'canceled'], …).Consequence: anything validating an invitation against
InvitationSchema(which composesInvitationStatus) rejects a canceled row. Both refs confirmed present onorigin/main.Root cause
A spec-vs-platform-object contract divergence: the two definitions of the invitation status vocabulary disagree by one value. The platform object treats
canceledas a legitimate terminal state (it is even used in a listView filter,sys-invitation.object.ts:158filtersstatus in ['expired','rejected','canceled']), while the spec enum omits it.Decision needed (routing / authority)
This needs a maintainer ruling on which side is authoritative, then reconcile the other:
canceledtoInvitationStatus(organization.zod.ts:105). This is the likely direction, hencedomain:spec.canceled→ the platform object and thecancel-invitationwriter must stop producing it (userejected/expiredsemantics, or drop the value).Filed under
domain:spec(the enum) with a note to reconcile the platform object; flag the decision rather than assume the fix side.Reproduction
status:'pending').cancel-invitationon it.status:'canceled'.InvitationSchema/InvitationStatus→ rejected, becausecanceledis not in the spec enum.Source
Extracted from the QA run #7663 (framework 92f26f7, console 09987b680).