GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): detect replaced transcripts with large file identities by juliusmarminge · Pull Request #21464 · pingdotgg/t3code

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions
@juliusmarminge
juliusmarminge added this pull request to stack #21465 October 19, 2026 03:25
@github-actions github-actions Bot added the vouch:trusted Author is trusted by repo permissions or the VOUCHED list. label Oct 19, 2026
@juliusmarminge
juliusmarminge marked this pull request as draft October 19, 2026 03:26
@juliusmarminge juliusmarminge changed the title terminal preview 12/windows inode scanner fix(server): detect replaced transcripts with large file identities Oct 19, 2026
@juliusmarminge juliusmarminge mentioned this pull request Oct 19, 2026
fix(contracts): preserve exact transcript file identities #21463
Merged
@github-actions github-actions Bot added the size:L 100-499 changed lines (additions + deletions). label Oct 19, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 19, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Oct 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Oct 19, 2026
@juliusmarminge
juliusmarminge force-pushed the terminal-preview-12/windows-inode-scanner branch from c336490 to aa53fbb Compare October 19, 2026 03:37
@github-actions 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
@juliusmarminge
juliusmarminge marked this pull request as ready for review October 19, 2026 03:52
@juliusmarminge juliusmarminge mentioned this pull request Oct 19, 2026
fix(server): replaced transcripts on Windows import instead of reading as already imported #20346
Closed
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: Passed 4
Check name Status Explanation
Title check Passed The title is concise, conventional, and clearly identifies the main fix: detecting replaced transcripts with large file identities.
Description check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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

  • Mode: Continue automatically
  • Reviewed files: 2
  • Charged: $0.50
  • View usage details

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Base automatically changed from terminal-preview-12/windows-inode-contract to main October 19, 2026 23:26
juliusmarminge added 7 commits October 19, 2026 16:26
@juliusmarminge
fix(server): detect replaced transcripts with large file identities
84d0ef1
Port of Zacharon’s PR #20346 for maintainer reconstruction and focused regression review.
@juliusmarminge
test(server): focus transcript file identity regressions
e0f5905
@juliusmarminge
refactor(server): isolate exact transcript filesystem access
060a3af
@juliusmarminge
test(server): cover exact Effect transcript file identities
3ff9ce4
@juliusmarminge
fix(server): preserve transcript identities through Effect filesystem
8b18d09
@juliusmarminge
test(server): expose unsafe legacy inode identity collisions
264b568
@juliusmarminge
fix(server): reread history with unsafe legacy file IDs
18bb059
@juliusmarminge
juliusmarminge force-pushed the terminal-preview-12/windows-inode-scanner branch from bd90edf to 18bb059 Compare October 19, 2026 23:26
@juliusmarminge
juliusmarminge merged commit 16e442b into main Oct 20, 2026
31 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge deleted the terminal-preview-12/windows-inode-scanner branch October 20, 2026 02:53
@incognitojam incognitojam mentioned this pull request Oct 28, 2026
feat(upstream): survey flags later upstream fixes to batch commits incognitojam/styal#1121
Merged
@olafura olafura mentioned this pull request Nov 7, 2026
test(features): ledger upstream T3 Code through 30d0138540 hal-c2/hal-c2#1125
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Session scanner marks a replaced transcript as already imported on Windows

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@juliusmarminge
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.