Skip to content

feat(lcm): recover evidence and search external history - #52

Merged
ScriptedAlchemy merged 12 commits into
mainfrom
fix/lcm-evidence-recovery
Nov 5, 2026
Merged

ScriptedAlchemy merged 12 commits into
mainfrom
fix/lcm-evidence-recovery

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Problem

T3 could offer incomplete or stale conversation-summary coverage, and a bounded handoff could lose the exact evidence needed to verify its summary. Handoffs also persisted a duplicate rendered transcript. Conversations created directly in Codex or exported from ChatGPT were unavailable to T3's history tools.

Changes

  • Preserve verified source IDs, digests and ranges in conversation summaries; catch up uncovered history, invalidate stale sources, and page source expansion without silently dropping evidence. Preserve the earlier WebSocket response contract and advertise the newer search/source capability.
  • Deliver complete selected handoff messages with a compact coverage/recovery receipt. The existing paged event compactor also removes older rendered duplicates only after proving an exact match to intact structured history; event and projection changes are transactional and preserve newer projections.
  • Add opt-in, environment-wide external history through the authenticated WebSocket API and the read-only t3_external_history MCP tool. Native Codex reads use enabled providers' configured shared Codex home, validate that home at handshake, deduplicate providers sharing it, and retry another reader only for unavailable/unsupported responses.
  • Add a streaming reader for explicitly configured ChatGPT export JSON files. It selects the current visible branch, searches full visible text before excerpting, rejects ambiguous/cyclic branches, and binds cursors to source/version/query. Exact source reads verify the complete normalized evidence digest and preserve Unicode boundaries.
  • Add web/desktop and mobile settings, source selection, literal search, archived Codex filtering, optional project filtering, continuation after empty pages, and exact evidence paging. Access/configuration changes clear displayed results. No imported runnable thread or persistent raw transcript mirror is created.

Validation

  • Required changed-file test selection: 741 tests passed across 28 files, including all six existing-data handoff compaction tests.
  • Native reader and Codex driver focused tests: 27 passed. Final external-history browser/mobile tests after the compiler adjustment: 2 passed.
  • All 40 affected package typechecks passed. The cached launcher could not initialize this container's seccomp supervisor; the exact affected set was checked uncached and single-threaded. A browser-fixture typing issue was corrected before the final eight-package continuation passed.
  • Native addon, unused patches, formatting, lint, both knip passes, and generated GraphQL checks passed. Two React Compiler failures in new settings handlers were corrected; their focused rerun passed, alongside the 14 earlier passing selected assertions. Final adjusted files passed lint/format and git diff --check.
  • Both new MCP cases build with the real tool catalog using --dry-run. No paid model evaluation or live authenticated Codex archive was used.
  • The earlier synthetic handoff fixture shrank from 13,596 to 7,754 encoded bytes. That is fixture payload size, not a production disk-space measurement.

Context budget and limits

The new MCP tool intentionally increases the measured tool-list JSON from 64,883 to 66,169 bytes (+1,286); the provider instruction budgets are unchanged. The committed budget matches the actual catalog.

External search is literal and paged. ChatGPT support reads configured exports, not a live cloud sync; reaching later exported conversations currently rescans the file prefix. Native evidence contains normalized visible text, diagnostic output and diffs rather than a raw rollout JSON dump.

T3 retains leaf summaries and bounded offered handoff groups. This does not claim hierarchical-compaction or archive-scale quality/performance parity with TraceDecay.

The repository's test-t3-app and test-t3-mobile skills require managed Browser/Device panel tools unavailable in this session. Automated component/browser checks passed, but live integrated client/device validation and before/after captures remain outstanding, so this PR remains draft. Live model evals also remain outstanding because no evaluation credentials are configured.

Implemented and reviewed with GPT-6 Astra Pro in ChatGPT.

@changeset-bot

changeset-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a699cfc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy changed the title fix(lcm): preserve complete evidence and resume summary catch-up feat(lcm): recover evidence and search external history Nov 3, 2026
ScriptedAlchemy and others added 7 commits November 3, 2026 14:02
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
…very

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main removed effect/Crypto, so the new history services and their tests move to Digest and NodeCrypto, and the toolkit test uses the in-process MCP layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…der switch tests

Provider handoff records now keep the compact coverage receipt in summaryText
and the intact evidence in history.messages; the delivered provider text is
rendered from history. Three ProviderSwitch cases still read the transcript
from summaryText or the handoff activity item.

The compact-legacy and legacy-replacement fixtures stripped history from a new
record, which produced a receipt-only record without history that no server
version writes. They now model a pre-history record with the rendered
transcript in summaryText, so the inline-delivery assertion stays unchanged.
The queued-Claude and imported-v1 cases now assert the item summary equals the
receipt, that the receipt omits the transcript, and that history.messages
carries the exact messages, alongside the unchanged provider-text assertions.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The tool reads raw Codex homes across projects, including sessions outside T3, which is broader than a delegated child needs. Also record that summaries cannot be rolled back to an older server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	packages/contracts/src/rpc.ts
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review November 5, 2026 00:18
@ScriptedAlchemy
ScriptedAlchemy merged commit fa42382 into main Nov 5, 2026
16 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the fix/lcm-evidence-recovery branch November 5, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant