Issue #9: enforce the 500 ms chapter-change budget and close the issue - #191
Merged
Merged
Conversation
The lookup race that fixed #9 shipped on 2026-05-15, but the closing gate still lacked a browser check. tests/e2e/chapter-change-perf.spec.ts seeds four translated chapters through the app's session import and times each Next click until the new text is painted: 47-80 ms across three dev-server runs against CORE-006's 500 ms featureLoading budget. It also asserts at most 2 console.log lines per change (measured: 2). A lowered budget fails it. Issue #9 moves to issues/ARCHIVE.md; real-novel and device timing were not re-run. Playwright is not in CI yet, so this is a local gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011d1MbSabs9nA9d9w8pxP1W
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… them Review of #191: the console budget counted every log arriving while a change was timed, so late startup/migration logs landed in the window (counts of 4, 5 and 12 on a slower machine). The spec now timestamps logs in the page, waits for startup to be quiet for 1 s, and counts only logs between the click and the paint. An injected burst of late startup logs no longer changes the count; 5/5 runs pass with five parallel workers. Issue #9's dossier and archive entry describe the method and the timings under contention (up to 382 ms) instead of a bare '2 lines'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011d1MbSabs9nA9d9w8pxP1W
This branch was successfully deployed
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 local issue #9 (
issues/09-chapter-change-perf-logging). The fix, racing the URL and stableId lookups, shipped on 2026-05-15. What remained was the closing gate's browser check.Changes
tests/e2e/chapter-change-perf.spec.ts.featureLoading: '< 500ms from trigger'.console.loglines. Logs are timestamped in the page, and only those between the click and the paint count, after startup has been quiet for 1 s.TranslationRepository.raceLookup.test.ts, which already existed.issues/ARCHIVE.md.Review fix (independent Codex review of
492ff1d)The first version counted every log that arrived while a change was being timed. On the reviewer's machine, late startup and migration logs landed in that window, and 3 of 5 runs failed with counts of 4, 5 and 12. Commit
f93c5c4counts only logs attributed to the change. An injected burst of late startup logs no longer changes the count. The two attributed lines are the AutoTranslateMediator's "State change detected" and "Translation already cached".Measurements
A deliberately lowered time budget makes the spec fail.
Limits
npx playwright test tests/e2e/chapter-change-perf.spec.ts.Verification
eslintandtsc -p tsconfig.playwright.jsonon the spec: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_011d1MbSabs9nA9d9w8pxP1W