GeezerVison is showing github.com — fix(server): detect replaced transcripts with large file identities by juliusmarminge · Pull Request #21464 · pingdotgg/t3code
Conversation
Windows file IDs can exceed JavaScript’s safe-integer range. The scanner converted Effect’s exact bigint inode to Number, so adjacent IDs could collide and a same-path, same-size, same-timestamp replacement was incorrectly treated as already imported. Preserve the ID as a decimal string and normalize legacy numeric IDs only for comparison. Existing handle-bound reads and the completed-history shortcut remain in use.
Top layer of the maintainer takeover of #20346 by @Zacharon; contract compatibility is in #21463. Removed the original native fallback and its ABA workaround: current Effect already supplies exact bigint stat/fstat and reads from the same opened handle. No new filesystem service or diagnostic suppression remains.
Validation at bd90edff1c:
- 84 → 84 passing tests across the existing scanner and importer suites (83 + 1). Replaced the original 250-line combined regression with one focused replacement/backfill flow and reused the numeric/provider shortcut test; no new test files. The takeover first split three cases, then removed two that covered existing handle behavior.
- The fixture uses real files, renames and reads, with adjacent bigint IDs injected through Effect stat and opened-file stat. Reverting String to Number fails: expected Importable/replaced-session, received AlreadyImported/original-session with a rounded ID. Restoring the fix passes. Unsafe numeric and null records backfill once; safe numeric records remain compatible, and unchanged exact records avoid open/read.
- Scoped server/contracts typechecks, changed-file lint/format and diff checks pass.
- Round 1 found the unnecessary native adapter and a fixture that missed the actual normal-path bug. Both are corrected; Round 2 found unsafe numeric legacy IDs could still collide with an exact replacement ID; the existing flow failed before the safe-integer guard and passes afterward. Round 3 returned no code findings from both independent reviewers. CI also caught missing consumer type compatibility in the bottom layer; that type-only adjustment now belongs to the bottom and both layers pass independently. The layer-order correction preserved the complete tree; the subsequent legacy precision guard changes only the top layer.
- The repository’s focused Windows scanner/importer test lane passed on this head. This verifies the suites on Windows; real production NTFS replacement acceptance remains unverified.
- Macroscope’s current-head correctness check passed, but its approvability check requires human review because identity comparisons decide whether transcript processing is skipped.
- Nonvisual server behavior: no screenshots apply. The regression fixtures use simulated NTFS IDs on real files; real Windows/NTFS replacement acceptance, macOS and packaged Electron are not verified. Existing clients and connection modes share this server path; native iOS/Android execution was not performed.
- Downgrading to an older server after string IDs are persisted loses the completed-history shortcut for those records and rereads transcripts; it does not create duplicate threads.
Model and harness: GPT-6.1-Sol via Codex in T3 Code; tests GPT-6-Astra; independent reviews Claude Opus 5.5 and GPT-6-Sol.
Fixes #14838
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
juliusmarminge
changed the title
terminal preview 12/windows inode scanner
fix(server): detect replaced transcripts with large file identities
Oct 19, 2026
Approvability
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — The PR is a focused fix for preserving large filesystem identities and includes targeted regression coverage. Human review is warranted because the identity comparison controls whether transcript processing is skipped or performed.
No code changes detected at 18bb059. Prior analysis still applies.
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 |
20.9 KiB |
20.9 KiB |
0 B (0.0%) |
29.3 KiB |
✅ |
| Codex |
Live turn messages |
2 |
2 |
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.2 KiB |
21.2 KiB |
0 B (0.0%) |
29.3 KiB |
✅ |
| Claude |
Live turn messages |
2 |
2 |
0 (0.0%) |
8 |
✅ |
Baseline: a64e045 · PR result: 18bb059 · 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.
github-actions
Bot
added
size:XS
0-9 changed lines (additions + deletions).
size:S
10-29 changed lines (additions + deletions).
and removed
size:S
10-29 changed lines (additions + deletions).
size:XS
0-9 changed lines (additions + deletions).
labels
Oct 19, 2026
coderabbitai
Bot
commented
Oct 19, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
7f01dc92-967b-4a60-999e-13b63da81cb7
📥 Commits
-
Reviewing files that changed from the base of the PR and between bd90edf and 18bb059.
📒 Files selected for processing: 2
-
apps/server/src/project/AgentSessionScanner.test.ts
apps/server/src/project/AgentSessionScanner.ts
Limit details: You’ve used all 10 included reviews currently available.
📝 Walkthrough
-
The scanner now stores transcript inode identities as strings and compares normalized string values. Tests cover large inode values, replacement transcripts, provider mismatches, legacy identifiers, and one-time backfilling.
Changes: Transcript Identity Matching
| Layer / File(s) |
Summary |
String-based inode comparison apps/server/src/project/AgentSessionScanner.ts |
Transcript identity creation stringifies inode values. Identity comparison rejects unsafe numeric inode values and compares normalized inode strings. |
Identity matching and legacy backfill tests apps/server/src/project/AgentSessionScanner.test.ts |
Tests cover matching legacy numeric inodes, provider mismatches, replacements with unchanged size and modification time, large inode values, and one-time backfilling of null or rounded legacy identifiers. |
Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Suggested reviewers: t3dotgg
Merge Risk: ⚪ Minimal · up to 18bb0
-
The reviewed change has no identified merge-blocking issue. Real Windows replacement behavior has not been verified end to end.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title is concise, conventional, and clearly identifies the main fix: detecting replaced transcripts with large file identities. |
| Description check |
 |
The description clearly explains the problem, the implementation, scope, compatibility considerations, and detailed verification results. It does not use the template headings and does not include an … |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Description check
-
Explanation
The description clearly explains the problem, the implementation, scope, compatibility considerations, and detailed verification results. It does not use the template headings and does not include an explicit maintainer approval comment, but it provides sufficient information for this focused bug fix.
✨ Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
Note This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Port of Zacharon’s PR #20346 for maintainer reconstruction and focused regression review.
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
macroscope-review
Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews
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.
|