Skip to content

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

Closed

Description

@plainprogrammer

From #219 (rulings 1–3) and #218 (ruling 6), maintainer, 2026-11-09. Mostly documentation in docs/architecture/scanner.md, which marks each of these "no spec source" today.

  1. The scanner's CSP extras are policy (Scanner: three behaviours no spec describes (CSP's extra directives, the OCR worker's lifetime, a name candidate's printing) #219-1): object-src 'none', base-uri 'self', form-action 'self', frame-ancestors 'self', font-src 'self', and img-src's data: and blob: (app/controllers/concerns/scanner_page.rb). Record them as decided by Scanner: three behaviours no spec describes (CSP's extra directives, the OCR worker's lifetime, a name candidate's printing) #219, alongside spec 007 AC-2.4 and ADR 0001. Check whether any spec already pins them; if none does, add an example that checks the scanner page's header carries all of them (test-first: it's a new guard of existing behaviour, so prove it fails when one directive is removed).
  2. A fresh OCR worker per page load is the rule (Scanner: three behaviours no spec describes (CSP's extra directives, the OCR worker's lifetime, a name candidate's printing) #219-2). The scanner's turbo-visit-control: reload exists so the camera is released (spec 007 FR-2). Correct the comment in app/javascript/scanner/recognition.js (it says "kept across Turbo visits"), and record the rule.
  3. The read-set preference is the rule (Scanner: three behaviours no spec describes (CSP's extra directives, the OCR worker's lifetime, a name candidate's printing) #219-3): a name candidate's printing is the one in the set the collector line read, else its newest English printing (MTG::Reading#name_printings, pinned by spec/models/mtg/reading_spec.rb). Record it.
  4. Measurement mode answers local requests only (Accounts and sessions: six behaviours no spec describes #218-6), on top of the mode being on, because its routes skip sign-in (MeasurementMode#require_local_request). Record it as a rule.

Each statement names its issue as source; #218 and #219 go in the doc's Sources. No spec edits (shipped specs stay frozen, spec 027 D4).

🤖 Generated with Claude Code

Activity

  1. added a commit that references this issue on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

housekeepingRoadmap housekeeping lane, taken between specs

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions