Skip to content

Fix pipeline-gate commit deadlock with mark/seal lifecycle - #2

Merged
trollbot2012 merged 1 commit into
mainfrom
fix/pipeline-gate-commit-deadlock
Jul 8, 2026
Merged

trollbot2012 merged 1 commit into
mainfrom
fix/pipeline-gate-commit-deadlock

Conversation

@trollbot2012

Copy link
Copy Markdown
Owner

This PR fixes the pipeline-gate commit deadlock where the pre-commit gate could complete/seal a run before the commit landed, deleting ACTIVE and causing REQUIRE_RUN policy to block the same proven commit.

Changes

  • Split the lifecycle into mark-pass and seal.
  • Pre-commit now validates and records gate-pass.json while keeping ACTIVE.
  • Post-commit now seals the run only after HEAD advances.
  • Added bob seal --if-passed.
  • Added bob hook-install to install pre-commit, pre-merge-commit, and post-commit hooks.
  • Preserved AGENT_ULTRA_REQUIRE_RUN=1 behavior without grace windows or weakened checks.
  • Added real-git regression coverage for the original deadlock.

Verification

  • 171/171 tests pass.
  • bob lifecycle regression passes.
  • doctor: 14 pass / 0 fail.
  • demo: PASSED.
  • leak gate: PASS.

Upgrade note

Anyone using older hooks with bob gate --complete-on-pass should run:

agent-ultra bob hook-install

🤖 Generated with Claude Code

…mark/seal lifecycle

Public port of the bob-the-builder doctrine: SPEC->RED->GREEN->REFACTOR->
CODE-QUALITY->SECURITY-FANOUT->WORKFLOW->ULTRA->QUIZ->COMMIT. Every gated
step leaves a hash-chained, HMAC-signed receipt written from real execution
(system pytest runner, ultracode run receipts pinned by file-bytes sha +
workflow name, panel execution receipt bound by task_id/artifact hash). The
gate re-runs pytest live, re-hashes covered files, and fails closed on
anything it cannot verify.

Commit lifecycle (the deadlock fix, mirroring the private reference's
mark/seal split): pre-commit `bob gate --mark-pass` validates and records
gate-pass.json but keeps ACTIVE; post-commit `bob seal` releases ACTIVE only
with a recorded pass, stamping the landed commit hash. Sealing in pre-commit
released the run before the commit landed, so a require-run policy blocked
the very commit that passed. `bob hook-install` writes pre-commit,
pre-merge-commit, and post-commit hooks; AGENT_ULTRA_REQUIRE_RUN=1 makes the
pipeline mandatory. Regression test drives the cycle through real git:
proven commit lands, post-commit seals, unproven follow-up commit blocks.

CLI: agent-ultra bob run|gate|seal|hook-install|status (alias: build).
Mock mode runs keyless end to end; doctor + demo prove the pass and three
blocked-fraud scenarios; 31 offline bob tests (171 total); leak gate clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@trollbot2012
trollbot2012 merged commit 263361a into main Jul 8, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants