v1.44.1
Package Changelog
Patch Changes
- Fix a gate implementation's thrown exception escaping uncaught out of
runSettleGatestosettle.ts's outer catch, which printed to stderr and exited 1 with noSUMMARYwritten —security-auditwas previously the sole gate normalizing its own throws into arefuseoutcome. The gate invocation inrunSettleGatesis now wrapped centrally, so any of the other 8 gates throwing produces the same synthesized{outcome: 'refuse', reason}plus a'refused'provenance entry, flowing through the existing refusal path that persistsSUMMARY.json/SUMMARY.mdand leaves loop state untouched. Closesrec-20260712-007. - e38d86a: Add optimistic concurrency to
SimpleStateBackend.commit()to prevent lost updates when twocadencestate writers (CLI commands, hooks, or the MCP server) race on.cadence/state.jsonin the same checkout — the actual failure mode behind a recent incident where two concurrent Claude Code sessions in one primary checkout stomped each other's uncommitted work.CadenceStategains arevision: numberfield (additive,.default(0), back-compat with pre-existingstate.jsonfiles).commit()now compares the current on-disk revision to the caller's in-memorystate.revisionbefore writing: a match bumps it in place and writes as before; a mismatch refuses with a newStateConflictError(naming both revisions) instead of silently overwriting the other writer's change, unless the new{ force: true }option is passed (which overwrites unconditionally and warns loudly to stderr). A bootstrap write (no existingstate.json) skips the check entirely. The in-place revision bump means a caller issuing several sequentialcommit()calls on the same in-memory object — e.g. a hook handler with two independent write branches — stays in sync automatically without re-reading between calls. - 6fc52bd: Add a post-settle retro artifact and an interactive GitHub issue offer (rec-20260712-001). On every successful
cadence settle, a friction digest — gate bypasses, tasks whose terminal status wasn't a cleanDONE, and any code-review/security-audit/boundary-scan findings — is synthesized purely from the SUMMARY data already assembled and written as<draftId>-RETRO.json/.mdalongsideSUMMARY.json/.md(a clean settle writes a "No friction detected this settle." form).@manehorizons/cadence-typesgains an additiveRetroDigest/RetroDigestZschema and aretro: { enabled, offerGithubIssue }config block (both defaulttrue, same shape convention as the existingrecommendationsblock). When the digest is non-empty and the run is interactive (a real TTY, or theCADENCE_PROMPTER_SCRIPTtest seam), settle also offers to file a GitHub issue for it viagh— resolving and naming the actual target repo before asking (gh repo view), creating the issue non-interactively with an explicit--repo, then best-effort labeling itneeds-triagein a separate call so a repo without that label can't fail issue creation outright. The offer runs strictly after the loop's state commit, never before, so an open prompt can never strand the loop mid-BUILD. A duplicated prompter-factory closure (previously independent copies insettle.tsandhandoff/run-resume.ts) was consolidated into one sharedcreateDefaultPrompter()inverify/prompter.tsas part of this work — see that function's doc comment for a documented, narrow known limitation around scripted settle runs that fire both the interactive-verdict gate and a friction-having retro offer in the same process. - c5cd4b0: Fix a refusing settle gate silently dropping out of
gatesprovenance and a refusedsettle runwriting noSUMMARYat all — previously the only trace of a refusal was an ephemeral stderr line.GateProvenanceZ.statusgains a'refused'value plus an optionalreasonstring (additive, back-compat with pre-existingran/skippedrecords); all 9 settle-dispatched gates (draft-read,structural-verifier,boundary-scan,build-test-must-pass,test-coverage,interactive-verdict,deep-verify,code-review,security-audit) now attachreasonmatching their stderr text on refusal, andrunSettleGatespushes the refusing gate's entry ontogatesbefore halting. A refusedcadence settle runnow persistsSUMMARY.{json,md}(populatedgatesthrough the refusing entry, realtaskResults, emptyacResults/decisions/deferred) without transitioningloopPosition/activeDraft, so the loop stays exactly where a human can retry. - Updated dependencies [e38d86a]
- Updated dependencies [6fc52bd]
- Updated dependencies [c5cd4b0]
- @manehorizons/cadence-types@1.44.1
Published Packages
All public packages are published on npm as 1.44.1:
@manehorizons/cadence-core@manehorizons/cadence-host-claude-code@manehorizons/cadence-host-codex@manehorizons/cadence-types
Verification
- npm publish completed with provenance in the Release workflow.
- Remote tag
v1.44.1is verified before the GitHub Release is created. - npm package versions and GitHub Release metadata are verified after publish.
- Workflow run: https://github.com/manehorizons/cadence/actions/runs/29217246161