Build Log · September 5, 2026

Make the Owner Loop Worthy of the Actor — Built, Reviewed, Then Actually Closed

Built the canonical state model, execution lineage, clarification-continuation loop, and capability manifest Council designed — then, per Zeb's own precise review ("a successful architecture with several unclosed invariants"), fixed the 6 real gaps between what the first pass claimed and what it actually shipped. At session close, Zeb reported a real coordinator request stuck for 25+ minutes — traced to a genuine production outage this session itself caused: the new lineage tables were never granted to the least-privilege Neon roles the real dispatcher/resolver actually use, silently failing every real dispatch since the schema shipped. Fixed live, verified end to end with a real Actor run.

  • Owner Loop
  • MedinaCHF
  • Council
  • Canonical State Model
  • Execution Lineage
  • Adversarial Review
commits, each independently verified against real dev/prod data before the next began
18

commits, each independently verified against real dev/prod data before the next began

specific gaps Zeb's review found between the first pass's claims and its real implementation, all closed
6

specific gaps Zeb's review found between the first pass's claims and its real implementation, all closed

passing tests across 11 test files (pure-function + real-DB), zero skipped in this final count
51

passing tests across 11 test files (pure-function + real-DB), zero skipped in this final count

real production admin_intents rows, 0 divergent after every fix, confirmed via the divergence auditor itself
27

real production admin_intents rows, 0 divergent after every fix, confirmed via the divergence auditor itself

real production outage this session itself caused (missing role grants on new tables) — found by Zeb, root-caused, fixed, and verified live before close
1

real production outage this session itself caused (missing role grants on new tables) — found by Zeb, root-caused, fixed, and verified live before close

Timeline

  1. Start

    Council review (architect + QE, full depth) of the design before building

    Both personas landed on conditional 'ship it' with concrete corrections: one canonical transition function instead of scattered writes, a real execution-lineage table with an explicit sub-lifecycle, execution-identity proof not just FK existence, idempotent replies, capabilities in apps.json not a new file, fail-closed on missing manifests

  2. +45m

    Foundation: schema migration + transitionIntent()

    3 new canonical columns + 2 new tables, migrated to dev and prod, all 26 existing production rows backfilled — surfaced and fixed one real pre-existing data-integrity gap (a stale human_notified dispatch_status value never migrated off after an earlier Charge removed it)

  3. +90m

    Wired resolve/finalize/dispatch/capability-manifest/reply-endpoint, all live-verified

    Every layer tested against real disposable dev-Neon rows before moving to the next — CLARIFY round trip, awaiting-promotion transition, claim/dispatch/fail lineage, coordinator reply idempotency

  4. +150m

    Deployed to production, reported the build complete

    MedinaCHF live with the new reply UI, 0 divergence at the time — but the completion report itself understated several real gaps, as the next review found

  5. +160m

    Zeb's review: 'about 80% of the way,' itemized, not a rejection

    Named exactly 6 places where implementation fell short of the Council-corrected design's own stated commitments — named args never actually landed, transitionIntent() wasn't really the only seam (a duplicated definition in the app, a silent bypass in record-promotion-outcome.mjs), Scenario E's atomicity gap treated as evidence instead of a defect, capabilities described but not mechanically enforced, blocked-age visibility never built

  6. +170m

    Item 1: named args + real execution-identity binding

    resolve-owner-intent.mjs converted to parseArgs, positional form now rejected outright (verified live); --execution-id required and verified against a real admin_intent_executions row bound to both the correct intent and the correct GitHub run id; idempotent repeat submission verified live

  7. +210m

    Item 4: genuine claim+lineage atomicity, proven not asserted

    Converted the two-statement claim+INSERT into one CTE-chained statement; proved atomicity by forcing a real unique-constraint violation in the INSERT half and confirming the claim UPDATE half rolled back too

  8. +240m

    Item 5: mechanical parity test for the duplicated owner_replied transition

    Confirmed the real constraint first (MedinaCHF isn't a workspace member; importing its own Server Action file outside Next.js silently produced no output under tsx) before choosing a fix — extracted the duplicate into a named constant, added a test that parses it from source and asserts it matches transitionIntent()'s real live output, proved the test actually catches drift by deliberately breaking it and watching it fail

  9. +265m

    Item 6: found and fixed a real silent bypass in record-promotion-outcome.mjs

    Confirmed on inspection this script wrote dispatch_status='promotion_blocked' with zero canonical-column write at all — checked production first (0 rows affected, the bug was latent not live), then wired it through transitionIntent()'s block_promotion event, verified live for both the primary case and the deliberately-skipped legacy fallback

  10. +290m

    Item 7: mechanical capability enforcement, not just Charge-prompt description

    resolve-owner-intent.mjs now refuses to write anything if capabilities.db_dml isn't explicitly true, checked at the actual write point — verified live by temporarily setting medinachf's real db_dml to false, confirming refusal, then restoring the file byte-identical

  11. +320m

    Item 8: real blocked_at / blocked-age / last-execution visibility

    New column, computed centrally in transitionIntent() (not per-event) so it can't drift the way 15 separate edits could; wired into every write site; built a real read-only inspection script and ran it against all 6 real currently-blocked production rows, honestly reporting 'unknown' for pre-migration rows rather than guessing a backfilled timestamp

  12. +340m

    Redeployed with all 6 fixes, re-ran the divergence audit against production

    0 divergent across all 27 real rows — confirmed after, not just before, the fixes

What shipped

  • forgekit-os/scripts/lib/intent-transitions.mjs — the canonical mutation seam, now also computing blocked_at centrally

  • 3 new admin_intents columns (owner_outcome, execution_state, block_reason) + blocked_at, 2 new tables (admin_intent_executions, admin_intent_replies), all migrated to dev and prod and backfilled

  • resolve-owner-intent.mjs converted from 6 positional CLI args to node:util parseArgs, with real execution-identity verification (--execution-id bound to both the correct intent and the correct GITHUB_RUN_ID) and idempotent repeat-submission handling

  • Atomic, CTE-chained claim+execution-lineage creation in dispatch-owner-loop-requests.mjs, proven via a forced real constraint-violation rollback test, not just code inspection

  • Coordinator reply endpoint (replyToAdminIntentClarification) in admin-intents.ts, with a mechanically-checked parity test against the canonical transitionIntent() module

  • record-promotion-outcome.mjs's real silent bypass of the canonical mutation seam, found and fixed (confirmed latent, zero production rows affected before the fix)

  • Mechanical (not merely descriptive) capabilities.db_dml enforcement in resolve-owner-intent.mjs, fail-closed on missing/malformed manifests

  • forgekit-os/scripts/list-blocked-owner-loop-requests.mjs — real, read-only blocked-age/last-execution visibility, run against all 6 real currently-blocked production rows

  • forgekit-os/scripts/lib/redact-output.mjs — centralized secrets redaction, tested against every shape a pure pattern-match audit misses (embedded URL credentials, arbitrary env-var names, JSON secret fields, bearer headers, base64 blobs)

  • forgekit-os/scripts/audit-intent-projection-divergence.mjs — the mechanical proof the parallel-write migration strategy stays sound, run live against all 27 real production rows with 0 divergence after every fix

  • 11 new/updated test files, 51 total passing assertions (pure-function + real disposable-row live-DB tests)

“The important distinction is that I don't see a failed architecture here. I see a successful architecture with several unclosed invariants. Smith built the bridge. I just wouldn't remove the scaffolding sign yet.”
— Zeb, reviewing the first pass of "Make the Owner Loop Worthy of the Actor" — the framing that shaped this session's finishing Charge