Repository navigation
perf(planning): cut the journey suite's shell and page waits - #11847
Conversation
Each journey apply went through round.sh, which probes Python and then runs round.py as a script: Python never caches a script's bytecode, so every call recompiled the 3521-line file (about 40 ms here) on top of the bash and probe launches. japply and jhandle now run `python -m round` from the surface directory, which reuses round's cached bytecode; the command, its arguments and the data dir are unchanged, so every phase sees the same writes in the same batches. The other round.sh calls in the suite still cover the wrapper. The pause before the n3 Notes reply now waits for the next whole second instead of a full second. Notes carry whole-second times, so n3 still gets a later time than n2. Measured on this host (WSL2): - Replay of the 24 journey applies, server running, no browser: round.sh 2951/2780/2761 ms, python -m round 1628/1985/1662 ms. - Full suite before: apply 2507ms/24, handle 527ms/5, sleep 1002ms/1. - Full suite after (two runs): apply 2459ms/24 and 1891ms/24, handle 533ms/5 and 405ms/5, sleep 338ms/1 and 570ms/1. Refs: #8757 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s toast race Timing every page call per phase showed settle already returns as soon as the page has caught up (1 of about 160 calls ran to its cap, while the server was stopped). Two waits ran long on the happy path: - Phase 13 pressed l, which closes the Activity panel phase 10 left open, then clicked #flyClose with a 2 s timeout that expired every run. It now clicks #flyClose only when the press opened the panel; the panel ends closed either way, as before. - Phase 2's third second-tab read waited for the next 3 s /api/state poll. A visibilitychange on the visible tab now reads /api/state at once (catchUp in index.html). The second read still comes from the poll, so the polling path stays covered. Phase 13's "queued, Claude is busy" check could race: the note toast is set after the send, and the next state frame re-renders the Notes panel (focus is on Send note, not the textarea), emptying the toast. A MutationObserver now records every text the toast shows, and the check passes only when one of them says Queued, Claude is busy. Per-phase seconds summed over phases 1-20, this host: - before: 67, 71, 66 (phase 2: 10, 11, 10; phase 13: 5, 9, 5) - after: 58, 61, 62 (phase 2: 7, 7, 7; phase 13: 3, 3, 3) All three after runs: PASS=254 FAIL=0 SKIP=0. Refs: #8757 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s check The phase-13 toast recorder observed the whole page body and was never disconnected, so it ran on every DOM change through phase 20 of the same page. It now disconnects right after the queued-toast check. Verified: surface-journey.test.sh PASS=254 FAIL=0. Refs: #8757 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9612dd7cb0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review reviewed Security review: incremental (9612dd7 → c3dcae1)Scope: I read the whole incremental change. It touches one file, What changed: One wait in the journey test now reads Security assessment: No security issues found. The change is limited to a test helper's timing and touches no security-relevant code:
critical-findings: 0 |
|
claude-review reviewed Code review (incremental: 9612dd7 → c3dcae1)Scope: I reviewed the one hunk in What changed: the wait before note Checks (by reading the code, not by running it):
Findings: none. Closing issue: the PR says Holds: none. The change only affects test timing and spends nothing. |
… EPOCHREALTIME
The next-second wait before note n3 read ${EPOCHREALTIME#*.} under set -u,
so on bash 4, which has no EPOCHREALTIME, the suite stopped with an unbound
variable before phase 16. It now reads ${EPOCHREALTIME:-} first and waits
the full second when the variable is missing, as jtime already does.
Refs: #8757
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Lane 5 arm request for the hub. Hub sessions exit before a lane can reply over the socket, so I'm posting it here. Please arm at Gate state:
Also, in answer to your 05:3xZ question: PRs #11820 and #11821 are not Lane 5's. |
Refs: #8757
Summary
Problem:
surface-journey.test.shruns over the 120 s goal on main: the four whole-suite runs after 312a9f2 took 129, 111, 99 and 135 s (median 120.0 s). This PR cuts time the shell and the page spent waiting, and fixes a race in phase 13 that showed up locally as an intermittent failure.Fix
python -m roundfrom the surface directory instead ofround.sh, so Python reuses cached bytecode instead of recompiling the 3,521-lineround.pyon every call (about 40 ms each).round.shstays covered by the suite's other calls.sleep 1before noten3waits only until the next whole second, which still givesn3a later time thann2(notes carry whole-second times).visibilitychangeso the second tab reads/api/stateat once instead of waiting for its 3 s poll; the poll path stays covered by the read before it.lpress had already closed it); it now clicks only when the panel is open.Verification
surface-journey.test.shlocally: four runs after the change allPASS=254 FAIL=0; per-phase totals went from 67/71/66 s to 58/61/62 s, and the shell steps from about 4.9 s to about 3.2 s per run. Local timing is not CI timing.Related
playwright-cli run-codestartup, about 1.3 s for each of 20 phases; fewer phases would be the next cut.🤖 Generated with Claude Code