Skip to content

fix: capture canonical tuple baselines - #932

Merged
steipete merged 1 commit into
mainfrom
fix/tuple-baseline-class
Jul 29, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/tuple-baseline-class

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • capture each canonically hydrated record tuple immediately before review, reconcile, or apply mutation and use that snapshot as the compare-and-swap baseline
  • scope broad record publication to the captured tuple manifest, so a Worker-hydrated worktree never treats every record omitted from the sparse Git checkout as a new row
  • wire the baseline through review artifact publication, selected comment sync, audit reconciliation, and every apply checkpoint
  • publish best-effort sweep status through its exact file and avoid noisy restore attempts for generated paths outside the source checkout
  • protect the three namespaced review guard labels during apply and flag repository-policy-forbidden close classes before comment sync

Root cause

PR #931 fixed preselect reconciliation by handing publish-main a pre-mutation tuple snapshot. Apply run https://github.com/openclaw/clawsweeper/actions/runs/30423708926 then exposed the same stale-baseline defect in checkpoint publication: apply-decisions mutated canonically hydrated records, but the later publisher computed expectedDigest from CLAWSWEEPER_STATE_DIR, whose sparse checkout intentionally has no records/ tree. The first checkpoint therefore sent null or stale digests and received canonical_record_tuple_conflict after four review comments had already synced.

The shared capture manifest makes the ownership explicit. Mutation commands snapshot the four tuple sections before their first write. publish-main accepts only captured keys when an explicit baseline is present, while the two direct Worker maintenance writers continue to use digests from their live canonical exports.

Caller audit

Tuple writer CAS baseline
src/repair/publish-main.ts initial post and CURRENT retry pre-mutation capture manifest for Worker-hydrated lanes; full Git state checkout remains the rollback path
scripts/reconcile-worker-records.ts corrective tuple post digests from the canonical Worker export
scripts/worker-records.ts projection replay digests from the canonical Worker snapshot

Proof

  • real Durable Object handler test seeds canonical state, captures an apply tuple, mutates it, publishes the broad checkpoint path, and proves only that tuple is sent while an unrelated hydrated record is ignored
  • apply, review-artifact, reconcile, policy-class, namespaced-label, sparse-status, publish-main, and sweep-workflow focused tests pass
  • pnpm run format, pnpm run build, and pnpm run lint pass
  • pnpm run check passes static checks, all builds, lint, changed coverage, and task tests; the final all-files coverage run retains the six unrelated macOS baseline failures already documented on fix: preserve apply reconciliation tuple baselines #931: five Linux Landlock fixtures cannot resolve capset, and one temp-path assertion compares /var with /private/var
  • ~/.claude/skills/autoreview/scripts/autoreview --mode local: clean, no accepted/actionable findings

No Worker deployment or protocol change is required.

@steipete
steipete requested a review from a team as a code owner July 29, 2026 05:50
@steipete
steipete merged commit bd3fa59 into main Jul 29, 2026
11 checks passed
@steipete
steipete deleted the fix/tuple-baseline-class branch July 29, 2026 05:56
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>
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
…iew, crawl-remote deploy, finalize-open-PRs, proof nudges, state compaction) (openclaw#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 openclaw#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-openclaw#929/openclaw#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