Skip to content

feat: revised-vs-superseded disambiguation via lead-signature fingerprint (almanac-template#11 item 3)#20

Merged
rudi193-cmd merged 1 commit into
mainfrom
feat/revision-drift-check
Jul 1, 2026
Merged

feat: revised-vs-superseded disambiguation via lead-signature fingerprint (almanac-template#11 item 3)#20
rudi193-cmd merged 1 commit into
mainfrom
feat/revision-drift-check

Conversation

@rudi193-cmd

Copy link
Copy Markdown
Contributor

Summary

Implements item 3 of almanac-template#11: revised vs superseded disambiguation. Also closes SCHEMA-V2.md open item #2 (observed.fingerprint_result computation, previously unbuilt) since it's a hard prerequisite.

The genuine ambiguity flagged in SCHEMA-V2.md open item #5 is only on redirect: is the resource moved (same thing, relocated) or superseded (something else now sits there)? Same-URL drift is already unambiguous per the existing status table (revised, full stop).

Design: adds fingerprint.lead_hash — a second, narrower fingerprint (hash of normalized title + lead excerpt) captured alongside the existing full-artifact sha256. This lets drift be classified as cosmetic (nav/ads/footer churn) vs substantive (the actual claim changed) without storing or hosting page content — consistent with the schema's "catalog, don't host" rule; it's a hash, same as sha256, just over a narrower, more stable region.

Disambiguation, cheapest signal first:

  1. Full hash still matches after redirect → moved (strongest evidence)
  2. Full hash drifted, lead_hash still matches → moved
  3. lead_hash also drifted → superseded
  4. No lead_hash baseline to check → honest default → redirected

Per item 5's leaning, this proposes via issue (reusing the GitHub client from alert_on_dead_links.py/alert_on_recovery_rot.py — third reuse now) and never auto-writes status/status_since/status_source. Read-only otherwise.

Test plan

  • pytest tests/ -q — 32 passed (17 existing + 15 new), no regressions
  • python scripts/validate.py — schema still valid, live catalog entry still validates against the extended schema
  • ruff check — clean
  • Live smoke test: fetched https://example.com, confirmed _fetch/sha256_hex/lead_hash/classify work end-to-end against a real response
  • Ran check_revision_drift.py --json against the live catalog — clean [] (no entries have a fingerprint.sha256 baseline yet, expected for this early-stage catalog)

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

…rint (almanac-template#11 item 3)

Closes SCHEMA-V2.md open item #2 (compute observed.fingerprint_result) and
resolves the ambiguity in open item #5: on a redirect + content drift, is the
resource moved (same thing, relocated) or superseded (different thing now)?

Adds a second, narrower fingerprint -- fingerprint.lead_hash, a hash of the
normalized title + lead excerpt -- so drift can be classified as cosmetic
(nav/ads/footer churn) vs substantive (the actual claim changed) without
storing or hosting page content (schema rule: catalog, don't host).

Disambiguation, cheapest signal first:
  1. Full-artifact hash still matches after redirect -> moved (strongest).
  2. Full hash drifted but lead_hash still matches -> moved.
  3. lead_hash also drifted -> superseded.
  4. No lead_hash baseline to check -> honest default -> redirected.

Same-URL drift is unambiguous per the existing status table (revised, full
stop) and needs no lead-signature check at all.

Per item 5's leaning: this PROPOSES via issue (reusing the GitHub client from
alert_on_dead_links.py / alert_on_recovery_rot.py), never auto-writes status,
status_since, or status_source. Read-only otherwise.
@rudi193-cmd
rudi193-cmd merged commit 8c9e26d into main Jul 1, 2026
1 check passed
@rudi193-cmd
rudi193-cmd deleted the feat/revision-drift-check branch July 1, 2026 18:30
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