Fix the transcript bug the rename caused, and the 19 assertions it orphaned - #10
Merged
Conversation
…ripts `parsePromptText` finds the originating event by matching the section title against the literal `"buzz event"`. The rename in #3 changed the title that `semanticTurnTitle` produces to the product name but left that matcher alone, so `eventSection` came back undefined, `eventContent` was empty, and `agentSessionTranscript` skipped `upsertMessage` entirely — the person's own message vanished from the transcript, with no error anywhere. The title has two producers that legitimately disagree: - buzz-acp writes `[Buzz event: …]` on the wire, and `<buzz-event>` is a protocol tag. Sections parsed from that text carry the protocol spelling, which this fork deliberately does not rename. - `semanticTurnTitle` renders the same section for display, where the product name is correct. So the matcher accepts both spellings, and the display side now derives from PRODUCT_NAME rather than repeating a literal — the two can no longer drift apart the way they just did. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Eleven test files asserted the literal "Buzz" against copy the #3 rename had changed to "Dreamforge". They have been failing on main ever since; nobody saw it because CI path-gates the desktop job, and the small PRs that followed never triggered it. Nineteen assertions were dead the whole time — they would not have caught a real regression either. Each now derives its expectation from PRODUCT_NAME, TERMINAL_LABEL, or SHARED_COMPUTE_LABEL, so the next rename updates them with the product rather than orphaning them again. Deliberately left as literal "Buzz", because they are not brand copy: - `[Buzz event: …]` inputs — buzz-acp's wire format, and one expectation for a title parsed out of it (the sibling `<buzz-event>` case is titled for display and does use the constant; both are asserted, with a comment explaining why the two spellings are both correct). - "Buzz Patrol" and the repository named "Buzz" in the project fixtures, and "Buzz is visible" in the error-boundary fixture — arbitrary test data that happens to contain the word. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`focused polling pauses on blur and resumes after activation yields` slept a fixed 10ms and then asserted the resume had already landed. That passes on a warm full-suite run and fails whenever the machine is busy or the file runs alone — it failed in isolation on main and on the upstream merge alike, and flipped to failing in the full suite once the merge added 311 tests and changed the execution order. Waits for the observation to arrive, bounded at 2s, so the outcome no longer depends on how loaded the machine is. Unrelated to the rename work in the rest of this branch; separated so it can be upstreamed or dropped on its own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Takes the desktop suite from 20 failures to 0, and fixes a real user-facing bug found along the way.
The bug (commit 1)
parsePromptTextlocates the originating event by matching the section title against a literal:The #3 rename changed the title
semanticTurnTitleproduces to the product name but left that matcher alone. SoeventSectioncame backundefined,eventContentwas"", andagentSessionTranscriptskippedupsertMessageentirely — the person's own message vanished from the agent transcript, silently.That string was never display text. It was a sentinel, and the rename treated it as copy.
The title legitimately has two producers:
[Buzz event: …],<buzz-event>BuzzsemanticTurnTitle(display)DreamforgeThe matcher now accepts both, and the display side derives from
PRODUCT_NAMEinstead of repeating a literal, so the two cannot drift apart again.The dead assertions (commit 2)
Eleven test files asserted the literal
"Buzz"against copy #3 had renamed. They have been failing onmainsince the rename — nobody saw it because CI path-gates the desktop job and the small PRs that followed never triggered it. Nineteen assertions were dead the whole time; they would not have caught a real regression either.Each now derives from
PRODUCT_NAME,TERMINAL_LABEL, orSHARED_COMPUTE_LABEL.Deliberately left as literal
Buzz— not brand copy:[Buzz event: …]inputs (wire format) and one title parsed out of it"Buzz Patrol"/ a repository named"Buzz"in project fixtures"Buzz is visible"in the error-boundary fixtureThe flake (commit 3)
focused polling pauses on blur…slept a fixed 10 ms then asserted the resume had landed. It failed in isolation onmainand on the upstream merge, and flipped to failing in the full suite once #8 added 311 tests and changed ordering. Now waits for the observation, bounded at 2 s. Unrelated to the rename work — separated so it can be upstreamed or dropped on its own.Verification
pnpm test— 6110 passed, 0 failed (was 6090/20)tsc --noEmit— cleanbiome checkon all 13 changed files — clean🤖 Generated with Claude Code