Repository navigation
feat(e2e): the first browser journey, the stock app against a Worker that serves it - #132
Merged
Merged
Conversation
…as the pin answers them
The first browser journey (sign-up to the work-item list) makes two requests that the pin
answers and Thrust 404ed: the workspace home page asks for the caller's stickies, and the
project form's cover picker asks for Unsplash pictures. Both are D-021 stubs.
X07, GET /api/workspaces/{slug}/stickies/: the paginator's envelope over no rows, for any
role in the workspace; the pin's 401, its 403 (also for a workspace that is not there) and
its 400s come first. X08, GET /api/unsplash/: [] for any signed-in caller, which is what the
pin answers when no Unsplash key is configured (the oracle has none).
The paginator's reading of per_page and cursor, and its envelope, move out of S47 into
src/page.rs so the two lists page the same way; S47's behaviour is unchanged (the crate's 721
tests, S47's parity row among them, passed after the move and before the stubs were added).
Both are recorded from the pin (X07: ten exchanges, X08: three; the recorder steps are
new, the 67 older fixtures are byte-identical) and join the acceptance list (56 rows). Tests:
the who-may-ask matrix gains X07 (ten rows by six callers), a property over any page size,
page and search, a matrix that a refused caller is not told about a bad page, and one over
X08's callers. Planted bugs, each caught: a parameter read before the caller is checked, a
default page size of 25, an Unsplash answer that is not a list (the hermetic tests and both
parity rows).
Refs: plane-byd.3
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…that serves it #44's last acceptance criterion: against the Worker with the Cloudflare set, the stock React app completes sign-up, onboarding, workspace, project, work item and list, and the browser's network log shows no 404. It becomes the first journey of #45. scripts/worker-dev.sh serves a directory of static files (THRUST_ASSETS_DIR) by writing an [assets] block into the throwaway copy of the config, never the shared wrangler.toml: one single-page app, every path the Worker handles run first in both forms (ADR-0011). The contract suite gains an `e2e` pass (worker targets only, CSRF at the Worker's default, off), which starts the target and runs scripts/e2e.sh, which drives e2e/journey.spec.ts in Chromium (Playwright 1.65.0, pnpm 11.10.0, lockfile committed). `worker-cf e2e` is a cell of contract-all.sh, so CI plans it; contract-cell.yml builds the app and gets the browser for that pass only, and the classifier counts e2e/ as a rust-side change. The spec fails on any 404 or 5xx (the allowlist is empty), and cannot pass vacuously: /_info must say CSRF is off, more than 20 files must come from /assets/ and none be the fallback page (a missing hashed file is a 200 text/html), more than 30 /api/ responses, a 201 for the creation and a 200 list after it, and the title on screen before and after a reload. Its control, the stickies list answering 404 in the browser, must fail the journey by naming it. Measured here: the journey and its control pass on worker-memory and worker-cf. With both stubs unmounted from the Worker the journey failed naming /stickies/ and /unsplash/ (by hand, not in CI). The CI cell has not run yet. Refs: plane-byd.3 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…, and the plan row G-30 says what the journey covers, which guards stop a pass that proves nothing, the controls that were run and how, and seven known gaps: opening a work item still calls one route that is not built (description-versions), a web-only change does not run the cell, the journey does not sign in or out, there is no native target, a hydration error in the console is not asserted, per_page=0 on the stickies list is probed and not recorded, and the real unmounting was done by hand once. D-021's table gains X07 and X08; PLAN.md, app.md, running.md, the contract-suite page and AGENTS.md follow. Refs: plane-byd.3 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…d every action The first CI run of the `worker-cf e2e` cell passed the journey and failed its control: with the stickies route answering 404, a later click waited out the test's two-minute timeout, so the spec never reached the check that names the 404, and the script (rightly) refused a control that failed for another reason. That is a fault in the spec, not only a slow runner: a route that is not mounted can break the page as well as show in the log, and then the 404 is the finding. The screen is now walked in a `try`; the log is judged first (a failure with a 404 or a 5xx in it is reported as that, with the screen's own failure noted), and a screen failure with nothing in the log is rethrown as it is. Every action is bounded at 30 seconds, so a screen that will not move fails in half a minute. Both paths were seen with a selector broken on purpose (reverted): the main run reported the timeout, the control reported the 404 and the timeout. Refs: plane-byd.3 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 12, 2026
…d and the controls that need no Plane (#137) #132 built the first browser journey as #44's last criterion and said it becomes the first of #45's. This makes the journeys a suite that a second journey, and the same journeys on the pinned Plane, can join without rewriting what guards them. - One spec per journey in e2e/journeys/ (the M1 journey moves there with git mv); what they share in e2e/support/: the target adapter, the network-log judge and the controls. - E2E_TARGET=thrust|plane and a target guard that runs before any click and names itself (TARGET GUARD). It reads /_info by its body: behind a proxy or the single-page fallback a path that does not exist is a 200 text/html, and a status check alone would call that a Thrust. The Plane form cannot use GET /api/instances/, which Thrust serves in the pin's shape on purpose (S01). - A count guard: scripts/e2e.sh reads each run's own JSON report (e2e/support/check-report.mjs) and requires one passed journey per file in e2e/journeys/, none skipped, unexpected or flaky. Playwright exits 0 for a skipped test, so the exit status alone cannot say it. - Three controls beside the stickies 404, each a run that must fail and say why: the work-item list emptied in the browser (must fail at "see it in the list:"; the run fails as CONTROL INERT if it emptied nothing), the journey skipping itself (the count guard must refuse it), and the journey told it is on the other target (must fail at the target guard). - Docs: the testing pages (app-and-e2e, defect-matrix X18, by-change, running), AGENTS.md, the rust-test-app skill's pointer, PLAN, and G-31 with what was measured and what was not. Measured locally on worker-cf: the journey and all four controls behave as required. The server-side variant of the empty-list control was run once by hand (list returning no rows, reverted, not committed) and the journey failed at "see it in the list:". The count guard was run on eight synthetic reports. The Plane form of the target guard has only been run to refuse a Thrust: the pinned-Plane leg is the next PR. Refs: #45 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 #44: its last acceptance criterion ("against
wrangler devwith the Cloudflare set, the stock React app completes sign up, onboarding, workspace, project, work item and list, and the browser network log shows no 404"). Does not close it: the closing comment (pd against 39.3, the ADR-0034 tripwires) is still to write.What changes
The Worker serves the app.
scripts/worker-dev.shtakesTHRUST_ASSETS_DIRand writes an[assets]block into the throwaway copy of the config (never the sharedwrangler.toml): one single-page app, every path the Worker handles run first in both forms, as ADR-0011 requires.Two stubs, found by walking the journey. The home page asked for
GET /api/workspaces/{slug}/stickies/and the project form's cover picker forGET /api/unsplash/, and both were 404. They are D-021 stubs, recorded from the pin as X07 (ten exchanges) and X08 (three) and added to the acceptance list (now 56 rows). The pin answers[]for Unsplash when no key is configured (the oracle has none), and the paginator's envelope over no rows for the stickies. The paginator code moved out of S47 intosrc/page.rsso both lists page the same way.The journey.
e2e/journey.spec.ts(Playwright 1.65.0, pnpm 11.10.0, lockfile committed) drives the built app in Chromium: sign-up, the profile and workspace steps, the welcome tour, a project, a work item, and the list after a reload (so it is the server's list). It fails on any 404 or 5xx; the allowlist is empty.scripts/e2e.sh <target> [controls]runs it; the contract suite gains ane2epass;worker-cf e2eis now a cell ofcontract-all.sh, so CI plans it (contract-cell.ymlbuilds the app and gets the browser for that pass only).e2e/counts as a rust-side change in the classifier.It cannot pass without proving something
/_infomust say CSRF enforcement is off; more than 20 files must come from/assets/and none may be the fallback page (a missing hashed file is answered 200text/html, so a 404 check cannot see it); more than 30/api/responses; a 201 for the creation (S48) and a 200 list (S47) after it; the title on screen before and after the reload. My first version assumed the app re-fetches the list after saving; it does not (it fills its store from the create response), which is why the reload is there.Verified
cargo fmt --check; clippy-D warningsnative and wasm32;cargo nextest run --profile ci --workspace: 3564 passed; doctests;check-web-diff.sh,check-plane-500.sh,check-acceptance-list.sh,check-topology.sh,check-placement.sh, the generator's self-test and the recorder's.worker-memoryand onworker-cf, locally, on the final tree. The control (the stickies list answering 404 in the browser) must fail the journey, naming that 404; the script and the cell require both./stickies/and/unsplash/, and passed again with them. This is not in CI..github/scripts/testsunder dash inubuntu:24.04: 60 of 60 (the runner's shell, not macOS's).b9164e8: all 35 checks succeeded, the newcontract (worker-cf, e2e)cell andgateamong them.96e4ab5) failed, and the fault was in the spec: the journey itself passed on the runner, but with the stickies route answering 404 in the control, a later click waited out the two-minute test timeout, so the 404 was never named and the script refused the control. The spec now judges the network log before the screen's outcome, and bounds every action at 30 seconds (b9164e8). I saw both paths locally with a selector broken on purpose (reverted).Not verified
per_page=0on the stickies list is the pin's 500 by S47's rule; I probed it, and it is not in the fixture.Known gaps (G-30)
GET .../work-items/{id}/description-versions/, which the pin answers and Thrust does not: a 404 outside this journey, not built.web/alone runs thewebjob (the Q-R2 gate and a build) and not this cell. The classifier deliberately keepsweb/out ofrust, and I did not change that; the fix would be an owner's call.Needs your decision
Nothing new: the stubs fall under D-021. Still pending from earlier: D-023, D-025 to D-029, D-035, D-036.
🤖 Generated with Claude Code