Skip to content

Let commit destinations acquire and publish their saved viewport - #1299

Merged
trissim merged 2 commits into
mainfrom
fix/unfocused-history-return
Oct 29, 2026
Merged

trissim merged 2 commits into
mainfrom
fix/unfocused-history-return

Conversation

@trissim

@trissim trissim commented Oct 28, 2026 •

Copy link
Copy Markdown

Source checkpoint: 2 commits, 3 files, +65/-82; saved-row preparation classes 4 → 2

Give the existing CommitPlan family ownership of transcript acquisition and rendering. Following the tail acquires the latest saved destination directly; a deliberately older reader keeps its held viewport. This removes interval-sized forward acquisition from the tail path. It is not a demonstrated fix for the original long-unfocused delayed-burst report.

1. Read destination belongs to the same plan as rendering

Before

  • CanonicalSourcePublication.read_past_history always supplied after=history.page_source.through, independently of viewport intent.
  • Both observed-source/return updates and commit snapshots used that forward acquisition.
  • Only afterward did FollowTailCommit decide how to draw. page.has_newer requested another commit, allowing a tail return to walk the accumulated interval.

After

  • CanonicalSourcePublication captures one existing CommitPlan; CommitPublication inherits that capture.
  • Both update and snapshot callers invoke plan.read_snapshot.
  • FollowTailCommit.read_snapshot supplies no after cursor: Core's existing newest-first traversal acquires its captured latest saved page/cut.
  • RetainViewportCommit.read_snapshot owns forward acquisition for its existing saved source, including the existing TranscriptChanged fallback. Its metadata-only render action does not reposition the held reader.

No guessed latest cursor, new cache, timer, queue, state or codec. Core still owns and returns the actual read identity/cut.

Formal ownership: IMPL-5; fact = source-read destination for captured viewport intent; at = old transcript_publication.py:231 versus committed_presentation.py:339; derive = base-method/subclass; by = CommitPlan.read_snapshot, FollowTailCommit, RetainViewportCommit. The shared unconditional forward decision is deleted, not moved to another coordinator.

2. Publish the page already acquired; delete the second read path

Before:

PreparedCommit                         # metadata-only retained reader
└── PreparedSourceCommit               # shared row operation
    ├── PreparedAdvanceCommit          # prepares a page, then ignores it
    │   └── CommittedHistory.advance_committed → extend/read/jump
    └── PreparedPageCommit             # existing destination replacement

After:

PreparedCommit                         # metadata-only retained reader
└── PreparedPageCommit                 # captured destination + shared handoff
    └── PreparedReplacementViewportRequest → existing bounded viewport preparation

Delete PreparedAdvanceCommit, its single-child abstract preparation layer, the forwarding publish methods, and the 20-line CommittedHistory.advance_committed path. The acquired prepared page now reaches the existing replacement-viewport owner; additional older-page reads remain governed by that owner's viewport/presentation budget, not the hidden interval.

The same-history branch in CommitPlan.prepare derives exact required wire coverage once for both leaves, from page events, already-covered saved history and the returned cursor's covers_incoming(sequence) proof. Native input IDs and outgoing message references are not inferred from a latest cursor: their existing exact evidence/claims remain intact. Remove the unused preparation callback and impossible nullable prepared-result branch.

3. Preserve source, live-block and reader obligations

Unchanged owners/checks:

  • original applied-cohort capture, native_current, source_bound, current binding/generation and native pump join;
  • bounded re-read at the certified source bound using the acquired identity;
  • NativeCommitEvidence, exact started-native-input/outgoing/wire claims and retirement recheck;
  • protected blocks and visible retained-reader retirement restrictions;
  • CommitTranscript live-block handoff and publication-current callback;
  • actual saved source replacement, older-gap paging and latest destination's scroll-revision fence.

Rows are published through the existing PreparedReplacementViewportRequest/LatestPosition owner. The retained-reader member continues using retain_committed, without drawing or moving its page window.

Source evidence and verification

  • Before-edit NRA SourceModule/ModuleSyntaxIndex/class projection: 1,169 Core/Toad/installed-Textual production modules, 8,278 original classes, 0 parse failures. Lexical declarations, bases, imports/writes/checks/call sites were retained; dynamic resolution is not proved. This was the pre-edit dependency snapshot. The updated installed-pair observations are recorded below, not inferred from this lexical map.
  • Targeted reproof finds exactly the three intended source files changed against the retained corpus, no missing paths. Original cohort/source/retirement/protected-block methods are unchanged; preparation capture moved from PreparedSourceCommit to PreparedPageCommit with identical source body.
  • Whole-tree source/test/tool search finds no remaining PreparedSourceCommit, PreparedAdvanceCommit, advance_committed or read_past_history consumers.
  • Four fresh source import entry orders pass: transcript_publication, transcript_history, committed_presentation, toad.app. Both plan members are concrete; prepared-page dataclass fields remain history, sequences, page.
  • git diff --check passes. No tests or local ratchets run.
  • Rebased onto installed Toad 8e8c962e: pushed candidate 5e587198868e9b38d80591b6eb6628f66129177f. git range-diff reports the original patch unchanged. Main's arrival-reveal behavior is retained. Updated installed-source census: 1,178 modules / 8,332 classes / 0 parse omissions.

Type-contract correction after the accepted read-only run

Current pushed head a657cf7, rebased onto current main. Hosted debt job123284967781 exposed one introduced constructor error at old committed_presentation.py272: capture(history: CommittedHistory) passed a possibly projected history into PreparedPageCommit(history: TranscriptHistory).

BoundView.history already supplies the main TranscriptHistory; ConversationHistory.show_newest belongs to that main-history capability, not ProjectedTranscriptHistory. Narrow the complete preparation/capture chain: PreparedPageCommit.capture, CommitPlan.prepare, abstract CommitPlan.extend, and both leaf extend declarations. Keep metadata-only PreparedCommit.history: CommittedHistory broad. No cast, ignore, checker-budget edit, or movement of replacement behavior into projected histories. Capture returns Self.

Retained NRA source map/reproof covers19classes/66methods in this family; all function bodies are identical before/after the annotation correction. Real app import and dataclass field inspection pass; diff check passes. No tests, local ratchets, provider or UI rerun for this type-only correction. Exact hosted type verdict remains with the normal PR checks. The unchanged baseline diagnostic at old line241 is not claimed repaired.

Actual large-source application qualification

The following actual runs used qualified source head 5e58719 (accepted by integration owner4673); the later annotation-only correction does not restamp these artifacts as a new run. Candidate source on installed Core acdac6e6e881 / Textual e7a48c59, not an installed-candidate claim:

  • Real st on an owned isolated display; all three private XDG directories; genuine 624,645,129-byte saved native source exposed through original.session_file.bound_to(copied.root) → BoundExternalSession. No journal/auth copy, provider input, or managed start.
  • Actual CoordinationTranscriptReader.read(request) instrumentation records original requests and returned page/identity cuts, without changing either. Tail reads request no after; the actual latest snapshot contains 17 events, has_newer=false, native offset 624645129 / wire sequence 4645. Tail return again requests no after.
  • A deliberately held reader returns with the same visible passage and position: 149 / 320, follows_tail=false, before and after hiding. Its actual read supplies after at the mounted source frontier. A real before-cursor older-page read returns 25 events; End restores 320 / 320, follows_tail=true. Screenshots inspected separately from IPC metadata.
  • Normal quit exit 0 and private root retired; no matching readable user-process borrowers. Permission omissions: PIDs 902, 1090, 4499.
  • Initial IPC completions were 1,994 / 1,886 ms, including observer/startup work. Return IPC completions were 42–58 ms. These are not scan attribution, paint latency, or the fixed performance scenario. No 16 ms claim or performance-series row.
  • Source did not grow during this run. Thus no hidden-native-arrival, pending-live-block concurrency, original delayed-burst, or candidate fresh-reply proof is claimed. Original coverage/retirement fences remain source-equivalent.
  • Evidence: /home/ts/.cache/agent-scratch/latency-history/unfocused-installed-result.json, unfocused-installed/{ipc.jsonl,actions.jsonl,*-state.json,*.png,exit.json}.
  • Current installed-dependency pair also checked separately: Core acdac / Toad base8e8 / Textual 79a8a6d6, runtime core-acdac6e6e-lock-1161b67df97a8b4e. The earlier helper/root had already exited before the repeat install; no input was uncertain or replayed. Real read-only source starts at 624,674,079 bytes. Tail return requests no after (actual IPC35/38ms); held return requests its actual mounted frontier and preserves 155 / 313, follows_tail=false (IPC45/44ms). Older paging and End work in inspected screenshots; End returns to 140 / 140, follows_tail=true in the bounded latest window. Ordinary quit exit0, CheckRoot retired, zero provider input. The original producer appended15,948bytes late after these return phases, so this still is not hidden-arrival/burst proof. Full original requests/results and actual paint live under unfocused-installed-current/; scope/result: unfocused-installed-current-result.json. No fixed-scenario frame/input latency or16ms claim.

Earlier setup failures are retained: a foreign-runtime attachment refusal; a relative location serialized before destination binding (fixed by binding before serialization); its expired root refusing the late repair. No uncertain input was replayed. Earlier baseline older006 remains UNKNOWN with its missing private-store backup disclosed, never claimed preserved.

Assumed / still owed

  • Core's existing no-after read remains newest-first with its returned identity/cut and output-page budgets; a page output budget is not a hard bound on filtered input scanning.
  • Existing viewport preparation supplies destination lookbehind and preserves older-source access; the inspected application run covers read-only saved history, not every concurrent native-retirement state.
  • No claim that native forward acquisition explains every channel delay. Prior channel evidence already separates observed source cut from painted range.
  • A tiny copied-agent reply is not large-history performance evidence. The actual scale observation above uses the supported read-only genuine source and distinguishes IPC cuts from paint. The original affected tab and delayed-burst cause remain unknown. Merge, candidate installation, and any additional live acceptance remain with the integration owner.

prepare a page, throw it away, read another page
the old tail path brought its own archaeology department

Copilot AI balanced review requested due to automatic review settings October 28, 2026 06:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim force-pushed the fix/unfocused-history-return branch from d93d35b to 5e58719 Compare October 29, 2026 05:39
@trissim
trissim force-pushed the fix/unfocused-history-return branch from 5e58719 to a657cf7 Compare October 29, 2026 06:01
@trissim
trissim merged commit 6d83f98 into main Oct 29, 2026
2 of 3 checks passed
@trissim

trissim commented Oct 29, 2026

Copy link
Copy Markdown
Author

Installed acceptance reviewed on Core782ed77a / Toad6d83f98a / Textual79a8a6d6. All three installed repair files match the reviewed source.

  • One fresh copied-agent DM received a real configured SOL6.1 final answer: one successful read, all20numbered items, completed/succeeded at attempt1. No replay.
  • The captured UI had switched to CommsScreen before the native input committed; the answer then appeared on agent-tab return. Held reader position126/134 survived tab return. Paging, End and normal quit passed.
  • VimNormal/draft/caret preservation passed in a separate, zero-provider saved-view visit. This was not one uninterrupted Normal-mode managed-turn journey.
  • Original sessions/auth stayed untouched. Stopped private stores were preserved before retirement; setup/input-command failures remain recorded.

Source-cost repair is merged, installed and accepted. This does not establish the original intermittent burst's cause or16ms latency. No further provider/UI rerun is required for this checkpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants