fix: the window says when a run's record will be too big to read back - #81
Merged
Conversation
The command line has warned about this since the ceiling was measured on
2026-08-26. The window said nothing at all: TooLargeToReadBack had two callers
and not one of them was in internal/gui.
So somebody who generated 25 000 files from the window ended up with a
directory that tfg verify and tfg cleanup both refuse, and no warning anywhere.
The manifest is the only authority over what may be removed, so those files
could never be cleaned up by this tool again.
It is the kind of parity gap D1 loses most easily. Not something the engine can
do from one surface and not the other, which is what the parity guard looks
for, but something one surface SAYS and the other does not - and both surfaces
reach the same engine, so nothing there could see it.
The observation recorded this as a question about the manifest schema, on the
grounds that notes are per file and this one is per run. That premise was
false, and finding out was most of the work. The command line does not read
this off the manifest either: it works it out from the plan and prints it
before the first byte. manifest.TooLargeToReadBack was put where it is exactly
so the two surfaces could not come to different conclusions about one run. What
was missing was a caller. The schema does not move and manifest_version stays
1.0.
One method arrives, (*Manifest).ReadBackReach, because the count of entries
carrying a note is already kept while entries are added. Working it out a
second time would mean walking every file again and getting it subtly wrong
when a failed entry gains a note of its own.
The window says it in two places, because it cannot say anything in the middle
of a run - a widget touched from a worker is a race, and two of those were
found on CI:
- after Preview, which is the window's answer to --dry-run. engine.Run with
DryRun builds the whole document, so the answer is there for the asking.
- when a run finishes, immediately after the line saying what the run did and
ahead of any other note. This is the one that matters: Preview is a button
somebody may never press, and that person is the one left with the
directory.
Four guards, four mutations.
The pair for Preview was written wrong first and the probe said so. It set a
200 B size while the window was on its default format, which is the first in
the registry - avif - so both previews were REFUSED. The negative half passed
while proving nothing, because a screen saying "check the settings marked
above" says nothing about a manifest ceiling either. Both now choose txt and
both assert the preview was accepted before reading anything into what it said.
The guard for a finished run costs 26 s, because it really writes 22 345 files.
runFinished has no cheaper seam, and this is the only guard covering the case
the observation is actually about.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
donislawdev
force-pushed
the
fix/window-says-manifest-reach
branch
from
September 7, 2026 16:49
89553f3 to
7328400
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on #80. Closes observation
O184.The command line has warned about a record too big to read back since the
ceiling was measured. The window said nothing at all -
TooLargeToReadBackhad two callers and not one of them was in
internal/gui.Somebody who generated 25 000 files from the window ended up with a directory
that
tfg verifyandtfg cleanupboth refuse, and no warning anywhere. Themanifest is the only authority over what may be removed, so those files could
never be cleaned up by this tool again.
It is the kind of parity gap
D1loses most easily: not something the enginecan do from one surface and not the other, which is what the parity guard looks
for, but something one surface says and the other does not.
The recorded diagnosis was wrong, and that was most of the work
O184recorded this as a question about the manifest schema - notes are perfile, this one is per run. That premise is false. The command line does not
read this off the manifest either: it works it out from the plan and prints it
before the first byte, and
manifest.TooLargeToReadBackwas put where it isexactly so the two surfaces could not disagree about one run.
What was missing was a caller. The schema does not move and
manifest_versionstays1.0.One method arrives,
(*Manifest).ReadBackReach, because the count of entriescarrying a note is already kept while entries are added - working it out again
would mean walking every file a second time and getting it subtly wrong when a
failed entry gains a note of its own.
Two places, because the window cannot speak mid-run
A widget touched from a worker is a race, and two of those were found on CI.
--dry-run.engine.RunwithDryRunbuilds the whole document, so the answer is there for the asking.and ahead of any other note. This is the one that matters - Preview is a
button somebody may never press, and that person is the one left with the
directory.
Guards
Four guards, four mutations, all caught.
The Preview pair was written wrong first, and a probe said so. It set a
200 B size while the window was on its default format - the first in the
registry, which is
avif- so both previews were refused. The negative halfpassed while proving nothing: a screen saying "check the settings marked above"
says nothing about a manifest ceiling either. Both now choose
txt, and bothassert the preview was accepted before reading anything into what it said.
The guard for a finished run costs 26 s because it really writes 22 345
files.
runFinishedhas no cheaper seam, and it is the only guard covering thecase the observation is actually about.
The fourth guard asks a separate question: do both surfaces judge the same run
the same way at the boundary. Two paths to one number are allowed only
because they go through one predicate, and this asserts it rather than trusting
it.
Full suite green,
preflight --quickgreen.🤖 Generated with Claude Code