Repository navigation
fix: authenticate GitHub project worktree preparation - #196889
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 changesCarries the selected GitHub credential through managed default-branch preparation while preserving partial-clone filtering and cached tracking refs. Example: Start a session for private repository https://github.com/example/private.git without selecting a base.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current credential handoff defect. All three previous findings are resolved, and this review found no new actionable defect. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway session preparation resolves a managed project, acquires its checkout lifecycle, authenticates native Git operations, and passes a pinned commit to managed worktree creation. flowchart TD
A[Session creation] --> B[Selected GitHub identity]
B --> C[Managed checkout lifecycle]
C --> D[Default base resolver]
D --> E[Authenticated Git transport]
E --> F[Shared objects and tracking refs]
F --> G[Pinned session worktree]
Technical reviewBest possible solution: Retain the existing identity, checkout-lifecycle, and default-ref owners, with authenticated transport supplying the pinned worktree commit. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the missing credential handoff, and the supplied before/after native Git/HTTP evidence exercises it; this read-only review ran no target code. Is this the best way to solve the issue? The patch repairs the credential handoff through existing owners and preserves canonical URL isolation, cached refs, filtering, and retry pinning without adding another state owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a575c7c60a79. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +77, Tests +74, Other +3. Total +154 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. 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 (1 earlier review cycle)
Reviewed November 10, 2026, 6:20 PM ET / 23:20 UTC (Revision 2). |
|
Addressed the review findings in c3dac39:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* test: align fallback and GitHub spawn fixtures with current contracts * fix: retain GitHub identity while preparing a project default worktree * test: explain owned Git authentication transport routing * fix: preserve project default filtering and source refs * test: isolate the fallback fixture repair
Adopt the original repair from #196487 while preserving its branch history. Carry forward the independently validated context reader, focused regression proof, documentation, and synthetic timing/allocation measurements. The final tree matches 68aac2c exactly. Keep the current admission and unrelated Gateway test repairs already landed through #196702 and #196889. No runtime source change was added in adoption. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
GitHub project sessions clone with the selected credential, then lose it while preparing their managed worktree's default branch. Private repositories receive unauthenticated branch requests.
User Impact
The selected GitHub identity now covers clone, refresh and default-base preparation. Retiring or replacing that identity blocks subsequent requests. Successful default selection updates the managed clone's tracking refs, including default-branch renames, so later offline reuse selects the last fetched commit. Partial clones retain their filter and promisor packs.
Why This Change Was Made
Default selection reuses the authenticated checkout lifecycle and registry identity. The existing default resolver owns cached refs and guarded compare-and-swap publication; its network operations receive clean Git metadata, the canonical URL and selected credential. The accepted worktree commit uses existing session fields.
The GitHub spawn fixture also reflects the existing contract that GitHub URL sessions use managed checkouts, including omitted or false worktree intent.
Evidence
The exact 74-line fixture allocation preserves the base's 17-line slack without changing its shared scalar. Hosted CI and a fresh hosted review are required for the published repair.