FIELD NOTES · SEARCH EVIDENCE

Define SEO invariants before the next release

Make the protected output explicit

A technical fix can disappear when a template is released again. The recurring problem is not solved by a green compile badge or a monthly screenshot of the home page. Before commissioning another release, name the old routes and fields that must remain unchanged, the exact additions allowed, the source versions and the person responsible for accepting the difference.

Google’s JavaScript guidance distinguishes response HTML from rendered content and describes canonical handling in both. It recommends consistency when JavaScript is used to set canonical values. Our invariant contract is an original acceptance choice built around such observable output; it is not a claim that Google requires this exact checker, field set or byte-equality policy for every website.

Replay the finite release record

The supplied input declares baselineVersion=sample-before and candidateVersion=sample-after. It protects /en/service/ with a main-hash label, canonical address and indexing flag, and approves only /en/new-guide/ as a new route. The offline checker compares those supplied records. A changed protected main fails even if the candidate also adds the approved new page; an unapproved extra route fails as well.

These are fictional hash labels, not authenticated captures. The program never reads Git, HTML, screenshots or a live server. A fabricated record can pass, which is why real acceptance must retain the original responses and their actual hashes outside this teaching input. Missing versions, duplicate paths and a non-boolean indexing flag are rejected rather than silently repaired.

Preserve failure before correcting the batch

Download the checker, filled input, recorded output and tests into one folder. Run the two commands shown below with an existing Python3 runtime. The tests challenge changed mains, metadata, missing and extra routes, malformed records and source-version omissions. The result is SELECTED_RECORDS_MATCH or a list of differences within this declared model. It is not a release button.

For actual work, keep the accepted earlier snapshot, the failed comparison, the smallest authorised correction and a newly dated comparison. Do not overwrite the earlier baseline with the candidate to make a failure disappear. Coverage remains finite: checking two paths does not certify every old page, and preserving a technical invariant does not prove a ranking or AI-citation improvement.

Six filled review cases

The table contains manual evidence-review labels. The separate CLI checks only its declared fields in filled-input.json; it does not execute this manual table or inspect actual HTML.

Synthetic teaching records only. No client, live account, measured search result or platform certification is represented. On narrow screens, scroll the table.

Input / caseReview outputEvidence to obtain
A · Build passes; rendered canonical changed outside approved scopeRELEASE_INVARIANT_FAILEDA compilation result does not compare protected output
B · New route added; all approved old mains equalSELECTED_OUTPUT_PRESERVEDProves only the selected versioned check set
C · Raw HTML differs, rendered canonical matchesTWO_REPRESENTATIONS_REVIEWRetain both, do not silently normalize a defect away
D · Earlier baseline replaced by current output after failureBASELINE_RESET_INVALIDKeep failed comparison and obtain a scoped correction
E · An unapproved new route appears in the candidate setUNAPPROVED_ROUTEThe allowed addition set is finite
F · A protected route has two candidate recordsINVALID_INPUTAmbiguous records cannot establish retention

Return a checkable handover

  1. Name protected routes, fields, owners and the exact allowed delta.
  2. Capture source/build identities and before/after rendered evidence.
  3. Pass actual output comparison before observing external search effects.

A test report lists exact route coverage, failed assertions and both baseline hashes; it cannot certify unseen pages.

No new audit cron, monitoring slot, production repair, shared dependency change or causal ranking guarantee.

Sources and filled exercise

Original public question · Demand provenance only; comments, diagnoses and reported outcomes are not adopted.

Official supporting passages checked 6 November 2026. Our case labels and acceptance procedure are original choices; product guidance can change.

Exercise instructions · Filled bilingual review records

Continue with the related, separately scoped acceptance task.

Download these four files into one folder: invariants.py · filled-input.json · actual-output.json · test_invariants.py

python3 -B invariants.py filled-input.json
python3 -B -m unittest -v test_invariants.py