Repository navigation
Conversation
Bind a full source commit to the deterministic bundle checksum and retained upstream attribution via release.json, and add scripts/deliver.sh as the stable approval-gated delivery entrypoint. Delivery resolves the three harness roots from a runtime-supplied install-targets-v1 document, verifies the release checksum from an isolated exact-SHA materialization, installs only the linked skills while recording the before-state, and fails closed on a missing target. Rollback removes only the links delivery created and confirms the prior state is restored.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit abe6506. Configure here.
| state_dir.mkdir(parents=True, exist_ok=True) | ||
| state_path.write_text( | ||
| json.dumps(journal, indent=2, sort_keys=True) + "\n", encoding="utf-8" | ||
| ) |
There was a problem hiding this comment.
Journal written after live installs
High Severity
deliver_selection installs into every pinned root before it creates state_dir or writes delivery-state.json. A crash, interrupt, or write error after those installs leaves the skills in place with no journal, so --rollback cannot run and a retry collides with leftover receipts.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit abe6506. Configure here.
| if current != list(before[harness]): | ||
| raise ValueError(f"rollback did not restore the prior state for {harness!r}") | ||
|
|
||
| state_path.unlink() |
There was a problem hiding this comment.
Rollback cannot resume after failure
High Severity
rollback_selection fully uninstalls each harness before reconciling the before-state, and the install exception path uninstalls completed roots the same way. After a later failure, earlier receipts are already gone while the journal remains, so a retry cannot resume and some roots can stay installed.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit abe6506. Configure here.
| state_dir.mkdir(parents=True, exist_ok=True) | ||
| state_path.write_text( | ||
| json.dumps(journal, indent=2, sort_keys=True) + "\n", encoding="utf-8" | ||
| ) |
There was a problem hiding this comment.
Journal persistence strands installations
If persisting delivery-state.json fails after all harness installs complete, the error escapes without removing the installed links. A subsequent rollback requires that journal and rejects its absence before it can identify or reconcile the target roots. This leaves the delivered links installed in every harness while the command reports failure. Either write a durable rollback record before mutating roots, or clean up the completed installs if journal persistence fails.
Artifacts
Executable reproduction for normal and failed journal delivery
- Builds temporary targets, runs a normal delivery/rollback control, then forces only the delivery journal write to fail before attempting rollback; it demonstrates the failed journal strands links.
Control output showing normal journal-backed rollback succeeds
- Runs the executable reproduction in normal mode; it shows the journal is created and rollback removes the installed links from all three harnesses.
Failure output showing missing journal blocks rollback
- Runs the executable reproduction with a forced journal write error; it shows rollback rejects the missing journal and all installed links remain.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: dev_workflow/deliver.py
Line: 112-115
Comment:
**Journal persistence strands installations**
If persisting `delivery-state.json` fails after all harness installs complete, the error escapes without removing the installed links. A subsequent rollback requires that journal and rejects its absence before it can identify or reconcile the target roots. This leaves the delivered links installed in every harness while the command reports failure. Either write a durable rollback record before mutating roots, or clean up the completed installs if journal persistence fails.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| for harness in HARNESS_REGISTRY: | ||
| removed[harness] = list(uninstall_selection(resolved[harness], harness)) |
There was a problem hiding this comment.
Rollback retries cannot progress after a partial failure
Rollback uninstalls harnesses in order but does not record completed removals. If a later uninstall fails, an earlier harness has already had its receipt removed. Retrying starts again at that harness, raises because its receipt is missing, and never reaches the harnesses still installed. Persist rollback progress or make completed uninstalls safely idempotent so a retry can reconcile every root.
Artifacts
Executable rollback retry reproduction source
- This self-contained Python script delivers to all harness roots, forces a later Claude uninstall validation failure, retries rollback, and asserts the resulting partial state.
Rollback retry reproduction output
- This captured command output shows the first rollback removes Codex before failing at Claude, while the retry fails on Codex's missing receipt and leaves OpenCode installed.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: dev_workflow/deliver.py
Line: 137-138
Comment:
**Rollback retries cannot progress after a partial failure**
Rollback uninstalls harnesses in order but does not record completed removals. If a later uninstall fails, an earlier harness has already had its receipt removed. Retrying starts again at that harness, raises because its receipt is missing, and never reaches the harnesses still installed. Persist rollback progress or make completed uninstalls safely idempotent so a retry can reconcile every root.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| python3 "$work/scripts/build_multiharness_bundle.py" \ | ||
| --output "$bundle" --commit "$sha" --release "$release" >/dev/null |
There was a problem hiding this comment.
Historical source revisions cannot satisfy the builder contract
DEV_WORKFLOW_SOURCE_SHA materializes and executes the selected revision's bundle builder, but the entrypoint always passes the new --commit and --release arguments. A valid materializable revision from before this release contract rejects those arguments and exits before delivery. Restrict the variable to revisions supporting this builder interface with a clear compatibility error, or use a stable builder that can produce and verify the selected revision's bundle format.
Artifacts
Executable Git-based reproduction for current and historical source SHA delivery
- The executed shell repro creates isolated targets, invokes the delivery entrypoint for HEAD and a materializable parent, and asserts the historical failure happens before lines 77-82; the takeaway is that the proposed verification-stage mismatch is not reached.
Output of the focused current-versus-historical source SHA reproduction
- This captured command output shows the current source delivering successfully and the historical source rejecting release arguments with exit 2; the takeaway is that the actual failure is in the historical builder invocation.
Historical source SHA delivery failure
- This captured historical delivery run exits 2 because its materialized bundle builder does not recognize `--commit` and `--release`; the takeaway is that no bundle is built and lines 77-82 do not execute.
Current source SHA delivery control
- This captured control run exits 0 after delivering grilling and grill-me to codex, claude, and opencode; the takeaway is that the current release-aware source contract works.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/deliver.sh
Line: 67-68
Comment:
**Historical source revisions cannot satisfy the builder contract**
`DEV_WORKFLOW_SOURCE_SHA` materializes and executes the selected revision's bundle builder, but the entrypoint always passes the new `--commit` and `--release` arguments. A valid materializable revision from before this release contract rejects those arguments and exits before delivery. Restrict the variable to revisions supporting this builder interface with a clear compatibility error, or use a stable builder that can produce and verify the selected revision's bundle format.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Hand-over note, 2026-11-17. The Maestro daemon is switched off for good; session dev-workflow-1, which opened this PR on 2026-09-02, will not continue it and nothing automated will act here again. State: head abe6506, mergeable, 5 unresolved review threads (2 High from cursor, 3 P1 from greptile) on the deliver/rollback journal logic in dev_workflow/deliver.py and scripts/deliver.sh. Issue #5 stays open. The branch also exists on Forgejo; no local worktree remains. Owner decision needed: fix the five findings and merge, or close. |
|
Parked 2026-11-21: already up to date with main, checks green; resumes when the project is reactivated. |


Refs #5
What
release.jsonbinding (build_multiharness_bundle.py --commit --release).scripts/deliver.sh: the stable, approval-gated delivery entrypoint. Targets and credentials are resolved only from the approved runtime environment; no private endpoint, host path, or secret is embedded.dev-workflow/install-targets-v1document, recording the before-state; roll back by removing only the links this delivery created and confirming the prior state returns.Verification
./scripts/verify-outcome.sh(84 tests, gate green). New coverage:tests/test_multiharness_bundle.py).scripts/deliver.shentrypoint driven end-to-end against a self-contained fixture repo (tests/test_deliver.py).Note
Medium Risk
Delivery mutates live harness skill directories under runtime-supplied paths; safeguards (approval gate, release verification, fail-closed targets, atomic rollback) reduce but do not eliminate misconfiguration or partial-environment risk.
Overview
Adds release and delivery for the deterministic multi-harness bundle: a source commit can be bound to the portable manifest checksum and upstream attribution via
release.json, and an approval-gated path can install linked skills into all three harness roots with journaling and rollback.Release binding:
build_multiharness_bundle.pyaccepts paired--commitand--releaseto emit or verify a v0.1.0 descriptor (full SHA, bundle SHA256 over the canonical manifest, upstream metadata).verify-outcome.shnow exercises write/verify and cross-checks manifests from an isolatedgit archiveof the same SHA.Delivery: New
dev_workflow/deliver.pyvalidatesdev-workflow/install-targets-v1, requires every pinned root to exist before any write, installs via existinginstall_selectionacross codex/claude/opencode with all-or-nothing rollback on failure, and recordsdelivery-state.json(before snapshot, delivered skills, optional release).scripts/deliver.shgates onDEV_WORKFLOW_DELIVER_APPROVED=1, materializes the exact SHA twice to build and independently verify the bundle, then callsdeliver_selection.py;--rollbackuninstalls only this delivery’s links and asserts the prior skill listing is restored.README documents the release and env-driven delivery contract. Tests cover release binding edge cases and delivery fail-closed, partial-failure rollback, and end-to-end
deliver.shagainst a fixture repo.Reviewed by Cursor Bugbot for commit abe6506. Bugbot is set up for automated code reviews on this repo. Configure here.
Greptile Summary
This change adds release-bound, approval-gated delivery and rollback for Codex, Claude, and OpenCode. Focused delivery exercises found three recoverability failures: a journal write error leaves installed links without a usable rollback record, a rollback that fails partway cannot be retried to completion, and a valid historical source revision cannot be delivered because its bundle builder does not accept the new release arguments.
The originally anticipated current-checkout verification mismatch for historical revisions was disproved: the historical delivery run exits earlier, when the materialized historical builder rejects
--commitand--release.Confidence Score: 2/5
Do not merge until failed delivery and rollback can reliably restore all harness roots, and historical revision handling has a defined compatible behavior.
Three independent delivery reliability failures were reproduced with isolated filesystem and Git-backed executions, including successful control runs where applicable.
Files Needing Attention:
dev_workflow/deliver.pyneeds atomic or recoverable journal handling and resumable rollback behavior;scripts/deliver.shneeds an explicit compatibility boundary or compatible builder strategy forDEV_WORKFLOW_SOURCE_SHA.What T-Rex did
Comments Outside Diff (3)
General comment
install_selectioncompletes for every harness, anOSErrorfrom journal directory creation orstate_path.write_textpropagates without uninstalling the delivered links. Since no regulardelivery-state.jsonexists,rollback_selectionraises before it knows the targets or before-state. The focused reproduction observed retainedgrill-meandgrillinglinks in codex, claude, and opencode after the failed rollback.General comment
codex,claude,opencode, a modifiedclaudeowned file causes the first rollback to removecodexthen fail atclaude. The delivery journal remains, but the next rollback starts atcodexagain and raisesFileNotFoundErrorbecause its receipt was removed.opencoderemains installed and is never attempted.rollback_selectionunconditionally callsuninstall_selectionfor every harness in registry order at lines 137-138. It neither records completed root removals in the delivery state nor treats a previously completed uninstall as an idempotent rollback step.General comment
39ebcb803d8faac6a5df7340f7a65b9dd07e7ccecontainsscripts/build_multiharness_bundle.py, but its CLI accepts only--outputor--verify. The current entrypoint archives that revision and invokes its builder with--commitand--release, producing exit 2. Exact output:build_multiharness_bundle.py: error: unrecognized arguments: --commit 39ebcb803d8faac6a5df7340f7a65b9dd07e7cce --release /tmp/.../release.json. Thus approved delivery fails for this valid historical source SHA.scripts/deliver.shmaterializes and executes the selected revision's builder at lines 67-68, while unconditionally requiring the release-aware CLI introduced only in the PR commit. The proposed lines 77-82 current-checkout verification mismatch is not reached.DEV_WORKFLOW_SOURCE_SHAto commits that contain the release-aware builder contract and fail with an explicit compatibility message, or build/verify release metadata with a stable current versioned tool that can support historical bundle formats. Document the supported source-SHA compatibility boundary.Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat: release and approval-gated multi-h..." | Re-trigger Greptile