Skip to content

Probe why a cover title typed on a new book can fail to reach the collection - #8352

Merged
andrew-polk merged 1 commit into
masterfrom
cover-title-investigation
Sep 11, 2026
Merged

Probe why a cover title typed on a new book can fail to reach the collection#8352
andrew-polk merged 1 commit into
masterfrom
cover-title-investigation

Conversation

@andrew-polk

@andrew-polk andrew-polk commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Problem

Three nightlies have now lost a cover title. A title typed on the cover of a brand-new book is missing from the saved book, so the collection never learns it and Bloom never renames the folder to match — import-recording hit it on 5 September, and bulk-upload-quick-test has died on it on 10 and 11 September, which is why that test is red every night. On the runner it is close to deterministic; on a developer machine it has never once reproduced (twelve attempts, including with the WebView renderer throttled), so nobody can say whether Bloom is dropping an edit or our own typing is not enough like a person's.

What this PR does

It adds no fix. It adds the two instruments that should settle the question from a single nightly run, and writes down what is known so far.

  • cover-title-save.spec.ts makes the same book three times, typing the title a different way each time — today's insertText, real key presses, and insertText followed by an explicit blur — and reports for each what the box held just before the save and whether the collection learned the title.
  • typeInGroup gains an optional typing-method argument for that. It defaults to today's behavior, so no existing test changes.
  • EditingModel logs the bookTitle it finds in the page content the browser sends back for a save, and only for pages that have one. That splits the timeline again: it says whether the text was already gone before Bloom saw it, or was lost after.
  • AUTOMATION-DEBT.md records what this investigation established — only the cover title is lost while everything typed after it saves; the log signature is a missing Renaming folder line after InsertTemplatePage — and what each probe outcome would mean. A separate entry notes that a dropped page-thumbnail click is the same already-listed gap.

Read the probe from a nightly; locally all three variants pass. Both instruments are meant to be deleted once the question is settled.

🤖 Generated with Claude Code

Devin review


This change is Reviewable

Comment thread src/BloomE2E/tests/cover-title-save.spec.ts
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5 (1M context)] Consulted Devin on 2026-09-11 21:40 UTC up to commit 5eb4b2a63d8f73375f1366f3eb12a25bf8fdb961.

No Bugs and no Informational items. One Investigate flag, mirrored as a review thread and left open for the developer: the probe exercises only the Test branding, so a branding-specific difference could survive the experiment. That is a design question about the experiment rather than a defect, so it is not being decided here.

The local review (a read-only sub-agent over the diff) found two real problems in the probe, both fixed in 5eb4b2a63d: the pre-save read was clicking the title box back into focus, which silently undid the blur variant, and a bare catch was recording a dead Bloom as a lost title. The full C# suite is green (3442 passed) and the probe passes locally, all three variants.

…lection

Three nightlies have now lost a cover title: a title typed on the cover of a
brand-new book is missing from the saved book, so the collection never learns it
and Bloom never renames the folder to match. import-recording hit it on 5
September; bulk-upload-quick-test has died on it on 10 and 11 September, which is
why that test is red every night. On the runner it is close to deterministic; on
a developer machine it has never once reproduced, so nobody can say whether Bloom
is dropping an edit or our own typing is not enough like a person's.

This adds no fix. It adds the instruments that should settle that question from a
single nightly run.

- cover-title-save.spec.ts makes the same book three times, typing the title a
  different way each time -- today's insertText, real key presses, and insertText
  followed by an explicit blur -- and reports for each what the box held just
  before the save and whether the collection learned the title. Every read of the
  box is non-interacting, because clicking it back into focus before the save
  would undo the blur variant and put a fresh click into all three runs.
- typeInGroup gains an optional typing-method argument for that, defaulting to
  today's behavior, so no existing test changes.
- EditingModel logs the bookTitle it finds in the page content the browser sends
  back for a save, and only for pages that have one. That says whether the text
  was already gone before Bloom saw it, or was lost after.
- AUTOMATION-DEBT.md records what the investigation established -- only the cover
  title is lost while everything typed after it saves; the log signature is a
  missing "Renaming folder" line after InsertTemplatePage; twelve local attempts
  could not reproduce it -- and what each probe outcome would mean. Both
  instruments are meant to be deleted once the question is settled.

Also on that file: a dropped page-thumbnail click, found while preflighting
#8351, recorded as a seen-again on the entry it belongs to rather than as a new
gap. And a papercut for the kept Bloom log being reachable only by unzipping the
trace.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@andrew-polk
andrew-polk force-pushed the cover-title-investigation branch from 5eb4b2a to d10f8fd Compare September 11, 2026 22:17
@andrew-polk
andrew-polk marked this pull request as ready for review September 11, 2026 22:17
@andrew-polk
andrew-polk merged commit 53eb325 into master Sep 11, 2026
1 check passed
@andrew-polk
andrew-polk deleted the cover-title-investigation branch September 11, 2026 22:18
andrew-polk added a commit that referenced this pull request Sep 11, 2026
The nightly run on 53eb325 carried both instruments from #8352, and between
them they rule out three suspects and pin down a fourth.

Not how we type: all three probe variants -- insertText, real key presses, and
insertText then blur -- reached the collection on the runner. Not branding: the
run's actual loss was in xmatter-packs, whose collection has BrandingProjectName
Default and no subscription code, so the "only under a branding" guess was an
artifact of the two specs that had hit it. Not Bloom's save: the new log line for
that failure reads `bookTitle en=""`, so the DOM the browser handed back for the
save had no title in it and there was nothing for the C# to lose.

What is left is the browser, in the window between the typing landing (the test
asserts toHaveText) and requestPageContent() capturing the page. So the place to
look is the front end: what mutates a brand-new book's cover after the Edit tab
loads it. editablePage.ts says its load-time fix-ups finish asynchronously after
bootstrap() returns, which is the right shape for a late write landing on a box
somebody has already typed in.

Also notes that the loss moves between specs rather than belonging to one:
bulk-upload-quick-test got all four titles this run and failed later, at the
upload.

The probe has answered its question and can go; the log line should stay until
the bug is fixed, since it is what turned a third mystery failure into a
diagnosis.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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