Skip to content

docs(scanner): record #219's rulings and measurement mode's local-only rule (#231) - #236

Merged
plainprogrammer merged 8 commits into
mainfrom
231-scanner-rulings
Nov 9, 2026
Merged

plainprogrammer merged 8 commits into
mainfrom
231-scanner-rulings

Conversation

@plainprogrammer

Copy link
Copy Markdown
Owner

Closes #231
Refs #218, #219

Records the maintainer's rulings from #219 (1–3) and #218 (6) in docs/architecture/scanner.md, corrects one comment, and adds one guard example. No spec and no ADR (routing confirmed by the coordinator); no shipped spec is edited (spec 027 D4).

What changed

Evidence the guards can fail (temporary edits, reverted, not committed)

  • CSP: no new example, because spec/requests/footer_spec.rb ("under the scanner's Content-Security-Policy") already matches the whole header exactly, including data: and blob:. With policy.frame_ancestors :self deleted from ScannerPage, both of its examples fail (2 examples, 2 failures).
  • Local-only replay: with before_action :require_local_request deleted from ReplaysController, only the new example fails (18 examples, 1 failure). The existing AC-5.6 example covers the strip and photo routes only.

Implementation review

Read-only, Opus. Verdict: NEEDS CHANGES, all wording or test-comment findings, fixed in 9fe4912 and e947f03. It checked the four measurement controllers, the CSP directives and its spec, the OCR worker's lifetime, name_printings, and the spec citations.

  • Major: three "no spec source" claims were false. Spec 007's contract lists the policy header and marks the replay and strips local-only, and spec 009's contract gives Other printings' 404. The doc now says "in the contract, in no criterion"; only the photos route has no spec text.
  • Major: tenancy-and-accounts.md still said ruling 6 had no source (a table row and the counts); fixed.
  • Minor: the sign-in invariant ignored the local-only routes; "nothing is kept across visits" overreached, since the worker is never terminated; "pinned by" overstated what reading_spec.rb pins (English-only isn't pinned, and a card with no English printing isn't a candidate); the new example's comment gave sign-in as its reason while the example was signed in (now it signs out before the last request).

No second review round was run: the fixes were wording and one example line.

Verification

  • bin/rspec --dry-run: 2839 examples, 0 failures; the full bin/ci passed in the pre-push hook on 4c99247.
  • Not checked in a browser: no view, partial, stylesheet or UI copy changed, so the design-system skill wasn't used.

Owed to the maintainer

  • Other printings' 404 is now cited to spec 009's contract (no criterion); no change needed unless you want it as a criterion.
  • Merge note for the tenancy doc: the "no spec source" count there is now three; later merges recompute it from the clauses left.

🤖 Generated with Claude Code

plainprogrammer and others added 8 commits November 9, 2026 11:28
The replay page and its upload skip sign-in, so they are held to this machine
on top of measurement mode being on (#218 ruling 6). The existing example
covered the strip and photo routes only; removing the replays' before_action
now fails this one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The comment said the worker is kept across Turbo visits, but the scanner's
head asks for a full load on every visit so the camera is released
(spec 007 FR-2), which creates the worker again. #219 ruling 2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…y rule (#231)

The policy's extra directives, one OCR worker per page load and the read-set
preference are rules decided by #219; measurement mode's strip, photo and
replay routes answer local requests only, by #218 ruling 6. Each names its
issue, #218 and #219 are in Sources, and the no-spec-source marks are replaced.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… cite #219 in the policy comments (#231)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ule and the 404; narrow what is pinned (#231)

Implementation review: spec 007's contract already lists the policy header and
marks the replay and strips local-only, and spec 009's contract gives Other
printings' 404, so only the photos route has no spec text. The worker is never
terminated, and the read-set spec doesn't pin English-only. The tenancy doc's
photos/replays/strips row no longer says ruling 6 has no source.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ain open (#231)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Keeps both sides in tenancy-and-accounts.md: main's #230 wording, minus ruling
6's clause, which the scanner doc records; three no-spec-source behaviours remain.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@plainprogrammer plainprogrammer self-assigned this Nov 9, 2026
@plainprogrammer
plainprogrammer marked this pull request as ready for review November 9, 2026 17:08
@plainprogrammer
plainprogrammer merged commit 9c8dc13 into main Nov 9, 2026
9 checks passed
@plainprogrammer
plainprogrammer deleted the 231-scanner-rulings branch November 9, 2026 17:08
plainprogrammer added a commit that referenced this pull request Nov 9, 2026
Takes main's text for the shared lines of tenancy-and-accounts.md (#235, #236) minus this branch's own clause, and recounts: two behaviours remain with no spec source (#229).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scanner area doc: record #219's rulings and measurement mode's local-only rule

1 participant