Repository navigation
feat(e2e): run every journey on the pinned Plane, and commit its scrubbed HAR - #140
Merged
Merged
Conversation
…bbed HAR The second of three PRs for #45. The first made the journeys a suite with a target guard, a count guard and controls; this adds the UI oracle they are for. The M1 journey now passes on the pinned Plane as well as on a Worker. The oracle stack is API only, and Thrust's web/ cannot sign a user in on the pin (its auth client posts JSON, Plane takes a form and answers 302), so: - tools/e2e-plane/build-pin-bundle.sh builds the pin's stock app as Thrust's web/ with every file of the Q-R2 ledger restored from the fork, each one checked against web/PIN-MANIFEST (the fork's blob, the manifest's entry and the bytes written). The only variable between the two legs is the ledger. - compose.ui.yml and a Caddyfile serve that bundle and the API on one origin, http://localhost:18088, and tell the API so (WEB_URL and the others point at the API's own port in .env.oracle, which is where a sign-in would land). USE_MINIO=1 and a /uploads/* route let the browser upload the project's cover through this origin, as Plane's own deployment does. - scripts/e2e.sh plane-oracle [controls]: builds the bundle, brings the stack up fresh (fresh-oracle.sh gains ORACLE_COMPOSE_EXTRA for the overlay), does the instance-admin setup (record.py gains --setup-instance, so the credentials stay defined once), runs the journeys with the same count guard, and takes the stack down on any exit. The fork checkout is only read. Local only: the oracle builds from the unpushed fork (Q-0122.4). - E2E_RECORD_HAR=1 writes tools/e2e-har/scrub.py's output to e2e/har/<journey>.plane.har after a passing run: the bodies of the /api/ and /auth/ calls, with cookies, CSRF tokens, passwords, presigned-URL signatures and volatile times taken out. It checks its own output for every secret it collected and for any signature, refuses an input with nothing to scrub, and has a self-test that plants secrets and shows its verifier can fail. Measured locally, 2026-11-12: the journey passes on the pinned Plane with an empty allowlist, the four controls fail there as required (including a Thrust-expecting guard refusing Plane), and the committed HAR (90 entries, 366 KB) holds no cookie, CSRF or password value, signature or local path by a second script, which finds 11 values in the raw HAR. The first Plane run failed for a reason worth keeping: making a project uploads its cover, and the oracle signs the upload for plane-minio:9000, which a browser cannot resolve. The first scrub also missed the signature in a presigned URL; a copy of the scrubber that skips signatures now fails its self-test. Refs: #45 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Nov 12, 2026
aRustyDev
added a commit
that referenced
this pull request
Nov 13, 2026
…tour (#144) * fix(e2e): let the page settle before the journey answers the welcome tour The worker-cf e2e cell failed now and then at "create a project": the click on "Add project" timed out because the welcome tour's backdrop was still in front of the page, although the tour's own PATCH had been answered 200. It failed the main journey on the push to main after #140 (run 43166258556), and the empty-list control on another branch's pull request (43297020745) and on the first dispatch of e2e-schedule.yml (43296974643). The app marks the tour as done in its store at the click and keeps whatever a profile fetch returns after that. The home page fetches the profile as it mounts, so an answer made before the click and landing after it puts the tour back for good. A fast machine does not make that fetch before the click; a CI runner does. - e2e/journeys: the journey waits for what the page asked for to be answered before it answers the tour, and again after, and requires that the tour's button is gone. The wait is watchPending(page).quiet() in support/network.ts, because waitForLoadState("networkidle") resolves at once on a single-page app past its first load. - e2e/support/controls.ts: a new control, slow-page, the one run that must PASS: the browser's CPU slowed 6x and the profile answer of the home page held until the tour's PATCH leaves the browser (2 s at most), then answered as it was before. It fails CONTROL INERT if it held nothing. - scripts/e2e.sh: must_pass, the runner of a control that must pass, held to the exit status and then the count guard; `controls` runs slow-page with it. - docs: G-31, X18 and the technique page say what the race was, what reproduced it and what did not, and what is still not seen. Measured locally on worker-cf: the unfixed journey failed 8 of 8 under slow-page, all at the Add project click and with CI's error text; two weaker controls (a CPU slowdown alone, and a fixed 2 s hold on top of it) passed it 8 of 8, so they are not what slow-page is built from. The fixed journey passed slow-page 8 of 8, and the whole cell passed with all its controls. must_pass was run on a stub in its three cases under sh and dash, and a mutant that ignores the journey's status failed that test. Not seen: CI itself after this, and the Plane leg with the changed journey (local only). Refs: #45 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * fix(e2e): answer the welcome tour again if the page brings it back The first version of this fix, which waited for the page to go quiet before the click and asserted after it that the tour was gone, was not enough. It passed the slow-page control 8 of 8 locally, and two dispatches of e2e-schedule.yml on that head succeeded, and then the pull request's own run failed at the assertion (run 43317382522). Its HAR shows why: the held profile fetch began 1070 ms before the click, and GET /api/users/me/ and the profile fetch the app chains to it were about 930 ms apart under the slowdown, which is longer than the 500 ms of quiet the wait asks for, so the wait returned inside the gap and the click was made with the fetch still in flight. A longer pause is no answer: how long the app's own code waits between the two depends on the machine. - e2e/journeys: the journey waits for what the page asked for, answers the tour, waits again for what was in flight at that moment, and looks that the tour's button is gone. If it is back, it answers it again, three answers at most, as a person would, and records `tour-came-back` in the report. A stale answer cannot come twice: nothing is in flight by then. - e2e/support/controls.ts: slow-page hands back the server's own held answer. It had rewritten the held answer to is_tour_completed: false, which also made stale an answer fetched after the click, one a server would not give. - docs: G-31 and the technique page say what the first version missed and how it was found. Measured locally on worker-cf, 8 runs each, slow-page and no other control: the unfixed journey at 6x CPU slowdown failed 8 of 8 at the Add project click (the changed control still discriminates); the wait-only version at 12x failed 8 of 8 at its assertion; this journey at 12x passed 8 of 8, each of them needing its second answer. The whole cell then passed at the default 6x. Refs: #45 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * docs(testing): record what CI showed of the final tour-answering journey G-31's "Not seen" said that CI itself had not been looked at. It has now: the pull request's own run and five dispatches of e2e-schedule.yml on head a5bf65b all passed (journey 1 of 1, slow-page ok). The main run never had to answer the tour twice; the slow-page run did in two of the five, so the race fired in CI under the control and was absorbed. It also says what this does not show: before the fix 3 of the 13 runs of the cell that I could find failed at that step, so six clean runs would come by chance about one time in five (an estimate from few counts), and the wait-only first version passed 3 of 4 runs in CI before it failed. Refs: #45 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.
Part of #45 (second of three PRs). Does not close it: the schedule, the parity-matrix table and the ADR-0006 register row are the third.
What this does
#137 made the journeys a suite with a target guard, a count guard and controls. This adds the UI oracle they are for: the M1 journey now passes on the pinned Plane as well as on a Worker, and the Plane run's network log is committed as the input to spike 0009's replay harness.
The oracle stack is API only, and Thrust's
web/cannot sign a user in on the pin (its auth client posts JSON; Plane takes a form and answers 302). So:tools/e2e-plane/build-pin-bundle.sh): Thrust'sweb/with every file of the Q-R2 ledger (web/ALLOWED-CHANGES) restored from the fork, each checked three ways againstweb/PIN-MANIFEST(the fork's blob, the manifest's entry, the hash of the bytes written). Same lockfile, toolchain and environment as the Thrust bundle, so the ledger is the only variable between the two legs. The fork checkout is only read.compose.ui.yml,Caddyfile): a Caddy container (pinned by digest) serves that bundle and proxies/api/*,/auth/*,/static/*to the API, and the overlay tells the API its origin ishttp://localhost:18088(.env.oraclenames the API's own port, which is where a sign-in would land).USE_MINIO=1and a/uploads/*route let the browser upload the project's cover through this origin, as Plane's own deployment does.scripts/e2e.sh plane-oracle [controls]: builds the bundle, brings the stack up fresh (fresh-oracle.shgainsORACLE_COMPOSE_EXTRA; default behaviour unchanged), does the instance-admin setup (record.pygains--setup-instance, so the credentials stay defined in one place), runs the journeys with the same count guard, and takes the stack down on any exit (anEXITtrap;E2E_KEEP=1leaves it up). Local only: the oracle builds from the unpushed fork (Q-0122.4); CI keeps runningworker-cf.E2E_RECORD_HAR=1writese2e/har/<journey>.plane.harafter a passing run, viatools/e2e-har/scrub.py: the bodies of the/api/and/auth/calls, with cookies, CSRF tokens, passwords, presigned-URL signatures and volatile times taken out. It checks its own output for every secret it collected and for any signature, refuses an input with nothing to scrub, and--self-testplants five secrets and shows its verifier can fail. Spike 0009's Result section names the HAR's path.Evidence (local, 2026-11-12)
ORACLE_DIR=<fork>/oracle E2E_RECORD_HAR=1 scripts/e2e.sh plane-oracle controlsendedVERDICT: PASS:/_infois the app's index page, a 200text/html, which is why the guard reads the body); theplaneguard's/api/schema/probe has now seen the oracle;passwordAuthis in 2 files of the Thrust bundle and in none of this one.The committed HAR (90 entries, 366 KB, the S48 201 and a list after it) was checked with a second script that is not the scrubber's own check: no cookie, CSRF or password value, no presigned signature, no local path, valid JSON. The same script run on the raw HAR finds 11 real cookie and token values.
tools/e2e-har/scrub.py --self-testpasses, and two mutated copies of the scrubber (no JSON-field redaction; no signature redaction) each fail it.record.py --self-test,scripts/check-acceptance-list.shand theci-scriptstests (60 of 60) pass;scripts/e2e.sh,fresh-oracle.shandbuild-pin-bundle.shpasssh -nunder dash in ubuntu:24.04, and anEXITtrap keeps the exit status there.Two things the run found
.env.oracle(USE_MINIO=0) signs the upload forplane-minio:9000, a name only the compose network resolves; the modal stayed open. I had written in the README that the M1 journey uploads nothing, which was wrong. Fixed as above and the README corrected.X-Amz-Signaturewas not scrubbed. The oracle's store is throwaway and the signature long expired, but a committed file should hold none. The scrubber now takes it, the verifier checks for signatures whether or not they were collected, andExpiresis dropped fromSet-Cookie(a made-up date would read as "deleted";Max-Agecarries the lifetime).Not measured, said plainly
scripts/check-web-diff.sh. It needs the fork checkout, which on this machine is a worktree under.claude/worktrees/on an unpushed branch, so it can be pruned. I used it read-only, as you confirmed.plane-oraclerun takes the stack (down -v), which drops the seeded snapshot thatscripts/oracle-v1.sh planeneeds; no oracle volumes existed when I started./uploads/*, Thrust's one-time PUT URL on the API, D-035);/god-mode,/spacesand/liveare not served on the Plane leg, as on the Worker. A journey that opens the work-item editor's collab provider needs/live(feat(compat): the M2 daily-use screens (acceptance list) with every other route stubbed and recorded #46).Next
worker-cf e2e, daily), the parity-matrix table in TRACEABILITY, the ADR-0006 register row fore2e/,tools/e2e-plane/andtools/e2e-har/, and closing test(e2e): Playwright journey suite on the stock React app as the UI oracle #45.🤖 Generated with Claude Code