ErrIllegalTransition enforced in the store and mapped over the wire #394

Closed
opened 2026-10-27 13:36:09 +00:00 by sam · 1 comment
Owner

Every status-changing store method checks the table and writes audit and event rows, including claim, ParkTask, Requeue, RetryTask, BeginRemediation and RecoverStale. See docs/prds/execution-tree-state-machine.md.

Notes

Enforcement only. The no-change outcome flip (StatusMerged -> StatusCompleted) and its full consumer fanout land in qdbo.1 (decided 2026-09-26, option A-full): the table must match live producers from the day it lands.

Close reason

ErrIllegalTransition added to storecontract and mapped over the wire on (FailedPrecondition, "illegal transition"); Transition, ParkTask, Requeue, RetryTask and BeginRemediation check the shared transition table inside their write transaction, staleness decided first. Claim/BeginRemediation/RecoverStale pairs are SQL-pinned and pinned to the table by test. Conformance battery proves the sentinel both directions over gRPC. One fixture-only exploit surfaced: the wire battery used RetryTask queued->queued, a self-write the table refuses; the battery now walks table-routed edges. Audit/event rows for claim and RecoverStale remain as described in the bead body, out of this item per the 2026-09-25 maintainer note (rejection + wire mapping only).


Imported from beads archie-core-qdbo.5 · GitHub #1215 · type task · priority P1 · created 2026-09-25 · closed 2026-09-26

Every status-changing store method checks the table and writes audit and event rows, including claim, ParkTask, Requeue, RetryTask, BeginRemediation and RecoverStale. See docs/prds/execution-tree-state-machine.md. ### Notes Enforcement only. The no-change outcome flip (StatusMerged -> StatusCompleted) and its full consumer fanout land in qdbo.1 (decided 2026-09-26, option A-full): the table must match live producers from the day it lands. ### Close reason ErrIllegalTransition added to storecontract and mapped over the wire on (FailedPrecondition, "illegal transition"); Transition, ParkTask, Requeue, RetryTask and BeginRemediation check the shared transition table inside their write transaction, staleness decided first. Claim/BeginRemediation/RecoverStale pairs are SQL-pinned and pinned to the table by test. Conformance battery proves the sentinel both directions over gRPC. One fixture-only exploit surfaced: the wire battery used RetryTask queued->queued, a self-write the table refuses; the battery now walks table-routed edges. Audit/event rows for claim and RecoverStale remain as described in the bead body, out of this item per the 2026-09-25 maintainer note (rejection + wire mapping only). --- _Imported from beads `archie-core-qdbo.5` · GitHub #1215 · type task · priority P1 · created 2026-09-25 · closed 2026-09-26_
sam added the hightask labels 2026-10-27 13:36:09 +00:00
sam self-assigned this 2026-10-27 13:36:09 +00:00
sam closed this issue 2026-10-27 13:36:09 +00:00
Author
Owner

sam wrote (originally 2026-09-25):

Note 2026-09-25: the no-change producer fix (StatusMerged -> StatusCompleted on steps.go:172/:178 and triage.go:73) and its full consumer fanout now land in qdbo.1 with the transition tables. That fanout includes a new 'completed' count through the storecontract WorkflowStat type, the State Store proto, the staterpc mapping, the per-workflow stats SQL and the dashboard pass-rate surfaces. Enforcement in this item therefore no longer waits on a separate producer change: qdbo.5 only needs the store-side rejection and the ErrIllegalTransition wire mapping.

_sam wrote (originally 2026-09-25):_ Note 2026-09-25: the no-change producer fix (StatusMerged -> StatusCompleted on steps.go:172/:178 and triage.go:73) and its full consumer fanout now land in qdbo.1 with the transition tables. That fanout includes a new 'completed' count through the storecontract WorkflowStat type, the State Store proto, the staterpc mapping, the per-workflow stats SQL and the dashboard pass-rate surfaces. Enforcement in this item therefore no longer waits on a separate producer change: qdbo.5 only needs the store-side rejection and the ErrIllegalTransition wire mapping.
sam added a new dependency 2026-10-27 13:42:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#394