singularity-forge/packages
Mikael Hugo cb2ab66d4f feat(sf): UOK production hardening — diff capture, exit symmetry, commit-gate
Three production gaps Codex's adversarial review flagged are now closed:

1. Real legacy-vs-UOK parity diff (per turn, per plane):
   - parity-diff-capture.ts captures plan / graph / model-policy /
     audit-envelope / gitops decisions for both paths and emits
     ParityDiffEvent records to .sf/runtime/uok-parity.jsonl.
   - parity-report.ts aggregates divergencesByPlane, populates
     criticalMismatches with real divergence summaries, and tracks
     enterEvents / exitEvents / missingExitEvents for symmetry.

2. Exit-event symmetry:
   - sessionId / turnId now flow through enter+exit parity events.
   - writeParityHeartbeat lets kernel/loop-adapter emit best-effort
     diagnostics on plane failure paths so missing-exit gaps shrink.

3. Commit-gating on divergence or missing-exit:
   - resolveParitySafeGitAction (in uok/gitops.ts) reads the parity
     report and downgrades turn_action to status-only when divergence
     count > 0 or missing-exit count > 0 — UOK can no longer commit
     on top of unverified state.
   - auto-post-unit.ts now resolves a configuredTurnAction from UOK
     flags then asks the parity gate for the safe action; the gate's
     decision is what flows to the actual git op.
   - new test: tests/uok-gitops-commit-gate.test.ts.
   - existing gitops-wiring assertion updated for the renamed
     configuredTurnAction (semantic preserved).

Tests: 53/53 UOK pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 12:57:48 +02:00
..
daemon fix(sf): stabilize auto notices and package checks 2026-05-02 12:39:27 +02:00
mcp-server chore: snapshot in-flight work (mcp graph refactor, native edit module, misc) 2026-05-02 08:31:44 +02:00
native chore: purge bun from internal toolchain 2026-05-02 08:38:20 +02:00
pi-agent-core chore: snapshot in-flight work (mcp graph refactor, native edit module, misc) 2026-05-02 08:31:44 +02:00
pi-ai fix(sf): stabilize auto notices and package checks 2026-05-02 12:39:27 +02:00
pi-coding-agent feat(sf): UOK production hardening — diff capture, exit symmetry, commit-gate 2026-05-02 12:57:48 +02:00
pi-tui sf snapshot: pre-dispatch, uncommitted changes after 32m inactivity 2026-05-02 11:25:51 +02:00
rpc-client chore: CI workflows, package.json updates, test fixes, docs cleanup 2026-05-02 06:30:45 +02:00