Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/incidents/cv_portal_branch_from_a_guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# cv. `cv_portal_branch_from_a_guess`

**What happened:** A camp registration page embeds a vendor's portal in a frame. The run that added it wrote an end-to-end page object with two branches on the portal's state: registration closed (the camp's button disabled, it must say so) and registration open (choosing the camp must fill the cart). Its coder tried to load the portal with Playwright, the shell refused the command, and it wrote the open branch from test-id strings found in the vendor's script bundle. Only the closed branch ever ran. The next ticket's run edited the same file, kept the branch untouched, and re-wrapped a test's lines no formatter checks. The day the vendor opened registration the open branch failed on every branch: a signed-out visitor who picks a camp gets the vendor's sign-in drawer and the cart stays at $0. The review's probe gate saw none of it: it read only added lines, and only `getByTestId('…')` written on one line, so the page object's wrapped and pattern ids were invisible to it.

**The guarantee:** An end-to-end file that drives another company's page (named by its host, or in a frame) carries only test ids a probe of that page saw, the ones a write adds and the ones it keeps, wrapped or written as patterns (`common::e2e::probe`). In every coder round the write is refused until the `probe_page` tool has run, and the round commits the record (`live_guard`). The probe clicks through the states a branch reads and lists each test id's state and what each click brings up, and the pull request quotes it. Each arm of a test branch on the page's state is labelled unverified in the pull request until a run takes it (`common::e2e::branches`); when a fresh probe shows the page in the state an arm needs, the coder is sent to run it against the live page. A write that only reformats a file is not made, a write's formatting hunks are put back where CI doesn't check formatting (`common::diff_shape`), and a file only reformatted on the branch goes back after the build.
Loading
Loading