Repository navigation
#81: the Save's one visible line leads with the first failing cause - #295
Merged
Merged
Conversation
The ordered Save reports one row per buffer in save order. When the ANCESTRY step is what failed, every document behind it is `not_attempted` because of it -- a root and its consequences. There is exactly one transient visible line, and `save()` calls `stateEvent` once per reported row, so each later row overwrites the one before it and the LAST consequence is what stands. Measured through the REAL orchestrator (`runSave` over a transport that refuses the outline), the line reads second.md: Save not attempted -- the outline did not land, so there is no session ancestry for this document to be saved against -- nothing was sent while the cause -- "Outline: Save refused -- the outline base moved under this buffer" -- never reaches the human at all. The pin is the semantic, not a sentence: the visible line must be the FIRST failing row's own stated outcome, which is exactly what that buffer's durable status region opens with, and must not be any later row's. Co-Authored-By: Claude Fable 5 <[email protected]>
`save()` called `stateEvent` once per reported row, and the transient line
holds one sentence, so every later row overwrote the one before it. On the
shape the defect is about -- the ancestry step refused, every document behind
it `not_attempted` BECAUSE OF IT -- the human was left reading the LAST
consequence ("the outline did not land, so there is no session ancestry...")
while the cause it names never appeared anywhere they were looking.
The line is now chosen ONCE, from the FIRST row with something to report, and
rows arrive in save order, so it is the first failing cause. Nothing is
hidden by choosing: every row still writes its own durable sr-only sentence,
which is where the per-buffer report lives (FR-035), and the tile verdict
already led with the first withheld row (`tileSaveVerdict`), so the two
surfaces now agree.
No new vocabulary: the same sentences, one of them chosen instead of the last
one surviving.
Co-Authored-By: Claude Fable 5 <[email protected]>
The reviewer proved my selection rule regressed #81 from the other end. `row.status !== "committed"` admits `unchanged`, and a tile Save scopes to one document with the outline riding along -- so a CLEAN outline reports `unchanged` FIRST, ahead of the document that actually failed, and took the line with "Outline: nothing to save in this buffer". Pre-fix the human at least saw the refusal; my branch showed them the vacuous row instead. Reproduced here before the change (RED) and after (GREEN). The offer now comes from the WITHHELD set -- `refused` or `not_attempted` -- which is the same set `tileSaveVerdict` already leads with, so the two surfaces agree in fact rather than only in the common case. BRETT'S RULING (2026-08-24) on the product question this raises: on a fully successful tile save with a clean outline the transient line is SUPPRESSED -- no line at all. The line exists to surface failure causes; the per-row sr-only sentences and the tile verdict still tell the whole story. That is what the narrowed condition produces, measured: eventNote empty and hidden, while the outline's own region still reads "nothing to save in this buffer" and the document's reads "saved as edit-document on draft/topic-x". Fix and companion test authored by the reviewer of record; applied verbatim. Co-Authored-By: Claude Fable 5 <[email protected]>
Brett ruled on 2026-08-24 that a Save with nothing withheld leaves the one transient line alone. Narrowing the lead to the withheld set REALIZED that -- before it, a fully successful tile save flashed `Outline: nothing to save in this buffer`, because the clean outline rides along `unchanged`, `unchanged` was "not committed", and so the vacuous row took the line ahead of the buffer the human actually acted on. Realized is not pinned. A ruled behaviour that nothing asserts is one refactor away from silently ceasing to hold, which is the failure this repository keeps digging out, so the measurement becomes a test rather than a transcript. Both halves are asserted, because the weaker half is where this would rot: the line must be empty AND hidden, and the committed buffer's own region must still state the action and ref it landed under (FR-035). Verified by mutation: widening the lead back to "not committed", adding `unchanged` to the withheld set, emitting a fallback sentence, and blanking the per-row stated outcomes each fail it. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR fixes doxBench Save’s single transient visible status line so it consistently reflects the first failing cause (in save order) rather than being overwritten by downstream consequence rows, addressing issue #81. It also adds regression tests to pin the intended behavior across multi-buffer Save, tile Save, and fully-successful Save cases.
Changes:
- Update
doxbench-editor.jsto select the transient Save event line once (first withheld/adopt-failure row) after processing all outcome rows, instead of emitting per-row events. - Align transient-line eligibility to the withheld set (
refused/not_attempted) sounchangednever steals the lead line. - Add three new integration-style view tests to pin the ordering/eligibility semantics and the “nothing withheld => no transient line” ruling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/ideation-dashboard/test_doxbench_view.py | Adds three regression tests that pin the transient-line semantics for first-failure leading, unchanged not leading, and “nothing withheld => hidden/empty line.” |
| scripts/ideation_dashboard/web/views/doxbench-editor.js | Changes Save reporting to choose the transient event line once from the first withheld/adopt-failure row, preventing last-row overwrite and excluding unchanged from transient reporting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+2067
to
2069
| if (row.status === "refused" || row.status === "not_attempted") { | ||
| leadWith(bufferLabel(row.key) + ": " + saveOutcomeSentence(row)); | ||
| } |
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
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.
Closes #81.
On a partial or refused ordered Save there is exactly ONE transient visible line, and the operator was reading the wrong row off it — a downstream consequence instead of the cause that produced it.
The defect is not where the issue points
#81 names
doxbench-save.jsfirst. It is not there.runSavealready reports rows in save order, andtileSaveVerdictalready led withwithheld[0]. The defect is indoxbench-editor.js:save()calledstateEventonce per reported row, andstateEventoverwrites the single visible line and resets its timer — so the last row reported won.On the shape the issue is about — the ancestry step refused, every document behind it
not_attemptedbecause of it — that meant the human read the last consequence while the cause never appeared anywhere they were looking.RED, through the real orchestrator
refusedAncestryLeadsTheSummarycomposes the realrunSaveover a transport that refuses the outline. Thenot_attemptedrows are the orchestrator's own answer, not scripted. Against the unfixed editor:The pin is semantic, not a sentence match: the visible line must equal the opening of the FIRST failing row's own durable status region (both derive from
bufferLabel+saveOutcomeSentence), must not be any later row's, and every downstream row must keep its own message in its own region (FR-035).The fix, in three commits
2377022— RED.5c8ffce— the line is chosen ONCE, from the first row with something to report, after every row has been read.leadWithtakes the first offer; onestateEventat the end. No new vocabulary: the same sentences, one of them chosen instead of the last one surviving.d87226e— a regression found in review, and its fix. The first cut offered the line fromrow.status !== "committed", which includesunchanged— a row with nothing to say. A tile Save scopes to one document and the outline always rides along, so a clean outline reportsunchangedfirst, ahead of the document that actually failed:detail.md: Save refused -- the document base moved under this buffer5c8ffceOutline: nothing to save in this bufferd87226edetail.md: Save refused -- the document base moved under this bufferThat was #81 arriving from the other end, and it falsified the claim that the two surfaces agreed. The offer now comes from the same withheld set
tileSaveVerdictalready uses (refused/not_attempted), so they agree in fact rather than in the common case. Verified by applying the halves separately: the test half alone reproduces the exact regression shape; the fix half turns it green.005d798e— Brett's ruling of 2026-08-24, pinned. Narrowing the lead realized the ruling that a Save with nothing withheld says nothing on the transient line — a fully successful tile save no longer flashesOutline: nothing to save in this buffer. It was measured but unpinned, and realized-but-unpinned is how a ruling quietly stops being true. Both halves are asserted, because the weaker one is where it would rot: the line must be empty and hidden, and the committed buffer's own region must still state the action and ref it landed under.Verification
Mutation-tested at each layer. The #81 pin refuses last-wins, a hardcoded sentence, emitting nothing, conflating the lead with report order, and choosing by any rule other than save order. The regression pin refuses widening back to "not committed" and refuses granting
/run-style breadth. The suppress pin refuses widening back, addingunchangedto the withheld set, emitting a fallback sentence, and blanking the per-row stated outcomes.Suite, measured at each step from a sibling-placed checkout: 3986 at
5c8ffce, 3987 atd87226e, 3988 passed / 13 skipped at005d798e. Three commits add a test each (5c8ffceis fix-only), so the count goes up by exactly three and never down.Found alongside, tracked separately
tileSaveVerdictreportsok: trueover a commit the canvas could not adopt. Same defect class one layer up, and reachable:statedIdentity(save module) accepts any non-emptyalgorithmand any 64-charhex, whilenormalizedIdentity(state module) requiressha256and/^[0-9a-f]{64}$/. An uppercase hex passesreadVerdictascommitted, throws inadoptSavedBase, and the tile still saysok: truewhile the buffer keeps its unsaved text. Measured, not inferred.runSaveemits anoutlineverdict row for a state with no outline buffer (saveBufferOrder([])→["outline"]). Inert in the editor, which skips rows for keys it does not hold. A nit.Neither is touched here.
🤖 Generated with Claude Code