GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — fix(server): cached refs include a newly checked-out external branch by StiensWout · Pull Request #36626 · pingdotgg/t3code Conversation
Contributor
A branch created and checked out outside T3 Code could be missing from cached Overlay the freshly read current branch when its ref exists but is missing from the snapshot. Reuse ProofThe corrected bughunt reproduction was rerun against
This came from the T3 Code bughunt by GPT 6.1 Sol. Independent verifier Claude Opus 5.5 confirmed the effect using real Git and TestClock; the builder reproduced it again on current main. Web behavior is unproved; this PR makes no UI or data-loss claim. Scope and limitationsMedium size, fast lane: one driver behavior and its public-interface regression test, with derived metadata added to its private snapshot. No public contract, persistent storage, desktop code, or UI flow changes. The synthetic ref does not populate upstream metadata until snapshot refresh, matching the previous missing-ref limitation. General externally deleted/stale branches, external checkout races, and recovery from a failed branch-existence probe remain outside this fix. An unborn repository may need the ref-existence probe on each call. Council review
No blockers or should findings. Opus reviewed source only because its isolated checkout lacked dependencies; Sol independently ran focused tests. Nits above are deferred to preserve the ticket scope. No extra evidence or audit run under the fast lane. Created with GPT 6.1 Sol (lead and review) and Claude Opus 5.5 (build, trim and review) in T3 Code through the Codex and Claude harnesses. Closes #36625
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…Code listRefs overlaid the freshly read HEAD only onto branches already in the cached snapshot, so a branch created and checked out outside T3 Code went missing until the snapshot refreshed. The current branch is now listed as current even when the snapshot predates it, once HEAD has a commit. Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: GPT 6.1 Sol <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Snapshot and current-branch reconciliation apps/server/src/vcs/GitVcsDriverCore.ts, apps/server/src/vcs/GitVcsDriverCore.test.ts |
The snapshot includes the default branch. listRefs adds the current local branch when its ref exists but is missing from the snapshot; it does not add an unborn branch. The checkout-cache test covers switching to an existing branch and creating a new branch, and checks current-branch and worktree metadata. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers: juliusmarminge, only21mil
2a4afCached ref listings now include a branch that was created and checked out outside the app, and mark it current. The change is narrow and reversible, with regression tests covering it, so merge risk is minimal.
Explanation
The title names the main change: cached refs now include a newly checked-out external branch. It matches the raw summary and the PR objectives. It follows the conventional commit form and names the server scope. It is concise and specific.
Explanation
The description covers the problem, the change, scope and limitations, and verification. It also reports the reproduction against main, the focused test runs, and the reviewer notes. It does not follow the template's exact headings: it has no separate Problem, Change, Scope, or Verification headings, and it adds Proof, Scope and limitations, and Council review sections. The Scope section gives the scope but does not link a bug issue in that section. It does link Closes #36625 at the end. The verification section reports results but does not say which manual checks were run beyond the test commands. Most required information is present, so the check passes.
Explanation
Issue #36625 requires that a branch created and checked out outside T3 Code appear in a cached listRefs result and be marked current, without refresh. The head diff in apps/server/src/vcs/GitVcsDriverCore.ts adds currentBranchUnlisted: when the freshly read currentBranch is non-null and absent from snapshot.localBranches, branchExists is checked. If it returns true, a synthetic local VcsRef is prepended with current: true, isRemote: false, isDefault computed from the snapshot's defaultBranch, and worktreePath: worktreeRoot. The new defaultBranch field on GitRefsSnapshot is set from the already-computed value. Unborn HEAD yields no ref because branchExists is false, which keeps the unborn behavior. The test diff in GitVcsDriverCore.test.ts runs the existing cached-checkout test for both an existing branch and a newly created branch (switch -c), and asserts the current marker, that the previous branch is not current, and that it has no worktree path. The issue's expected behavior is covered. Test results were taken from the PR description; I did not run the tests. The issue's out-of-scope items (snapshot expiry, coalescing, stale branches) are unchanged.
Explanation
All changed hunks serve the #36625 objective. The GitVcsDriverCore.ts changes add the unlisted current-branch overlay and the private defaultBranch snapshot field it needs for isDefault. The test change extends the existing cached-checkout regression test to the new-branch case. No public contract, persistent storage, desktop, or UI files are changed in the reviewed diff. The PR description's limitations (no upstream metadata on the synthetic ref, no stale or race handling) are stated as non-goals and are not implemented as unrelated changes.
6c4eaccb-efb8-4802-8e1d-da9ecb9f33c3apps/server/src/vcs/GitVcsDriverCore.test.tsapps/server/src/vcs/GitVcsDriverCore.tsLimit details: You’ve used all 10 included reviews currently available.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
EvidenceWarm Environment: real Linux servers, fresh isolated homes, identical synthetic repositories, deterministic ACP agent using the real thread-scoped HTTP MCP credential. Images are transcript views, not web UI screenshots. Videos replay recorded responses at a readable pace; timestamp labels retain actual elapsed time.
Reproduction: ACP agent, seed setup, CLI driver, transcript renderer. Not shown:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…ingdotgg#36626) Co-authored-by: Julius Marminge <[email protected]> (cherry picked from commit 38b3fee)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[Bug]: Cached refs omit a newly checked-out external branch
There was an error while loading. Please reload this page.