Skip to content

fix(state): stop apply lanes from git-writing records - #929

Merged
steipete merged 1 commit into
mainfrom
fix/apply-no-git-records
Jul 29, 2026
Merged

fix(state): stop apply lanes from git-writing records#929
steipete merged 1 commit into
mainfrom
fix/apply-no-git-records

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

Apply run https://github.com/openclaw/clawsweeper/actions/runs/30420992232 published its reconciliation tuples canonically, then publish-main left unchanged tuple siblings in the Git fallback set. Worker-mode state checkouts have intentionally excluded records/ 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 / pushSingleRecordTupleCommit route. 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 format
  • pnpm run build
  • node --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 passed
  • pnpm run check — static checks, all builds, format, lint, changed coverage, and the main suite passed; final status retains the existing macOS baseline of five Linux capset/Landlock fixture failures and one /private/var path-alias assertion
  • ~/.claude/skills/autoreview/scripts/autoreview --mode local — clean, no accepted/actionable findings

Regression 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 excludes records/. Workflow contract coverage forbids direct tuple staging or single-record Git pushes from returning to the active apply/sweep publisher.

@steipete
steipete merged commit fb83c3b into main Jul 29, 2026
11 checks passed
@steipete
steipete deleted the fix/apply-no-git-records branch July 29, 2026 04:26
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant