Skip to content

Commit 047c95f

Browse files
alicodingclaude
andcommitted
docs(rules): e2e server-isolation decided at spec-writing time; UI changes ship with a reviewed screenshot
Both rules from the same day's failure classes: cohabitation/order dependence bit twice (atlas session bleed, guardrail file-order history), and two pipeline-green visual defects were caught only by eyes (selection invisibility, sticky ring). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
1 parent 3378c8f commit 047c95f

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.claude/rules/testing.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,30 @@ folklore in agent-brief prose. The standing rules:
242242
code-coverage collection (heavy, low signal over per-test
243243
assertions); octocov-style coverage actions (a 15-line floor
244244
script suffices; no new CI dependency).
245+
246+
## Shared-pool vs dedicated e2e servers — declare it up front
247+
248+
A spec whose assertions read GLOBAL app state that other tests can
249+
write — queue/filter contents, review history, session state, exact
250+
counts over seeded collections — runs on a DEDICATED server pair
251+
(the guardrail-authoring/guardrail-review pattern: per-test spawn,
252+
own port constants in fixtures/server.ts with a reasoning comment).
253+
The shared worker pool is for specs whose assertions are scoped to
254+
entities they create and delete themselves. This is decided when the
255+
spec is WRITTEN, named in its header comment — not discovered as a
256+
CI-only cohabitation flake later (the class that bit twice on
257+
2026-08-17: atlas session bleed, then guardrail's filter dropdown
258+
depending on file-order history). Corollary: no test may depend on
259+
state left by an EARLIER test, same file included — a test that
260+
needs history seeds it inline.
261+
262+
## UI changes ship with a reviewed screenshot
263+
264+
Every UI-touching change gets a screenshot of the changed state
265+
(the builder takes it; server-mode + Playwright is enough) reviewed
266+
against the design contract BEFORE the PR opens — assertions prove
267+
elements exist, the screenshot is where "green but visually wrong"
268+
gets caught (the selection-invisibility and sticky-ring classes:
269+
both pipeline-green, both caught by eyes). This extends the
270+
existing "restate the task, not the elements" rule with a concrete
271+
artifact; it replaces nothing.

0 commit comments

Comments
 (0)