Protect queueable issues from stale automation#248
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 2, 2026, 3:23 PM ET / 19:23 UTC. Summary Reproducibility: yes. Source inspection on current main shows queueable advisory labels are added while unrelated labels such as Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow ClawSweeper label-sync change after maintainers accept the stale-label rollout timing with the companion OpenClaw workflow PR. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows queueable advisory labels are added while unrelated labels such as Is this the best way to solve the issue? Yes. The patch keeps stale protection inside the existing advisory-label sync path, adds focused coverage, and documents the ownership boundary without introducing a new workflow or config surface. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 9c50a95427c2. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
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
|
|
Coordination note: Shadow (OpenClaw admin) mentioned in Discord that this stale/queueable behavior may be intentional. Keeping this PR open for now while maintainers confirm the intended policy. If it is confirmed intentional that ClawSweeper queueable/actionable issues can still be marked stale, maintainers can close this PR. If not, this remains the proposed fix path. |
|
Coordination note: Shadow (OpenClaw admin) mentioned in Discord that this stale/queueable behavior may have been intentional. I’m leaving this PR open for now so maintainers can confirm the intended policy. If the intended policy is that ClawSweeper queueable/actionable issues may still be marked stale and remain eligible for stale handling, maintainers can close this PR as intentional / not planned. If the intended policy is that queueable/actionable ClawSweeper issues should be protected from stale closure, this PR remains the proposed fix path. |
Summary
clawsweeper:queueable-fix, it now removesstaleand adds the target repo's durableno-staleexemption.no-stalelabels, but clear theno-staleexemption if a later advisory sync removes a previously queueable ClawSweeper state.docs/work-lane.md.Fixes #247.
Companion OpenClaw stale-workflow fix: openclaw/openclaw#89572
Real behavior proof
staleattached.openclaw/clawsweepersource checkout on Nodev24.13.0, branchfix/issue-247-queueable-stale-protection, headddbee54177, based on upstream9c50a95427c21d5e0e33e57295e68b1548cc9953.git diff --checknode --test --test-name-pattern "issue advisory labels" test/clawsweeper.test.tsnode --test --test-name-pattern "apply-decisions counts advisory label-only syncs" test/clawsweeper.test.tspnpm run build:allpnpm run lintpnpm exec oxfmt --check docs/work-lane.md src/clawsweeper.ts test/clawsweeper.test.tscodex review --uncommittedbefore committing the patchstale, addsno-stale, keepsclawsweeper:queueable-fix, and does not stale-proof lower-confidence/manual-review/PR states.no-stale, adds it, and removesstalefor the queueable candidate.pnpm run checkwas attempted. It passed active-surface, limits, build, and lint, then failed in broadtest:uniton this Windows desktop because unrelated tests spawn local Codex or/usr/bin/gitpaths (spawnSync codex EPERM,spawnSync /usr/bin/git ENOENT) and one Windows file-mode expectation differs. The focused tests requested by ClawSweeper for this issue passed.Verification
Duplicate scan before opening PR found no open matching implementation PRs in
openclaw/clawsweeperfor queueable/stale/no-stale protection.Additional controlled dry-run proof
After ClawSweeper review asked for a non-mocked live/dry-run label-sync proof, I ran a controlled dry-run against live GitHub issue metadata from openclaw/openclaw#78640. This issue currently has
stale,clawsweeper:queueable-fix,clawsweeper:source-repro, andclawsweeper:fix-shape-clear.No live label mutation was performed. The dry-run used a temporary local
items/78640.mdreport withwork_candidate: queue_fix_pr,work_status: candidate,work_confidence: high, and the issue's currentitem_updated_atfrom GitHub.Command run:
Live labels before the dry-run:
Built ClawSweeper label transition computed from those live labels and the queueable issue state:
{ "beforeContainsStale": true, "beforeContainsNoStale": false, "afterContainsStale": false, "afterContainsNoStale": true, "added": ["no-stale"], "removed": ["stale"], "afterLabels": [ "P1", "impact:session-state", "impact:data-loss", "no-stale", "issue-rating: ?? diamond lobster", "clawsweeper:source-repro", "clawsweeper:queueable-fix", "clawsweeper:fix-shape-clear" ] }Dry-run apply output:
Live labels after the dry-run matched the before labels exactly, so
liveMutationsPerformed: false.The apply result reports the durable-comment dry-run action first because the synthetic local report did not match the existing durable ClawSweeper comment body on the live issue. The label transition above is from the built PR code using the live issue labels and the same queueable issue advisory state used by the apply path; it shows the intended label mutation precisely: add
no-stale, removestale.