Skip to content

feat: production baseline fixtures from billgrokker.com - #11

Merged
diegohb merged 5 commits into
issue-1-initial-rollout-specfrom
issue-3-baseline-fixtures
Nov 23, 2026
Merged

diegohb merged 5 commits into
issue-1-initial-rollout-specfrom
issue-3-baseline-fixtures

Conversation

@diegohb

@diegohb diegohb commented Nov 23, 2026

Copy link
Copy Markdown
Member

Closes #3

What

  • \scripts/capture-baseline.ts\ + \scripts/capture-baseline\ npm script: Playwright headless Chromium capture of the SPA-rendered <head>\ (title, every meta, canonical, parsed JSON-LD in document order) for all 9 routes from the ticket table, after networkidle plus a settle-wait (head fingerprint unchanged for 5 consecutive 250 ms polls, 20 s cap).
  • \scripts/normalize.ts: shared normalization module (single source of truth for Baseline synthesis tests: package API reproduces production output #6), documented in \ ixtures/baseline/NORMALIZATION.md.
  • \ ixtures/baseline/.json\ for all 9 routes with metadata: captured-at (date-only), source repo SHA, sitemap lastmod/changefreq/priority for the seven sitemap routes, HTTP status, normalized head, and a \�ill\ block (title/dates/policyArea/breadcrumbs) for the two bill routes so synthesis tests never hit the BillGrokker API.
  • README section documenting the manual \�aseline: recapture\ PR procedure.

Route -> file

Route File Status
/\ \home.json\ 200
/bills/search\ \�ills-search.json\ 200
/faq\ \ aq.json\ 200
/faq/companion-bills\ \ aq-companion-bills.json\ 200
/bills/119/hr/1\ \�ill-119-hr-1.json\ 200
/bills/119/s/5653\ \�ill-119-s-5653.json\ 200
/not-found\ \
ot-found.json\ 200 + 404-signal metas
/account/login\ \�ccount-login.json\ 200, noindex
/account/signup\ \�ccount-signup.json\ 200, noindex

Idempotence verification

Two consecutive full capture runs, all 9 files SHA-256 identical:

\
A1CCC7197BC82792... account-login.json
010E4B7A546909E6... account-signup.json
7696C22ED25E4893... bill-119-hr-1.json
92DA6934EB2613AE... bill-119-s-5653.json
A408F848F09C9A02... bills-search.json
E59B8358A0E11076... faq-companion-bills.json
7984587F105903B1... faq.json
1689C6659409C507... home.json
A71A12E916C442D2... not-found.json
\\

\git status\ clean after the second run (no diff outside {{NOW}}\ fields, none inside either).

Normalization rules invented

Two rules, both in \NORMALIZATION.md\ and implemented in \scripts/normalize.ts:

  1. Runtime-now ISO datetimes (date part == capture date) -> {{NOW}}. Applied to the search page's \dateModified.
  2. Runtime-now bare dates -> {{NOW}}. Not observed in this capture, kept as documented defense.

Documented trade-off: real dates coinciding with the capture day are also tokenized (content-based detection cannot distinguish them); the sitemap \lastmod\ metadata keeps originals.

Deviations

@diegohb
diegohb merged commit f10f65f into issue-1-initial-rollout-spec Nov 23, 2026
1 check failed
@diegohb
diegohb deleted the issue-3-baseline-fixtures branch November 23, 2026 05:51
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.

1 participant