Implements the conventions merged in #4 (closes the loop on issue #3). This is the StateStore retrofit named in that PR's plan; the gate.* events land with the step-2 control-loop work.
OpLog — JSON-lines emitter with the fixed A9 envelope (ts, agent, event, task_id, cause). task_id is a plain attribute the orchestrator sets at unit-of-work start; null until then.
Emission owned by the store: transition (with from/to/project), intent.begin/intent.commit/intent.abort (with intent_id/kind), and schema.migrate (with versions) each emit immediately after their durable write commits. A failed resolution emits nothing — a line exists iff the change hit disk. Callers pass the cause.
reconcile_on_boot emits boot.reconcile with the action and per-intent verdicts, and resolves intents with reconciliation-verdict causes.
Default sink is stderr (journald captures it under systemd); tests inject a StringIO.
7 new unit tests covering envelope shape, from/to threading, task_id correlation, migration events, boot summaries, and the emit-iff-committed rule. 29 unit + 3 integration green locally.
Implements the conventions merged in #4 (closes the loop on issue #3). This is the StateStore retrofit named in that PR's plan; the `gate.*` events land with the step-2 control-loop work.
- **`OpLog`** — JSON-lines emitter with the fixed A9 envelope (`ts`, `agent`, `event`, `task_id`, `cause`). `task_id` is a plain attribute the orchestrator sets at unit-of-work start; `null` until then.
- **Emission owned by the store**: `transition` (with `from`/`to`/`project`), `intent.begin`/`intent.commit`/`intent.abort` (with `intent_id`/`kind`), and `schema.migrate` (with versions) each emit immediately after their durable write commits. A failed resolution emits nothing — a line exists iff the change hit disk. Callers pass the `cause`.
- **`reconcile_on_boot`** emits `boot.reconcile` with the action and per-intent verdicts, and resolves intents with reconciliation-verdict causes.
- Default sink is stderr (journald captures it under systemd); tests inject a StringIO.
7 new unit tests covering envelope shape, from/to threading, task_id correlation, migration events, boot summaries, and the emit-iff-committed rule. 29 unit + 3 integration green locally.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Retrofit for the conventions merged in #4 (issue #3):
- OpLog: JSON-lines emitter with the fixed envelope (ts, agent,
event, task_id, cause); task_id set by the orchestrator at
unit-of-work start
- StateStore owns emission: transition, intent begin/commit/abort,
and schema migrations each emit their event right after the
durable write commits; callers pass the cause
- reconcile_on_boot emits boot.reconcile with action and verdicts,
and resolves intents with reconciliation-verdict causes
- Failed resolutions emit nothing (a line exists iff the write
committed)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Freezes the clock and asserts the exact bytes emitted per event, so
the on-disk log format is reviewable in the test file itself.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements the conventions merged in #4 (closes the loop on issue #3). This is the StateStore retrofit named in that PR's plan; the
gate.*events land with the step-2 control-loop work.OpLog— JSON-lines emitter with the fixed A9 envelope (ts,agent,event,task_id,cause).task_idis a plain attribute the orchestrator sets at unit-of-work start;nulluntil then.transition(withfrom/to/project),intent.begin/intent.commit/intent.abort(withintent_id/kind), andschema.migrate(with versions) each emit immediately after their durable write commits. A failed resolution emits nothing — a line exists iff the change hit disk. Callers pass thecause.reconcile_on_bootemitsboot.reconcilewith the action and per-intent verdicts, and resolves intents with reconciliation-verdict causes.7 new unit tests covering envelope shape, from/to threading, task_id correlation, migration events, boot summaries, and the emit-iff-committed rule. 29 unit + 3 integration green locally.
🤖 Generated with Claude Code