Repository navigation
fix(pr): bridge split auth in Node CI dispatch - #124674
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 12:23 PM ET / 16:23 UTC. ClawSweeper reviewWhat this changesThe PR forwards credentials from an authenticated PATH Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: this is a distinct, current-main Node dispatch gap left by the merged shell-side split-auth repair, and the patch cleanly fixes it with no blocking findings. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw maintainer scripts use the PATH GitHub CLI for cached reads and a selected plain GitHub CLI for writes such as CI dispatch. This change supplies wrapper-held credentials only to that selected child process. flowchart LR
A[Maintainer CI command] --> B[PATH GitHub CLI wrapper]
A --> C[Plain CLI selector]
B --> D[Scoped token lookup]
C --> E[Selected plain CLI]
D --> E
E --> F[Actions CI dispatch]
F --> G[Exact-head workflow]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +63, Other +57. Total +120 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one canonical child-scoped bridge at the plain-CLI boundary; the positive production delta is warranted because both Node and shell owners must replace the former unscoped or missing handoff without adding configuration. Do we have a high-confidence way to reproduce the issue? Yes, from current source: a PATH-only authenticated wrapper and separate selected plain CLI reaches the dispatch write without a token on main; the exact-head test makes that write fail until the handoff exists. Is this the best way to solve the issue? Yes. The executor is the canonical write boundary, preserving PATH-wrapper reads and keeping credentials out of the caller environment; the shell sibling now follows the same rule. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2b8e94ea4dba. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Land-ready at What changed:
Evidence:
The earlier ClawSweeper Enterprise host-variable findings and rank-up test request are addressed on this head. Its current exact-head comment is still a review-started placeholder; no publisher result is being used as merge evidence. No product-runtime, provider, or channel proof gap applies to this internal maintainer-tooling change. |
602036c to
7711193
Compare
7711193 to
b8c6baf
Compare
|
Merged via squash.
|
What Problem This Solves
The split-auth repair in #124671 covered the shell helper but missed the Node executor used by
scripts/pr ci-dispatch. When only theghentry onPATHcan obtain credentials, the selected plain CLI still receives no token and workflow dispatch fails.Why This Change Was Made
The credential handoff now lives at the Node plain-CLI execution boundary used by CI dispatch. It asks the authenticated
PATHentry for a token only when no token environment already exists, forwards that value only to the selected plain CLI child, and leaves the caller environment unchanged. The shell path uses the same scoped behavior instead of exporting the token into the rest of the shell session. Tokens fetched for a non-publicGH_HOSTuse the CLI's Enterprise token variable in both implementations.This directly addresses the Node owner-boundary finding recorded on #124671 and the host-variable findings on this PR while retaining the already-landed REST compatibility work unchanged.
This PR is AI-assisted; the implementation and proof were reviewed before publication.
User Impact
Maintainers and automated workers can dispatch exact-head CI when authentication is supplied by a
PATHwrapper and writes use a separate full CLI. Existing explicit token environments, Enterprise hosts, and plain CLI configuration continue to work.Evidence
node scripts/run-vitest.mjs test/scripts/plain-gh.test.ts test/scripts/pr-ci-dispatch.test.ts— 16 tests passed, including a full dispatcher route that rejects the write unless credentials are forwarded and process-boundary cases for public and Enterprise hosts.node scripts/check-changed.mjs -- scripts/lib/plain-gh.mjs scripts/lib/plain-gh.sh test/scripts/plain-gh.test.ts test/scripts/pr-ci-dispatch.test.ts— formatting, script/test typechecks, lint, and repository guards passed.