Repository navigation
fix: skip extra approval for comments on the session PR - #206129
Conversation
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 604880fa-6341-4ca2-becd-a96804b76f6d
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: passed. What this changesThis PR skips separate approval for comments on the session’s PR and preserves the full approval lifetime for other targets under Codex. Example: The session selects #7 and calls create_comment with issueNumber 7.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open for landing: it fixes the premature approval timeout and implements the maintainer-approved session-PR exception without an identified defect. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe GitHub tool sends comment intent to the Gateway, which resolves the registered repository, session PR, requester access, and publisher before posting through GitHub and returning a verified URL. flowchart TD
A[Agent GitHub tool] --> B[Codex execution budget]
B --> C[Gateway access and publisher checks]
C --> D[Session PR match]
D -->|Match| F[GitHub comment POST]
D -->|Other target| E[Exact comment approval]
E -->|Allow once| F
F --> G[Verified result and outcome log]
Technical reviewBest possible solution: Land the focused change using the existing session association, publication receipt, approval manager, and tool-owned execution budget. Do we have a high-confidence way to reproduce the issue? Current-main source applies the ordinary 90000 ms Codex watchdog to a comment operation whose approval lasts 300000 ms, matching the reported live failure in #206119; no target code was executed during this review. Is this the best way to solve the issue? The implementation fixes the timeout at its existing budget owner and keeps the consent exception inside the Gateway’s existing comment owner without introducing parallel state or permission mechanisms. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f769a88c6a4f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +36, Tests +121, Docs +4. Total +161 across 8 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)Reviewed November 27, 2026, 1:34 AM ET / 06:34 UTC (Revision 5). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Keep approval for other targets in the registered repository and preserve comment outcome logging. Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: d5ffe864-4859-46ed-9f32-003110590add
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…restoration-ci-189390-20261127 * commit '6feeb50a3f14fbf0aa5167d342f186dc4d67fc18': (9846 commits) fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341) refactor(codex): centralize native completion delivery (#206447) fix(subagents): finish claimed stops after session rotation (#206405) fix: let owners fork a chat with exec after a subagent or exec completion (#206483) test(cli): gate agent --local cold-start processes and workers (#206466) perf(ci): skip baseline inventory when line-cap debt is empty (#189909) refactor(test): share core process-result fixtures (#174149) refactor(ci): reuse canonical budget flag parsing (#189480) fix: recover Codex chats after oversized requests (#206475) fix(agents): skip the bootstrap ritual in one-shot runs (#206477) fix(test): preserve stack coordinates in redacted failure reports (#152384) fix(gateway): return consistent unavailable response guidance (#191933) fix: preserve emphasis in Markdown table row labels (#205349) fix(nextcloud-talk): keep webhook spool helpers private (#206470) perf(plugins): overlay native receipts once per visible root (#206464) fix: keep GitHub comment approvals alive and skip repeat approval on the session PR (#206129) perf(config): retain one snapshot for unchanged validation results (#206465) refactor(test): reuse canonical secret fixture cleanup (#189492) refactor(subagents): own descendant Stop cancellation (#206444) refactor(subagents): keep announce cleanup action type private (#206407) ...
…the session PR (openclaw#206129) Allow a session to comment on its selected or published pull request without a second approval. Keep explicit approval for other targets and let Codex honor the GitHub tool's execution budget so those approvals can run for their full lifetime. Closes openclaw#206119.
Closes #206119
What Problem This Solves
Agents need a separate confirmation to comment on the PR their current session is already working on, even though creating that PR needs no such confirmation. For comments on other targets, Codex can cancel the required five-minute approval after only 90 seconds.
User Impact
Comments on the session's selected or currently published PR post without another approval. Comments on other issues or PRs in the registered repository still require approval of the exact target, posting account and text, and retain their full five-minute lifetime. The tool still cannot choose another repository. No configuration change is needed.
Why This Change Was Made
I use the existing session PR association, or its current publication receipt when there is no selected PR, with an exact host/repository/PR match. The exception does not cover every PR authored by the selected account. Session/project access, publisher identity checks, comment outcome logging and unconfirmed-write handling stay intact.
I also reuse the existing
getExecutionTimeoutMscontract. The GitHub tool declares its ten-minute dispatch budget for comment creation, and Codex honors declared tool budgets with completion grace. Parent cancellation and approval expiry stay in force for other targets.I ran pr-simplify without introducing another setting, state store or permission mechanism. Against the base, production changes are +75/-39 lines and tests are +122/-1 lines, plus the documentation update. The regression shares the existing publication fixture and covers both supported sources of the session PR.
Evidence
Live Gateway verification at
9419697b9aa8c0547bfbaaf969a8221b24ac8379An isolated OpenClaw Gateway with a real model exercised all three cases on November 27, 2026 UTC.
GitHub readback confirmed the posting account and one comment per case, with zero duplicate writes.
Automated checks
For the exemption, both new regressions failed without the change. AWS VM checks passed 131 focused tests across the publication action, comment, tool-description and Codex watchdog consumers. Formatting, targeted lint, core and test typechecks passed. The checks cover the session's published and selected PRs, other-target consent, and host/repository mismatches. GitHub transport is mocked in these regressions; they are not live-model proof.
Local autoreview remains unavailable because the selected Codex installation cannot execute inside its read-only review sandbox. I did not relax the sandbox.
Earlier live proof of the retained watchdog fix
I’m including the redacted real-Gateway Codex verification supplied by @daniel-lxs for head
9e9ec40:36395007cf0used a real model through Codex. The approval was system-cancelled after 89.998 seconds with 210 seconds remaining.90000mswatchdog result. With the fix, all 57 tests passed across both files.Cleanup: AWS test leases were released and prior proof scratch was removed. No Team Gateway configuration or consent setting was changed.
Contributor: Dan Riccio (@daniel-lxs).
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by
🦞 Made with OpenClaw