Skip to content

Fix the transcript bug the rename caused, and the 19 assertions it orphaned - #10

Merged
QuicksilverSlick merged 3 commits into
mainfrom
fix/rename-orphaned-tests
Sep 3, 2026
Merged

Fix the transcript bug the rename caused, and the 19 assertions it orphaned#10
QuicksilverSlick merged 3 commits into
mainfrom
fix/rename-orphaned-tests

Conversation

@QuicksilverSlick

Copy link
Copy Markdown
Owner

Takes the desktop suite from 20 failures to 0, and fixes a real user-facing bug found along the way.

The bug (commit 1)

parsePromptText locates the originating event by matching the section title against a literal:

return title.startsWith("buzz event");

The #3 rename changed the title semanticTurnTitle produces to the product name but left that matcher alone. So eventSection came back undefined, eventContent was "", and agentSessionTranscript skipped upsertMessage entirely — 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:

Producer Spelling Why
buzz-acp wire text — [Buzz event: …], <buzz-event> Buzz Protocol surface this fork deliberately does not rename
semanticTurnTitle (display) Dreamforge User-visible copy

The matcher now accepts both, and the display side derives from PRODUCT_NAME instead 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 on main since 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, or SHARED_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 fixture

The flake (commit 3)

focused polling pauses on blur… slept a fixed 10 ms then asserted the resume had landed. It failed in isolation on main and 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 test6110 passed, 0 failed (was 6090/20)
  • tsc --noEmit — clean
  • biome check on all 13 changed files — clean

🤖 Generated with Claude Code

QuicksilverSlick and others added 3 commits September 3, 2026 16:37
…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>
@QuicksilverSlick
QuicksilverSlick merged commit c4dffec into main Sep 3, 2026
44 of 54 checks passed
@QuicksilverSlick
QuicksilverSlick deleted the fix/rename-orphaned-tests branch September 3, 2026 22:14
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.

1 participant