Repository navigation
fix: start Gateway investigations with user auth on one tracker - #1847
Conversation
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR separates Agent Tasks authentication from repository authentication and consolidates investigation state and health on the permanent tracker. Example: The enabled monitor investigates the question-answer candidate on tracker 1829.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: current main still has the authentication defect, and the reviewed change has no actionable source findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe GitHub Actions monitor turns validated upstream capability evidence into tracker state and a reserved Agent Tasks request, then records task progress and trusted dispositions. flowchart TD
A[Scheduled or publication event] --> B[Validate capability evidence]
B --> C[Permanent tracker state]
C --> D[Check existing work and reserve]
D --> E[Recheck tracker authority]
E --> F[User authenticated Agent Tasks client]
F --> C
Technical reviewBest possible solution: Land the separate-client repair and consolidated tracker state, then perform the owner-recorded deployment check and reservation-safe legacy issue consolidation. Do we have a high-confidence way to reproduce the issue? Current main passes a personal header through the workflow-authenticated client; the discussion records reproduction of its overwrite using real Octokit and the github-script bundle, consistent with the failed hosted handoff. Is this the best way to solve the issue? A separately authenticated client fixes the auth owner directly, and the maintainer-approved consolidation removes candidate-issue creation while preserving durable reservations and legacy blockers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ef05d53a7739. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes: No label 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 (3 earlier review cycles)Reviewed October 23, 2026, 1:46 AM ET / 05:46 UTC (Revision 4). |
|
Current-head proof and review disposition for
The token choice is explicit maintainer direction: reuse the existing personal CLI credential for now. The monitor restricts its own target, not the account's token-wide GitHub permissions. Making a new task in another repository or revoking that working credential is not authorized proof and is not needed to change the client-auth owner. GitHub service-side credential revocation remains GitHub's contract; we do not claim to have tested revocation. A genuine configured-secret The review found no definite introduced source bug. The migration and authentication evidence is now in the PR body; please reassess the proof-specific holds on that basis. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Added the requested same-owner HTTP authority proof on unchanged head The actual
All four cases created zero issues. Every issue PATCH used workflow authentication; every task request used personal authentication. The three negative mutations happen on the second task-list HTTP request, after reservation and before the final reread/POST. This directly exercises the final-effect boundary requested in the latest review. No production issue/task writes occurred: credentials, event metadata and mutable service state were synthetic. This is not a claim of a hosted Copilot task. Real configured-secret kickoff remains the immediate post-deployment check, because the workflow intentionally permits it only on the default branch. Source and scope are unchanged; PR body now includes this proof. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes Copilot handoff returning
401 user_context_requireddespite a valid configured user token, and removes the separate investigation-issue architecture.Related: #1829. Follow-up to #1692 (feat: monitor upstream Gateway protocol changes nightly).
User Impact
One permanent issue, #1829, owns candidate fingerprints, task reservations/IDs, dispositions and monitor health. No new candidate or health issues. Human notes remain untouched; unchanged acknowledged findings do not launch nightly tasks.
Why This Change Was Made
Octokit's auth hook overwrites request-level Authorization headers. Agent Tasks calls now use a separately authenticated client while repository writes retain
GITHUB_TOKEN. Task creation retains no-retry semantics and durable reservation checks.Evidence
The original configured secret failed in run 39901023031, while direct access with the exact uploaded credential returned HTTP 200. Loopback proofs with real Octokit v7 and the actual
actions/github-script@v9bundle reproduced the old header overwrite and verified the injected client factory sends personal auth, keeps issue auth separate, and sends a failing task POST exactly once. All proof credentials were synthetic.Change Type
Scope
Required proof pools
none: GitHub workflow/Node monitor changes only; no native app, installer, MXC or device behavior changed. Mandatory Windows build/Shared/Tray closeout is tracked below.Validation
node --test .github/scripts/upstream-gateway-protocol.test.cjs .github/scripts/gateway-capabilities.test.cjs: 57 passed, 0 failed/skipped; auth regression fails against the original workflow for the missing separate client../build.ps1: passed in Windows 11 ARM64 isolated snapshot (before final JS-only review fixes); prerequisites passed.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4,639 passed, 3 failed, 27 skipped. Host failures: missing symlink privilege and twopwshresolution cases.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: blocked, compilation exhausted VM disk. No executed-test claim../scripts/validate-docs.ps1: passed as part of the Windows full build.Real behavior proof
6b37b42f4; no native application source changed.actions/github-script@v9executed current productionpublish()thenhandoff()through its real configured Octokit clients against a loopback HTTP fixture. Allowed case: exactly 1 task POST and persisted task ID. Tracker closed/reassigned or reservation replaced after durable reservation: 0 task POSTs in each case. All issue writes carried workflow auth; all task traffic carried personal auth; 0 new issues. Credentials and workflow event metadata were synthetic, immutable source responses were captured, and npm schema download/validation remained real. This is transport proof, not a hosted task claim.Security Impact
retries: 0. No automatic POST retry. Lost responses keep their reservation and require reconciliation.Compatibility and Migration
After deployment, consolidate #1845 into #1829 only after confirming it has no task/reservation. Mark its closure as migration, not an acknowledged finding; retain the old evidence/comments. Closed legacy acknowledgments remain respected, and unresolved legacy reservations block duplicate work.
Review Conversations