Skip to content

v1.44.1

Choose a tag to compare

@github-actions github-actions released this 13 Jul 01:27
7430b28

Package Changelog

Patch Changes

  • Fix a gate implementation's thrown exception escaping uncaught out of runSettleGates to settle.ts's outer catch, which printed to stderr and exited 1 with no SUMMARY written — security-audit was previously the sole gate normalizing its own throws into a refuse outcome. The gate invocation in runSettleGates is 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 persists SUMMARY.json/SUMMARY.md and leaves loop state untouched. Closes rec-20260712-007.
  • e38d86a: Add optimistic concurrency to SimpleStateBackend.commit() to prevent lost updates when two cadence state writers (CLI commands, hooks, or the MCP server) race on .cadence/state.json in 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. CadenceState gains a revision: number field (additive, .default(0), back-compat with pre-existing state.json files). commit() now compares the current on-disk revision to the caller's in-memory state.revision before writing: a match bumps it in place and writes as before; a mismatch refuses with a new StateConflictError (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 existing state.json) skips the check entirely. The in-place revision bump means a caller issuing several sequential commit() 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 clean DONE, and any code-review/security-audit/boundary-scan findings — is synthesized purely from the SUMMARY data already assembled and written as <draftId>-RETRO.json/.md alongside SUMMARY.json/.md (a clean settle writes a "No friction detected this settle." form). @manehorizons/cadence-types gains an additive RetroDigest/RetroDigestZ schema and a retro: { enabled, offerGithubIssue } config block (both default true, same shape convention as the existing recommendations block). When the digest is non-empty and the run is interactive (a real TTY, or the CADENCE_PROMPTER_SCRIPT test seam), settle also offers to file a GitHub issue for it via gh — 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 it needs-triage in 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 in settle.ts and handoff/run-resume.ts) was consolidated into one shared createDefaultPrompter() in verify/prompter.ts as 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 gates provenance and a refused settle run writing no SUMMARY at all — previously the only trace of a refusal was an ephemeral stderr line. GateProvenanceZ.status gains a 'refused' value plus an optional reason string (additive, back-compat with pre-existing ran/skipped records); 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 attach reason matching their stderr text on refusal, and runSettleGates pushes the refusing gate's entry onto gates before halting. A refused cadence settle run now persists SUMMARY.{json,md} (populated gates through the refusing entry, real taskResults, empty acResults/decisions/deferred) without transitioning loopPosition/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