v1.1 OQ-T4: runtime origin-tagging on events for single-writer assertion #81

Open
opened 2026-05-12 19:30:19 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-05-12 19:30:19 +00:00 (Migrated from github.com)

Summary

Add runtime origin tags to OrchestratorEvent and HUD-state emissions to prove single-writer invariants at runtime, not just via grep gates + behavioral tests. Currently the HUD-08 `HudStateCoordinator` single-writer guarantee is enforced by `scripts/check-single-writer-hudstate.sh` (compile-time) and unit tests (behavioral) — there's no runtime assertion catching a future regression in CI-released code.

Evidence

  • Migration plan §10: `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md:736` — "OQ-T4 (state-ownership runtime assertion) — origin tagging on events to prove single-writer at runtime; v1.0 ships grep + behavioral, v1.1 adds runtime origin tags."

Gap classification

"design-mapped but not built" — open question explicitly deferred to v1.1.

Recommended action

File against v1.1. Pattern: each event carries an `origin: Origin` field (typed enum); coordinator asserts origin matches the expected writer at emission time. Cheap; surfaces the bug class proactively.

Cross-references

  • Migration plan §10 v1.1
  • HUD-08 invariant (REQUIREMENTS.md)
## Summary Add runtime origin tags to OrchestratorEvent and HUD-state emissions to prove single-writer invariants at runtime, not just via grep gates + behavioral tests. Currently the HUD-08 \`HudStateCoordinator\` single-writer guarantee is enforced by \`scripts/check-single-writer-hudstate.sh\` (compile-time) and unit tests (behavioral) — there's no runtime assertion catching a future regression in CI-released code. ## Evidence - Migration plan §10: \`.planning/architecture/JARVIS-API-MIGRATION-PLAN.md:736\` — \"OQ-T4 (state-ownership runtime assertion) — origin tagging on events to prove single-writer at runtime; v1.0 ships grep + behavioral, v1.1 adds runtime origin tags.\" ## Gap classification \"design-mapped but not built\" — open question explicitly deferred to v1.1. ## Recommended action File against v1.1. Pattern: each event carries an \`origin: Origin\` field (typed enum); coordinator asserts origin matches the expected writer at emission time. Cheap; surfaces the bug class proactively. ## Cross-references - Migration plan §10 v1.1 - HUD-08 invariant (REQUIREMENTS.md)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#81