Skip to content

fix: retry cleared apply close guards - #920

Merged
steipete merged 2 commits into
mainfrom
fix/close-apply-audit
Jul 28, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/close-apply-audit

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • reselect close packets that were previously blocked by a protected label, PR close-exemption label, or locked conversation
  • recheck the exact live blocker and only restore proposed_close after it clears; all ordinary freshness, policy, age, proof, relation, and lease gates still run
  • expose policy-authorized close verdicts whose live item remains open in the audit result

Root cause

Apply and its planner had different retry vocabularies. The apply engine knew how to record transient live guards, but the planner excluded those recorded actions forever. Even an explicit apply re-probed the old guard and then unconditionally continued when it had cleared. Separately, apply workflows read the lagging git projection during the Worker-store migration, so canonical proposals such as openclaw/openclaw#109065 could miss scheduled selection.

Audit

Canonical Worker-backed audit at 2026-07-28T15:42:24.680Z: 128 high-confidence, repository-policy-authorized close verdicts still correspond to live-open items. Verdict counts: duplicate_or_superseded: 42, stalled_unproven_pr: 24, cannot_reproduce: 17, low_signal_unmergeable_pr: 10, not_actionable_in_repo: 9, implemented_on_main: 8, clawhub: 6, abandoned_pr: 6, unconfirmed_product_direction: 4, unsponsored_feature_request: 1, mostly_implemented_on_main: 1. The run hydrated Worker records, reconciled a complete 6535-item live scan, then preserved this inventory before a later state-projection tuple conflict.

Item 109065 did have a high-confidence close verdict (clawhub, reviewed 2026-07-16T14:46:18.857Z); it is not in the table because Peter closed it at 2026-07-28T14:50:05Z.

Item Repository Verdict Packet date Live state
#14133 openclaw/openclaw unsponsored_feature_request 2026-07-13T03:16:09.426Z OPEN
#44884 openclaw/openclaw stalled_unproven_pr 2026-07-09T16:58:13.136Z OPEN
#45031 openclaw/openclaw clawhub 2026-06-11T03:27:11.679Z OPEN
#49022 openclaw/openclaw duplicate_or_superseded 2026-07-09T12:33:22.036Z OPEN
#55766 openclaw/openclaw duplicate_or_superseded 2026-07-05T16:27:31.718Z OPEN
#56806 openclaw/openclaw duplicate_or_superseded 2026-07-20T23:57:18.527Z OPEN
#64127 openclaw/openclaw stalled_unproven_pr 2026-07-19T19:42:14.346Z OPEN
#67421 openclaw/openclaw duplicate_or_superseded 2026-07-03T06:26:22.708Z OPEN
#67967 openclaw/openclaw stalled_unproven_pr 2026-07-25T06:10:35.581Z OPEN
#68196 openclaw/openclaw mostly_implemented_on_main 2026-07-18T11:51:45.598Z OPEN
#68307 openclaw/openclaw stalled_unproven_pr 2026-07-18T06:06:58.656Z OPEN
#70813 openclaw/openclaw duplicate_or_superseded 2026-07-03T07:39:28.109Z OPEN
#72224 openclaw/openclaw abandoned_pr 2026-07-19T20:58:04.233Z OPEN
#72495 openclaw/openclaw stalled_unproven_pr 2026-07-18T07:19:26.973Z OPEN
#75165 openclaw/openclaw unconfirmed_product_direction 2026-07-26T22:12:50.703Z OPEN
#76027 openclaw/openclaw duplicate_or_superseded 2026-07-03T09:33:26.574Z OPEN
#76221 openclaw/openclaw duplicate_or_superseded 2026-07-08T23:37:20.302Z OPEN
#76445 openclaw/openclaw abandoned_pr 2026-07-18T15:22:27.323Z OPEN
#76975 openclaw/openclaw stalled_unproven_pr 2026-07-18T06:07:25.640Z OPEN
#77961 openclaw/openclaw duplicate_or_superseded 2026-07-03T21:02:42.245Z OPEN
#78026 openclaw/openclaw duplicate_or_superseded 2026-07-03T21:06:01.835Z OPEN
#78124 openclaw/openclaw duplicate_or_superseded 2026-07-03T21:09:18.835Z OPEN
#78229 openclaw/openclaw duplicate_or_superseded 2026-07-03T21:04:20.831Z OPEN
#78253 openclaw/openclaw duplicate_or_superseded 2026-07-12T06:44:10.240Z OPEN
#78521 openclaw/openclaw duplicate_or_superseded 2026-07-03T21:01:03.091Z OPEN
#78635 openclaw/openclaw duplicate_or_superseded 2026-07-03T21:05:13.075Z OPEN
#79044 openclaw/openclaw duplicate_or_superseded 2026-07-03T21:02:38.171Z OPEN
#79311 openclaw/openclaw duplicate_or_superseded 2026-07-07T15:20:51.188Z OPEN
#79762 openclaw/openclaw abandoned_pr 2026-07-19T16:09:37.406Z OPEN
#79869 openclaw/openclaw duplicate_or_superseded 2026-07-08T23:02:29.961Z OPEN
#79997 openclaw/openclaw duplicate_or_superseded 2026-06-30T08:37:16.468Z OPEN
#80246 openclaw/openclaw abandoned_pr 2026-07-19T15:49:27.756Z OPEN
#80414 openclaw/openclaw low_signal_unmergeable_pr 2026-06-30T10:35:03.310Z OPEN
#81198 openclaw/openclaw stalled_unproven_pr 2026-07-19T15:49:30.625Z OPEN
#81376 openclaw/openclaw low_signal_unmergeable_pr 2026-07-01T04:17:51.748Z OPEN
#81531 openclaw/openclaw stalled_unproven_pr 2026-07-19T15:48:33.975Z OPEN
#81719 openclaw/openclaw stalled_unproven_pr 2026-07-19T16:09:52.635Z OPEN
#85335 openclaw/openclaw stalled_unproven_pr 2026-07-14T10:48:07.488Z OPEN
#85670 openclaw/openclaw stalled_unproven_pr 2026-07-14T15:11:01.234Z OPEN
#85793 openclaw/openclaw duplicate_or_superseded 2026-07-04T17:51:03.873Z OPEN
#87088 openclaw/openclaw duplicate_or_superseded 2026-06-29T16:05:34.622Z OPEN
#87300 openclaw/openclaw abandoned_pr 2026-07-21T20:26:18.345Z OPEN
#87371 openclaw/openclaw cannot_reproduce 2026-06-15T04:01:25.836Z OPEN
#87709 openclaw/openclaw stalled_unproven_pr 2026-07-26T07:47:03.030Z OPEN
#88651 openclaw/openclaw stalled_unproven_pr 2026-07-26T08:23:22.102Z OPEN
#88668 openclaw/openclaw low_signal_unmergeable_pr 2026-07-15T10:30:36.772Z OPEN
#88738 openclaw/openclaw stalled_unproven_pr 2026-07-25T15:19:15.321Z OPEN
#89033 openclaw/openclaw stalled_unproven_pr 2026-07-21T20:27:06.293Z OPEN
#89117 openclaw/openclaw stalled_unproven_pr 2026-07-21T20:26:27.496Z OPEN
#89214 openclaw/openclaw stalled_unproven_pr 2026-07-21T20:26:37.329Z OPEN
#89277 openclaw/openclaw duplicate_or_superseded 2026-07-25T12:40:00.423Z OPEN
#89445 openclaw/openclaw implemented_on_main 2026-07-27T21:17:40.750Z OPEN
#90239 openclaw/openclaw low_signal_unmergeable_pr 2026-07-25T20:57:37.363Z OPEN
#90367 openclaw/openclaw duplicate_or_superseded 2026-07-16T18:59:54.158Z OPEN
#90827 openclaw/openclaw stalled_unproven_pr 2026-07-26T00:16:20.261Z OPEN
#90831 openclaw/openclaw stalled_unproven_pr 2026-07-26T03:30:31.050Z OPEN
#91162 openclaw/openclaw stalled_unproven_pr 2026-07-22T05:58:51.752Z OPEN
#91729 openclaw/openclaw abandoned_pr 2026-07-23T02:57:41.010Z OPEN
#92349 openclaw/openclaw stalled_unproven_pr 2026-07-26T04:16:59.300Z OPEN
#94228 openclaw/openclaw duplicate_or_superseded 2026-07-24T03:28:50.882Z OPEN
#95603 openclaw/openclaw unconfirmed_product_direction 2026-07-11T18:07:11.134Z OPEN
#95918 openclaw/openclaw stalled_unproven_pr 2026-07-24T05:41:54.312Z OPEN
#95970 openclaw/openclaw duplicate_or_superseded 2026-07-01T03:05:46.939Z OPEN
#96489 openclaw/openclaw duplicate_or_superseded 2026-06-24T16:27:02.135Z OPEN
#96855 openclaw/openclaw stalled_unproven_pr 2026-07-24T07:55:07.764Z OPEN
#97050 openclaw/openclaw stalled_unproven_pr 2026-07-24T07:55:02.775Z OPEN
#100546 openclaw/openclaw duplicate_or_superseded 2026-07-06T02:18:45.333Z OPEN
#101593 openclaw/openclaw duplicate_or_superseded 2026-07-07T11:33:46.111Z OPEN
#102504 openclaw/openclaw duplicate_or_superseded 2026-07-09T07:30:49.734Z OPEN
#103693 openclaw/openclaw duplicate_or_superseded 2026-07-11T07:36:11.845Z OPEN
#104165 openclaw/openclaw clawhub 2026-07-28T04:29:07.764Z OPEN
#104246 openclaw/openclaw duplicate_or_superseded 2026-07-18T17:42:45.542Z OPEN
#104533 openclaw/openclaw implemented_on_main 2026-07-11T15:16:53.353Z OPEN
#104602 openclaw/openclaw implemented_on_main 2026-07-11T18:15:03.882Z OPEN
#104987 openclaw/openclaw cannot_reproduce 2026-07-12T13:45:24.391Z OPEN
#105201 openclaw/openclaw cannot_reproduce 2026-07-12T09:35:00.009Z OPEN
#105660 openclaw/openclaw duplicate_or_superseded 2026-07-18T17:42:53.274Z OPEN
#105666 openclaw/openclaw cannot_reproduce 2026-07-12T20:11:03.414Z OPEN
#105670 openclaw/openclaw cannot_reproduce 2026-07-12T20:10:18.602Z OPEN
#105715 openclaw/openclaw not_actionable_in_repo 2026-07-12T22:11:16.842Z OPEN
#105844 openclaw/openclaw duplicate_or_superseded 2026-07-18T17:42:41.962Z OPEN
#106023 openclaw/openclaw unconfirmed_product_direction 2026-07-13T19:41:06.754Z OPEN
#106172 openclaw/openclaw clawhub 2026-07-13T09:03:42.079Z OPEN
#106575 openclaw/openclaw duplicate_or_superseded 2026-07-13T18:58:50.552Z OPEN
#106588 openclaw/openclaw not_actionable_in_repo 2026-07-13T18:52:35.538Z OPEN
#106608 openclaw/openclaw cannot_reproduce 2026-07-13T19:23:06.642Z OPEN
#106613 openclaw/openclaw cannot_reproduce 2026-07-13T19:26:19.041Z OPEN
#106626 openclaw/openclaw cannot_reproduce 2026-07-13T19:30:56.195Z OPEN
#106646 openclaw/openclaw cannot_reproduce 2026-07-13T19:44:59.245Z OPEN
#106674 openclaw/openclaw not_actionable_in_repo 2026-07-13T20:03:35.150Z OPEN
#106676 openclaw/openclaw not_actionable_in_repo 2026-07-13T20:04:29.165Z OPEN
#106678 openclaw/openclaw cannot_reproduce 2026-07-13T20:05:58.523Z OPEN
#107006 openclaw/openclaw duplicate_or_superseded 2026-07-14T10:08:07.545Z OPEN
#107203 openclaw/openclaw low_signal_unmergeable_pr 2026-07-27T23:11:35.787Z OPEN
#107531 openclaw/openclaw cannot_reproduce 2026-07-14T18:21:42.180Z OPEN
#107550 openclaw/openclaw cannot_reproduce 2026-07-14T19:51:01.209Z OPEN
#108029 openclaw/openclaw duplicate_or_superseded 2026-07-17T23:02:16.032Z OPEN
#108639 openclaw/openclaw implemented_on_main 2026-07-16T06:23:41.971Z OPEN
#108654 openclaw/openclaw duplicate_or_superseded 2026-07-16T06:11:17.285Z OPEN
#108687 openclaw/openclaw low_signal_unmergeable_pr 2026-07-16T09:23:18.580Z OPEN
#109045 openclaw/openclaw duplicate_or_superseded 2026-07-18T16:05:04.948Z OPEN
#109283 openclaw/openclaw unconfirmed_product_direction 2026-07-17T07:00:43.550Z OPEN
#109946 openclaw/openclaw duplicate_or_superseded 2026-07-17T11:10:59.876Z OPEN
#110465 openclaw/openclaw duplicate_or_superseded 2026-07-20T08:09:52.362Z OPEN
#111437 openclaw/openclaw low_signal_unmergeable_pr 2026-07-19T17:15:44.413Z OPEN
#111667 openclaw/openclaw cannot_reproduce 2026-07-20T05:14:00.929Z OPEN
#111683 openclaw/openclaw not_actionable_in_repo 2026-07-20T05:56:05.113Z OPEN
#111792 openclaw/openclaw clawhub 2026-07-27T21:49:51.751Z OPEN
#111879 openclaw/openclaw duplicate_or_superseded 2026-07-20T16:10:24.071Z OPEN
#112104 openclaw/openclaw cannot_reproduce 2026-07-21T05:39:38.447Z OPEN
#112133 openclaw/openclaw implemented_on_main 2026-07-21T05:59:09.398Z OPEN
#112139 openclaw/openclaw implemented_on_main 2026-07-21T05:59:37.242Z OPEN
#112148 openclaw/openclaw cannot_reproduce 2026-07-21T06:00:04.158Z OPEN
#112157 openclaw/openclaw cannot_reproduce 2026-07-21T06:01:22.169Z OPEN
#112160 openclaw/openclaw implemented_on_main 2026-07-27T07:21:15.166Z OPEN
#112847 openclaw/openclaw duplicate_or_superseded 2026-07-26T00:25:02.925Z OPEN
#112849 openclaw/openclaw clawhub 2026-07-26T04:21:26.292Z OPEN
#112964 openclaw/openclaw implemented_on_main 2026-07-26T04:21:42.350Z OPEN
#113051 openclaw/openclaw cannot_reproduce 2026-07-27T16:46:35.607Z OPEN
#113253 openclaw/openclaw not_actionable_in_repo 2026-07-27T16:47:09.004Z OPEN
#113291 openclaw/openclaw clawhub 2026-07-24T09:12:20.156Z OPEN
#113436 openclaw/openclaw not_actionable_in_repo 2026-07-24T23:54:38.458Z OPEN
#113910 openclaw/openclaw low_signal_unmergeable_pr 2026-07-28T02:41:25.838Z OPEN
#114162 openclaw/openclaw not_actionable_in_repo 2026-07-27T15:13:29.663Z OPEN
#114553 openclaw/openclaw not_actionable_in_repo 2026-07-27T11:56:55.064Z OPEN
#114901 openclaw/openclaw low_signal_unmergeable_pr 2026-07-28T12:15:08.368Z OPEN
#115099 openclaw/openclaw low_signal_unmergeable_pr 2026-07-28T11:53:43.107Z OPEN
#115200 openclaw/openclaw duplicate_or_superseded 2026-07-28T15:06:55.806Z OPEN

Proof

  • mise exec node@24 -- pnpm run build:all
  • mise exec node@24 -- node --test test/apply-live-state.test.ts test/apply-close-retry-policy.test.ts test/repair/workflow-utils.test.ts test/clawsweeper.test.ts — 138 passed
  • mise exec node@24 -- pnpm run check — build/static/format/lint and changed tests passed; the full baseline hit five macOS Python/Landlock capset failures plus one /var vs /private/var path assertion in unrelated tests
  • ~/.claude/skills/autoreview/scripts/autoreview --mode local — clean, no accepted/actionable findings

This PR does not close any audited item. The scheduled apply lane will read Worker-authoritative records and process the restored candidates after merge; each item can close only if its live blocker has cleared and every downstream conservative gate passes.

@steipete
steipete requested a review from a team as a code owner July 28, 2026 15:35
@clawsweeper

clawsweeper Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: retry cleared apply close guards This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit 5a4311b into main Jul 28, 2026
27 of 28 checks passed
@steipete
steipete deleted the fix/close-apply-audit branch July 28, 2026 15:46
This was referenced Jul 29, 2026
This was referenced Jul 29, 2026
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
* fix: retry cleared apply close guards

* ci: preserve canonical close audit artifact
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