Skip to content

feat(ledger): record command action lifecycles - #520

Merged
vincentkoc merged 14 commits into
mainfrom
feat/action-ledger-command-actions
Jul 13, 2026
Merged

vincentkoc merged 14 commits into
mainfrom
feat/action-ledger-command-actions

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add immutable command receipt chains for received, classified, claimed, claim-refreshed, dispatched, recovered, waiting, skipped, completed, and failed router transitions
  • record command-status comment progress and report-only repair requeues, forwarding a stable dispatch_key into the worker dedupe gate
  • bind operations to stable command versions/source revisions while separating explicit workflow-step attempts and business idempotency
  • publish router, late exact-review status, and report/requeue receipt shards immutably to the state repository

Validation

  • pnpm --config.verify-deps-before-run=false run build:all
  • router/workflow/action-ledger focused suites: 232 passed
  • status/requeue/workflow focused suites: 110 passed
  • command receipt identity suite: passed
  • pnpm --config.verify-deps-before-run=false run lint:repair
  • pnpm --config.verify-deps-before-run=false run format:check
  • git diff --check

Stack

@vincentkoc
vincentkoc force-pushed the feat/action-ledger-review-apply branch from c9c0ba3 to 24616c1 Compare July 12, 2026 17:43
@vincentkoc
vincentkoc force-pushed the feat/action-ledger-command-actions branch from 97b6a0b to 3bc9189 Compare July 12, 2026 18:25
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Jul 12, 2026
@clawsweeper

clawsweeper Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed July 12, 2026, 8:10 PM ET / July 13, 2026, 00:10 UTC.

Summary
Adds immutable command lifecycle and GitHub-mutation receipts across routing, status updates, bounded repair requeues, and manifest-bound state-repository publication.

Reproducibility: not applicable. This PR adds a new automation audit capability rather than fixing a reproducible current-main bug.

Review metrics: 3 noteworthy metrics.

  • Patch surface: 30 files, +3,678/-352. The change spans several live automation workflows, mutation wrappers, schema, documentation, and tests.
  • New implementation modules: 4 files added. The PR introduces the command-ledger adapter, manifest finalizer, CLI, and requeue-identity helper as maintained surfaces.
  • Focused validation: 342 reported passes plus identity suite. Targeted coverage is substantial, while the exact-head hosted checks were not yet complete in the supplied snapshot.

Root-cause cluster
Relationship: canonical
Canonical: #520
Summary: This PR is the canonical command-lifecycle ledger layer between the merged foundation and the stacked repair-operation follow-up.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🌊 off-meta tidepool
Patch quality: 🦐 gold shrimp
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Remove the CHANGELOG.md hunk and retain the release-note context in the PR body or commit history.
  • Wait for the exact-head hosted checks to complete before maintainer merge review.

Risk before merge

  • [P1] The patch changes live GitHub mutation wrappers, forced-replay identity, requeue dispatch keys, and immutable publication; an incorrect boundary could alter or misreport automation behavior despite focused tests.
  • [P1] The provided exact-head check snapshot still had several hosted checks in progress, so final workflow validation was incomplete.

Maintainer options:

  1. Remove changelog and revalidate (recommended)
    Drop the release-owned changelog hunk, then complete the exact-head hosted checks and inspect a command-receipt publication artifact.
  2. Pause the stacked series
    Keep this draft and feat(ledger): record ClawSweeper action lifecycles #521 paused if maintainers want to redesign the command-ledger boundary before landing it.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Remove only the `CHANGELOG.md` changes from this PR, preserve release-note context in the PR body or commit messages, and run the repository check suite.

Next step before merge

  • A narrow automated cleanup can remove the policy-violating changelog hunk without altering the feature; final hosted validation and merge acceptance remain maintainer-owned.

Security
Cleared: The diff reuses repository-local actions and existing app-token flows, with no new third-party action, dependency source, permission broadening, or concrete secret exposure found.

Review findings

  • [P2] Remove the release-owned changelog edit — CHANGELOG.md:73
Review details

Best possible solution:

Remove the CHANGELOG.md hunk, preserve the manifest-bound fail-closed publication design, and let maintainers review the completed exact-head checks and operational receipt artifacts before merging the draft.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR adds a new automation audit capability rather than fixing a reproducible current-main bug.

Is this the best way to solve the issue?

Yes, extending the shared immutable ledger with command-specific receipts and manifest-bound publication is coherent; the release-owned changelog edit should be removed before merge.

Full review comments:

  • [P2] Remove the release-owned changelog edit — CHANGELOG.md:73
    CHANGELOG.md is release-owned in this repository, so normal feature branches must preserve this context in the PR body or commit messages instead of editing the file. This prior blocker remains on the current head; remove the changelog hunk without changing the ledger implementation.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a16e865b1a78.

Label changes

Label justifications:

  • P2: This is a normal-priority automation auditability feature with a concrete but narrow policy blocker.
  • merge-risk: 🚨 automation: Merging changes command routing, GitHub mutation retry boundaries, requeue dispatch identity, and ledger-publication workflows.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply to this repository-member PR; the reported focused suites and hosted checks remain supplemental maintainer validation.
Evidence reviewed

Acceptance criteria:

  • [P1] git diff --check.
  • [P1] pnpm run check.

What I checked:

Likely related people:

  • vincentkoc: Introduced the merged immutable action-ledger foundation and authored this command-lifecycle extension, including its latest manifest-binding repair. (role: feature owner; confidence: high; commits: 3630fff1700f, 2508b8665fe0, b7c3ba1d73e9; files: src/action-ledger-runtime.ts, src/repair/command-action-ledger.ts, src/repair/comment-router.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (8 earlier review cycles)
  • reviewed 2026-07-12T18:30:49.606Z sha 3bc9189 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T20:16:58.250Z sha cb95be9 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T21:34:43.921Z sha 74b9e96 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T22:05:46.612Z sha 45abcaf :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T22:20:57.373Z sha fc9286f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T22:36:22.288Z sha 92eb1a4 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T23:36:54.244Z sha 306e643 :: needs changes before merge. :: [P2] Remove the release-owned changelog edit
  • reviewed 2026-07-12T23:51:37.634Z sha 2508b86 :: needs changes before merge. :: [P2] Remove the release-owned changelog edit

@vincentkoc
vincentkoc force-pushed the feat/action-ledger-review-apply branch from 4d69a33 to 9fea0d5 Compare July 12, 2026 19:13
@clawsweeper clawsweeper Bot added feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 12, 2026
@vincentkoc
vincentkoc force-pushed the feat/action-ledger-review-apply branch from deada44 to f2e6e42 Compare July 12, 2026 22:11
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jul 12, 2026
Base automatically changed from feat/action-ledger-review-apply to main July 12, 2026 22:43
@vincentkoc
vincentkoc force-pushed the feat/action-ledger-command-actions branch from 92eb1a4 to a1e8aa4 Compare July 12, 2026 23:00
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 12, 2026
@vincentkoc
vincentkoc force-pushed the feat/action-ledger-command-actions branch from 306e643 to 2508b86 Compare July 12, 2026 23:48
@vincentkoc
vincentkoc marked this pull request as ready for review July 13, 2026 00:29
@vincentkoc
vincentkoc requested a review from a team as a code owner July 13, 2026 00:29
@vincentkoc
vincentkoc merged commit f1b69ea into main Jul 13, 2026
9 checks passed
@vincentkoc
vincentkoc deleted the feat/action-ledger-command-actions branch July 13, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant