diff --git a/.githooks/pre-push b/.githooks/pre-push index 85990bb5..3b2d06c6 100755 --- a/.githooks/pre-push +++ b/.githooks/pre-push @@ -1,4 +1,3 @@ #!/bin/sh set -eu npm run verify -npm run test:browser -- --project chromium diff --git a/AGENTS.md b/AGENTS.md index fb45aa2f..b80082a4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -88,18 +88,17 @@ Browser tests use `CONCEPT_MAP_TEST_PORT` for their Vite preview server and Playwright base URL (default `4324`). The agent loop chooses a free port for each run, starting at `4324 + issue % 500`, and exports it to the agent. -For each agent-loop iteration, run `npm run verify` and only browser specs -related to the change in Chromium. A change unrelated to browser behavior -needs no browser spec in that iteration. Before writing `DONE`, run the full -Chromium browser suite. Run Firefox and WebKit locally only when a change is -browser-specific. CI remains the check across all three browsers before a -pull request is ready to merge. +Browser tests run in CI only, in all three browsers; CI is the check before +a pull request is ready to merge. Locally — in agent-loop iterations, before +`DONE` and in the pre-push hook — run `npm run verify` and no browser tests. +Run a browser spec locally only to reproduce a failure CI reported, and then +only that spec in the failing browser. A change that can alter what a reader sees (rendering, layout, CSS, the player, the examples) is accepted on pictures, not only on numbers. - **Checks on the examples** in every step of every scenario and in whole-map - mode, in the browsers required above: + mode, in the browser tests CI runs: - no arrow label is crossed by a line, a box or a step number; - no step number covers a label or a box; - no self-transition loop or label touches another box; diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b32ca433..78f2fdf7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,8 @@ npm run test:browser npm run test:mutation # report only; weekly in CI ``` -The pre-push hook runs `verify` and the Chromium browser tests. CI runs Node 24 -and all three browsers. In a sandbox with another Chromium build set +The pre-push hook runs `verify` only. Browser tests run in CI, on Node 24, in +all three browsers; locally run them only to reproduce a CI failure. In a sandbox with another Chromium build set `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH`. ## Provenance of the code diff --git a/scripts/agent-loop/prompt.md b/scripts/agent-loop/prompt.md index 47b8b2c5..4b99d258 100644 --- a/scripts/agent-loop/prompt.md +++ b/scripts/agent-loop/prompt.md @@ -9,11 +9,10 @@ memory of earlier iterations: everything you know is in the repository and in numbers down before you change anything. 3. Choose the single most useful next change toward the goal. Make it small enough to finish and verify in this iteration. -4. Run `npm run verify`. Run related browser specs in Chromium only; skip - browser tests when the change is unrelated to browser behavior. Before - writing DONE, run the full Chromium suite. Run Firefox and WebKit locally - only for a browser-specific change. If a required check fails, fix the - cause or revert your change; never leave the branch red. +4. Run `npm run verify`. Do not run browser tests; CI runs them in all three + browsers. Run a browser spec only to reproduce a failure CI reported, and + then only that spec. If a required check fails, fix the cause or revert + your change; never leave the branch red. 5. Measure again. If the checks pass and the measure is no worse, keep the change in the working tree and write its commit message (Conventional Commits, plain words) to {{STATE}}/COMMIT; the loop script commits it after