fix(state): stop apply lanes from git-writing records - #929
Merged
Conversation
8 tasks
steipete
added a commit
that referenced
this pull request
Jul 30, 2026
…iew, crawl-remote deploy, finalize-open-PRs, proof nudges, state compaction) (#964) * chore(deploy): delete the crawl-remote production deployment system Three runs ever, zero successes (last: 2026-07-29 run stuck waiting). Removes the 3,056-line deploy-crawl-remote.yml workflow, the pinned Wrangler toolchain under .github/deploy, and the 3,030-line workflow shape test. The ci.yml toolchain job and checkout-pin test follow in the wiring commit. * chore(state): delete the retired append-window compactor lane The state-materializer workflow burned a runner every 20 minutes to report drained=0 acked=0 (latest: run 30551689153). The git projection it fed was deleted in #936 and no producer posts /internal/state/append anymore; the DO endpoints and tables are removed in the follow-up commit. * chore(state): delete the monthly state-repo history compaction lane state-compaction.yml rewrote openclaw/clawsweeper-state main to a single-root commit once a month. The repo's written surface is nearly retired (records/ledger/assets are Cloudflare-owned) and dropping this writer moves the archive goal forward. state-repo-size.ts stays: the exact-review reconcile workflow still runs it. * chore(repair): delete the dormant finalize-open-PRs dispatch workflow Last success April 29; workflow_dispatch-only since. The finalizer module and its --write-report path stay because repair-publish-results runs them after every worker-result publish. * chore(review): delete the proof-nudge workflow, doc, and policy test Proof nudges and bot-proof decisions contributed nothing to weekly review coverage. The clawsweeper.ts command surgery follows in the wiring commit; the proof-nudge comment marker constant survives because the stalled-unproven close policy dates historical proof asks with it. * chore(commit-review): delete the commit-review lane and finding intake Zero successes in the last 20 commit-review runs (11 failed, 9 cancelled). Removes the hosted per-commit review workflow, its classifier and Check Run publisher, the commit-finding repair intake, and the dispatcher doc. The offline local-review engine survives in commit-sweeper.ts (trimmed in the wiring commit); existing commit_finding repair jobs remain executable. * chore(deploy): drop crawl-remote toolchain CI job and checkout-pin test * chore(state): remove the producer-free append-window endpoints and tables /internal/state/{append,drain,ack,dispose} had no remaining producer: post-#929/#932 every record tuple goes through /records/tuples and the only drain consumer was the deleted state-materializer workflow. The Durable Object now drops the five state_append_* tables on upgrade, and queue status no longer reports the empty window. The internal-route HMAC test re-targets /internal/state/records/tuples. * chore(review): remove the proof-nudge and bot-proof command machinery Deletes proofNudgesCommand/botProofCommand, their eligibility, marker parsing, rendering, cursor, and candidate-selection helpers plus lane types and CLI dispatch (about 1,300 lines of clawsweeper.ts). The PROOF_NUDGE_MARKER_PREFIX constant stays: stalledUnprovenProofRequest BlockReason still dates historical proof-nudge comments with it, and hasDispatchableMantisScenario stays for review rendering. * chore(commit-review): trim the engine to local-review and drop the lane's budget wiring commit-sweeper.ts keeps only the offline local-review command plus the shared helpers the main sweeper's --local-range path imports. The commit_review worker lane leaves limits, workflow-utils, sweep.yml budget accounting, and the docs; docs/commit-sweeper.md now documents local-review only. * chore: update shared workflow-shape invariants, scripts, docs, and changelog setup-state sites 25->19, git publishers 23->19, records-repo-slugs and non-fatal-bookkeeping lists shrink accordingly, and all seven deleted workflows join the stays-deleted list. package.json drops the proof-nudges/bot-proof/commit-review/commit-reports and repair:commit-finding-intake scripts. README and CHANGELOG record the six lane removals. * chore(docs-site): drop the commit-reports snippet from the landing page --------- Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Apply run https://github.com/openclaw/clawsweeper/actions/runs/30420992232 published its reconciliation tuples canonically, then
publish-mainleft unchanged tuple siblings in the Git fallback set. Worker-mode state checkouts have intentionally excludedrecords/since #922, so the leftover dual-write failed while staging paths outside the sparse checkout.This change consumes every
records/<slug>/{items,closed,plans,decision-packets}projection before Git publication, whether that individual path changed or not. Mixed publications keep their legitimate non-record paths, including apply reports, cursors, status, and jobs.The apply/sweep audit also found the queued exact-event fallback still using the older
stagePaths/ commit /pushSingleRecordTupleCommitroute. It now prepares the tuple payload directly from the work root and posts through the revision-fenced canonical exact-review endpoint. The state materializer remains the only Git tuple writer.Proof
pnpm run formatpnpm run buildnode --test test/repair/publish-main.test.ts test/state-writer-workflow.test.ts test/sweep-workflow.test.ts test/repair/exact-review-batch-workflow.test.ts— 117 passedpnpm run check— static checks, all builds, format, lint, changed coverage, and the main suite passed; final status retains the existing macOS baseline of five Linuxcapset/Landlock fixture failures and one/private/varpath-alias assertion~/.claude/skills/autoreview/scripts/autoreview --mode local— clean, no accepted/actionable findingsRegression coverage proves that canonical preselect publication can include all four tuple paths while the Git stage receives only
apply-report.json, matching the worker sparse checkout that excludesrecords/. Workflow contract coverage forbids direct tuple staging or single-record Git pushes from returning to the active apply/sweep publisher.