GeezerVison is showing github.com — fix(server): retained forks keep inherited shell item counts after source deletion by juliusmarminge · Pull Request #36657 · pingdotgg/t3code
Conversation
No change needed. The rework brief listed no items, so I watched PR #36657 instead. All 36 checks passed on 92bcfcb. Macroscope approved it (correctness and approvability) and left no line comments. CodeRabbit generated no actionable comments and rated merge risk Minimal. No finding rated high or above is open, so I stopped watching. The fix is unchanged: selectShellThreadRows has an includeDeleted option that only the fork-source walks in readShellSnapshotRows and getThreadShell use, so a retained fork keeps counting its inherited history after the source is deleted, while the deleted source stays out of the snapshot and getThreadShell on a deleted thread still returns null.
Fixes #36639
Reproduction on main
On origin/main 820f620: started T3CODE_DEV_SEED=0 vp run dev on a fresh database, added a scratch project with t3 project add, and ran t3 thread start --provider devReplay --model showcase --wait "alpha"; the run completed. In the web UI I opened that thread and clicked "Fork from this response". t3 thread list --json then listed the fork with itemCount 11. I deleted the source thread from its breadcrumb Thread actions menu (Delete, then Confirm). After that, t3 thread list --json (MCP t3_thread_list, shell read) listed the fork with itemCount 0, while t3 thread show <fork> (full projection) still reported itemCount 11 and returned the inherited user and assistant messages. The deleted source was correctly missing from the list. Store level: I extended the ProjectionStore.test.ts case 'keeps fork visible items stable after a source run is rolled back' to delete the source and compare getThreadShell and getShellSnapshot visibleItemCount with getThreadProjection for the direct and nested forks. It fails on main with expected 104, received 102, matching the report.
Evidence
Create a fresh scratch project and complete an alpha replay turn. Fork its response, delete the source through Thread actions > Delete > Confirm, wait for its row to disappear, then open the fork and compare CLI list/full-read counts. Both runs use Chromium at 1280×800, light theme, and fresh synthetic data. The labelled panel shows actual CLI observations.
Scenario driver. The comparison exited 0: failsOnBase=true, passesOnHead=true.
Not shown:
- Nested forks and the shell snapshot's numeric count were not separately captured; this scenario proves the reported direct-fork reproduction through the real web client and CLI list/full read.
Tests
No local runs this round (no code change). CI on 92bcfcb: all 36 checks passed. From the previous round: ProjectionStore.test.ts 59/59 passed, and vp run check:changed passed.
Not in this change
- getAgentAwarenessSnapshot also calls selectShellThreadRows but does not walk fork sources, so it is unchanged.
- CodeRabbit notes that the PR description's Evidence section is still marked pending. That belongs to the proof and PR steps, not this one.
Who did the work
- Written by Claude Opus 5.5, in Claude Code
- Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
- Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5
Run by the t3code factory in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
… deletion
Fails on main: getThreadShell and the shell snapshot skip a deleted fork
source, so visibleItemCount falls back to the fork's own items.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…urce deletion
The shell snapshot and getThreadShell walked a fork's run sources through
selectShellThreadRows, which skips deleted threads. A deleted source then
dropped out of the walk and the fork's visibleItemCount fell back to its
own items, while the full projection still counted the inherited history.
Source lookups now include deleted threads; the threads being listed are
still filtered, so a deleted source stays hidden.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Approvability
Verdict: Approved at 92bcfcb
Macroscope's review found this PR approvable — Retained forks now preserve inherited item counts when their source is deleted. Deleted source threads remain hidden from listings and direct shell lookups, and the change does not modify stored data.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Thread transfer impact
✅ Thread transfer remains within every enforced ceiling.
| Provider |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
Total thread wire |
5.0 KiB |
5.0 KiB |
0 B (0.0%) |
6.8 KiB |
✅ |
| Codex |
Thread snapshot wire |
3.8 KiB |
3.8 KiB |
0 B (0.0%) |
4.9 KiB |
✅ |
| Codex |
Live turn WebSocket wire |
1.2 KiB |
1.2 KiB |
0 B (0.0%) |
2.0 KiB |
✅ |
| Codex |
Live turn WebSocket decoded |
21.5 KiB |
21.5 KiB |
0 B (0.0%) |
24.4 KiB |
✅ |
| Codex |
Live turn messages |
1 |
1 |
0 (0.0%) |
8 |
✅ |
| Claude |
Total thread wire |
5.0 KiB |
5.0 KiB |
0 B (0.0%) |
6.8 KiB |
✅ |
| Claude |
Thread snapshot wire |
3.8 KiB |
3.8 KiB |
0 B (0.0%) |
4.9 KiB |
✅ |
| Claude |
Live turn WebSocket wire |
1.2 KiB |
1.2 KiB |
0 B (0.0%) |
2.0 KiB |
✅ |
| Claude |
Live turn WebSocket decoded |
21.9 KiB |
21.9 KiB |
0 B (0.0%) |
24.4 KiB |
✅ |
| Claude |
Live turn messages |
1 |
1 |
0 (0.0%) |
8 |
✅ |
Other scenarios
All 64 scenario measurements match main.
All 64 scenario measurements
| Provider |
Scenario |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
short turn resume |
WebSocket decoded |
10.5 KiB |
10.5 KiB |
0 B (0.0%) |
12.7 KiB |
✅ |
| Codex |
short turn resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Codex |
long turn running, cold open |
HTTP decoded |
281.7 KiB |
281.7 KiB |
0 B (0.0%) |
302.7 KiB |
✅ |
| Codex |
long turn running, cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Codex |
long turn running, history page |
HTTP decoded |
92.4 KiB |
92.4 KiB |
0 B (0.0%) |
107.4 KiB |
✅ |
| Codex |
long turn running, history page |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Codex |
long turn finished, cold open |
HTTP decoded |
381.5 KiB |
381.5 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Codex |
long turn finished, cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Codex |
long turn finished, socket cold open |
WebSocket decoded |
381.6 KiB |
381.6 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Codex |
long turn finished, socket cold open |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Codex |
long turn finished, socket cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Codex |
long turn finished, work page |
HTTP decoded |
186.2 KiB |
186.2 KiB |
0 B (0.0%) |
200.2 KiB |
✅ |
| Codex |
long turn finished, work page |
rows |
150 |
150 |
0 (0.0%) |
150 |
✅ |
| Codex |
idle thread resume |
WebSocket decoded |
65 B |
65 B |
0 B (0.0%) |
200 B |
✅ |
| Codex |
idle thread resume |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Codex |
fleet shell snapshot |
HTTP decoded |
42.4 KiB |
42.4 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Codex |
fleet shell snapshot |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Codex |
fleet shell subscribe |
WebSocket decoded |
65 B |
65 B |
0 B (0.0%) |
200 B |
✅ |
| Codex |
fleet shell subscribe |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Codex |
fleet shell resume check |
HTTP decoded |
18 B |
18 B |
0 B (0.0%) |
100 B |
✅ |
| Codex |
fleet shell resume check |
rows |
0 |
0 |
0 |
0 |
✅ |
| Codex |
stale shell reload |
HTTP decoded |
42.4 KiB |
42.4 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Codex |
stale shell reload |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Codex |
stale shell resume |
WebSocket decoded |
140 B |
140 B |
0 B (0.0%) |
400 B |
✅ |
| Codex |
stale shell resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Codex |
stale todo list cold open |
HTTP decoded |
72.4 KiB |
72.4 KiB |
0 B (0.0%) |
83.0 KiB |
✅ |
| Codex |
stale todo list cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Codex |
stale todo list cold open |
nodes |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Codex |
stale todo list cold open |
subagents |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Codex |
stale todo list cold open |
plans |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Codex |
stale todo list cold open |
providerTurns |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Codex |
stale todo list cold open |
checkpoints |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Claude |
short turn resume |
WebSocket decoded |
10.6 KiB |
10.6 KiB |
0 B (0.0%) |
12.7 KiB |
✅ |
| Claude |
short turn resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Claude |
long turn running, cold open |
HTTP decoded |
283.3 KiB |
283.3 KiB |
0 B (0.0%) |
302.7 KiB |
✅ |
| Claude |
long turn running, cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Claude |
long turn running, history page |
HTTP decoded |
93.4 KiB |
93.4 KiB |
0 B (0.0%) |
107.4 KiB |
✅ |
| Claude |
long turn running, history page |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Claude |
long turn finished, cold open |
HTTP decoded |
384.2 KiB |
384.2 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Claude |
long turn finished, cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Claude |
long turn finished, socket cold open |
WebSocket decoded |
384.3 KiB |
384.3 KiB |
0 B (0.0%) |
410.2 KiB |
✅ |
| Claude |
long turn finished, socket cold open |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Claude |
long turn finished, socket cold open |
rows |
151 |
151 |
0 (0.0%) |
151 |
✅ |
| Claude |
long turn finished, work page |
HTTP decoded |
188.1 KiB |
188.1 KiB |
0 B (0.0%) |
200.2 KiB |
✅ |
| Claude |
long turn finished, work page |
rows |
150 |
150 |
0 (0.0%) |
150 |
✅ |
| Claude |
idle thread resume |
WebSocket decoded |
66 B |
66 B |
0 B (0.0%) |
200 B |
✅ |
| Claude |
idle thread resume |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Claude |
fleet shell snapshot |
HTTP decoded |
43.0 KiB |
43.0 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Claude |
fleet shell snapshot |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Claude |
fleet shell subscribe |
WebSocket decoded |
66 B |
66 B |
0 B (0.0%) |
200 B |
✅ |
| Claude |
fleet shell subscribe |
WebSocket messages |
1 |
1 |
0 (0.0%) |
1 |
✅ |
| Claude |
fleet shell resume check |
HTTP decoded |
18 B |
18 B |
0 B (0.0%) |
100 B |
✅ |
| Claude |
fleet shell resume check |
rows |
0 |
0 |
0 |
0 |
✅ |
| Claude |
stale shell reload |
HTTP decoded |
43.0 KiB |
43.0 KiB |
0 B (0.0%) |
53.7 KiB |
✅ |
| Claude |
stale shell reload |
rows |
27 |
27 |
0 (0.0%) |
27 |
✅ |
| Claude |
stale shell resume |
WebSocket decoded |
140 B |
140 B |
0 B (0.0%) |
400 B |
✅ |
| Claude |
stale shell resume |
WebSocket messages |
2 |
2 |
0 (0.0%) |
2 |
✅ |
| Claude |
stale todo list cold open |
HTTP decoded |
73.4 KiB |
73.4 KiB |
0 B (0.0%) |
83.0 KiB |
✅ |
| Claude |
stale todo list cold open |
rows |
75 |
75 |
0 (0.0%) |
75 |
✅ |
| Claude |
stale todo list cold open |
nodes |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Claude |
stale todo list cold open |
subagents |
2 |
2 |
0 (0.0%) |
4 |
✅ |
| Claude |
stale todo list cold open |
plans |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Claude |
stale todo list cold open |
providerTurns |
1 |
1 |
0 (0.0%) |
2 |
✅ |
| Claude |
stale todo list cold open |
checkpoints |
1 |
1 |
0 (0.0%) |
2 |
✅ |
Baseline: 5958d00 · PR result: 92bcfcb · Source CI: success
Scenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 14, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Shell ancestry lookups can include deleted source threads. A regression test checks that deleted sources remain absent from shell snapshots and that retained forks’ shell visible-item counts match their projections.
Changes: Fork shell ancestry
| Layer / File(s) |
Summary |
Shell ancestry lookup and regression coverage apps/server/src/orchestration-v2/ProjectionStore.ts, apps/server/src/orchestration-v2/ProjectionStore.test.ts |
The shell-row selector can include deleted threads when requested. Fork ancestry lookups enable this for source threads while keeping the requested thread subject to the default filter. The regression test checks source omission and retained fork counts against projected visible-item counts. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers: yash-singh1, t3dotgg, shivamhwp
Merge Risk: Minimal · up to 92bcf
-
Retained forks now count inherited visible history in shell reads after their source thread is deleted, and deleted sources remain hidden. The change is narrow, has a regression test, and shows no concrete merge risk.
Pre-merge checks: 3 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Description check |
 |
The description does not follow the repository template. It has no Problem, Change, Scope, or Verification headings. It cites a linked issue (#36639) and gives reproduction and verification detail, so… |
Restructure the description under the template headings: Problem, Change, Scope, and Verification. Move the opening 'No change needed' and rework-brief narrative out of the description. Under Problem, state the bug in one or two sentences w… |
Passed checks: 3 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the fix (retained forks keep inherited shell item counts after source deletion), which matches the changeset: shell-row lookups that walk fork run sources now include deleted sources, … |
| Linked Issues check |
 |
Issue #36639 requires that a retained fork's shell visibleItemCount include inherited visible history after its source thread is deleted, matching the full projection, while the deleted source stays h… |
| Out of Scope Changes check |
 |
The change touches only apps/server/src/orchestration-v2/ProjectionStore.ts and its test file ProjectionStore.test.ts. Per the summary, the includeDeleted option is used only for fork-source lookups i… |
Full details: Title check
-
Explanation
The title names the fix (retained forks keep inherited shell item counts after source deletion), which matches the changeset: shell-row lookups that walk fork run sources now include deleted sources, so visibleItemCount includes inherited history. It uses the conventional commit format with a specific scope. It is concise and does not cover every detail, which is acceptable.
Full details: Linked Issues check
-
Explanation
Issue #36639 requires that a retained fork's shell visibleItemCount include inherited visible history after its source thread is deleted, matching the full projection, while the deleted source stays hidden. The change adds an includeDeleted option to selectShellThreadRows. readShellSnapshotRows and getThreadShell enable it only when loading fork-source threads, so deleted sources enter statesByThreadId and the inherited-history count. Target rows stay filtered, so a deleted source stays out of the snapshot and getThreadShell on a deleted thread still returns null. The ProjectionStore.test.ts case 'keeps fork visible items stable after a source run is rolled back' is extended to delete the source and compare getThreadShell and getShellSnapshot visibleItemCount with getThreadProjection for direct and nested forks. The PR description reports that this test fails on main (expected 104, received 102) and passes with the fix (59/59). Limitation: the ProjectionStore.ts text diff could not be read (changed blobs unavailable in checkout, and the file read was truncated). The implementation is established from the whole-PR summary and the reported test evidence, not from a direct code read.
Full details: Out of Scope Changes check
-
Explanation
The change touches only apps/server/src/orchestration-v2/ProjectionStore.ts and its test file ProjectionStore.test.ts. Per the summary, the includeDeleted option is used only for fork-source lookups in readShellSnapshotRows and getThreadShell. The run, item-count and per-run count queries are unchanged, and getAgentAwarenessSnapshot is explicitly left unchanged. Each modification supports issue #36639. No unrelated change is evident. The PR description and summary contain no regex or parser additions. The text diff of ProjectionStore.ts was not directly readable, so this verdict relies on the summary and the PR description.
Full details: Description check
-
Explanation
The description does not follow the repository template. It has no Problem, Change, Scope, or Verification headings. It cites a linked issue (#36639) and gives reproduction and verification detail, so the content overlaps several template sections. Scope is partly covered, since it links the bug issue, but it does not address the feature-versus-bug rule explicitly. Verification is detailed, with local test results and CI status. The 'No change needed' opening and the rework-brief and watching history are off-template material. The description also includes process and authorship details the template does not request. Most of the required information is present, but its structure does not match the template.
Resolution
Restructure the description under the template headings: Problem, Change, Scope, and Verification. Move the opening 'No change needed' and rework-brief narrative out of the description. Under Problem, state the bug in one or two sentences with expected behavior. Under Change, explain the includeDeleted option and why the fork-source walks need it. Under Scope, link issue #36639 and confirm it is a bug fix. Under Verification, keep the focused ProjectionStore test results and the reproduction steps. Remove the stale pending-Evidence note, and either embed or link the screenshots and recordings from the template's UI section. Keep the model and harness attribution at the end, as the template asks.
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 5958d00 and 92bcfcb.
Files selected for processing: 2
-
apps/server/src/orchestration-v2/ProjectionStore.test.ts
apps/server/src/orchestration-v2/ProjectionStore.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|