Repository navigation
fix(apply): tolerate deleted review targets - #409
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 4, 2026, 11:30 AM ET / 15:30 UTC. Summary Reproducibility: yes. Source inspection plus the failed workflow log show current main fetches the live item before closed-state handling, and a deleted GitHub target 404 fails the apply run; I did not run a mutating apply repro in this read-only review. 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 404 handling once maintainers accept the bounded apply-lane behavior and required checks pass, keeping comment-only records queued and repository-level 404s fatal. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection plus the failed workflow log show current main fetches the live item before closed-state handling, and a deleted GitHub target 404 fails the apply run; I did not run a mutating apply repro in this read-only review. Is this the best way to solve the issue? Yes. Catching only GitHub not-found, confirming repository access, preserving comment-only semantics, and covering the edge cases is the narrow maintainable fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 55652622c484. Label changesLabel changes:
Label 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
Review history (2 earlier review cycles)
|
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a392369917
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| markdown = replaceFrontMatterValue(markdown, "action_taken", "skipped_already_closed"); | ||
| markdown = replaceFrontMatterValue(markdown, "apply_checked_at", new Date().toISOString()); | ||
| archiveClosed(markdown); |
There was a problem hiding this comment.
Skip archiving during comment-only sync
When --sync-comments-only is set, this catch still runs before the existing syncCommentsOnly && state !== "open" branch that only marks closed live items as checked and leaves them in items/. A scheduled comment-sync run that hits a deleted item will now rewrite action_taken and move the record into closed/, so comment-only automation performs archival apply work while the same mode intentionally avoids archiving normally closed items; gate this path on !syncCommentsOnly or mirror the closed-item skip behavior.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a297b52e8e: the 404 path now mirrors comment-only semantics at src/clawsweeper.ts:17565, marking the check without changing action_taken or archiving. test/apply-live-state.test.ts covers the queued-record behavior.
|
@clawsweeper re-review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Treat confirmed item-level 404s as terminal without masking repository access failures or changing comment-only archival semantics. Add focused live-state regression coverage.
Why
Live monitoring found run 28709649723 failing after a successful review because target item
openclaw/openclaw#99991was deleted beforeapply-decisionsfetched its live state. GitHub correctly returned 404, but apply treated that terminal race as a workflow failure.What changed
Proof
Exact head:
a297b52e8e619b2ba165e066b02450650ca93050test/apply-live-state.test.ts: 3/3 passed.pnpm run check: 617 unit and 617 repair tests passed.openclaw/openclaw#99991: exit 0, source report removed, durable record archived, apply report emittedskipped_already_closedwith reasonitem not found on GitHub.No changelog entry: this is internal apply-run reliability with no user-facing contract change.