Skip to content

#47: close out the cutover; D5 restated: Processor owns the pin; goldens from co-core directly - #49

Merged
gregoryfoster merged 9 commits into
mainfrom
47-post-cutover-d5
Oct 10, 2026
Merged

gregoryfoster merged 9 commits into
mainfrom
47-post-cutover-d5

Conversation

@gregoryfoster

@gregoryfoster gregoryfoster commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes out the cutover and restates D5 now that watcher#350 has deleted Watcher's extraction. These are the operator decisions of 2026-10-10, from #47's hand-off.

Trap 1: the new generator equals the old oracle

scripts/gen_parity_goldens.py is rewritten in place, so its path is unchanged and tests/test_drift.py needs no edit. It drives co-core's pure extract API directly and follows the path Watcher took at a5d6f34:

  • essence → extractor_for_essence;
  • config is {**extraction_config_from_spec, **extraction_overrides_for_essence};
  • the text is canonical_text, and its fingerprint is taken even when the text is empty;
  • a spec_fingerprint that raises becomes None.

On co-core 0.19.7 it reproduces all 13 committed goldens byte for byte. test_reproduces_every_committed_golden was green before goldens.json changed at all, and it stays as a standing test.

Tests and fixtures

  • Cross-implementation (trap 2): a test walks the script's AST. The script imports only the stdlib and co_core.pure.extract.*, nothing from processor.
  • Metadata (trap 3): the top level of goldens.json is now co_core, generated_by and goldens. Watcher's generated_by, watcher_commit a5d6f34…, watcher_processor_version 0.19.7+1 and co_core moved into v1_provenance. That move was a one-time hand edit, and no digest was touched. Every regeneration carries v1_provenance forward and refuses to run without it.
  • The bump note: each run prints every moved digest (case, field, old → new) and every added or removed case.
  • test_extract.py: the version check now asserts PROCESSOR_VERSION == f"{GOLDENS['co_core']}+{LOCAL_GENERATION}". The docstring now names the new golden source.

TDD evidence (CR 6). The red step wasn't committed separately; b1e6369 carries the test and the generator together. The reds seen in-session: the new test module failed to collect (ModuleNotFoundError: No module named 'src', the old generator), and after the metadata moved, test_processor_version_matches_watchers raised KeyError: 'watcher_processor_version'. CR 4's red is in its own run: a bare ValueError that didn't name the case.

Docs

  • Spec:
    • an amendment entry for 2026-10-10;
    • D5's row restated, with the lockstep history kept;
    • §5's bump rule: Processor decides, gives Watcher notice whenever processor_version moves, and coordinates only on a contract change;
    • §6 steps 4 and 5 marked done, linking watcher#326's gate verdict, its soak verdict, and watcher#350;
    • §7's golden source.
  • AGENTS.md lines 21 and 55. The rule "never regenerate to make a test pass" stays.
  • DEPLOYMENT.md: the co-core bump procedure.
  • Plan: docs/plans/2026-10-10-47-post-cutover-d5.md.

Not changed

Verification

  • uv run pytest: 597 passed, 6 skipped (after the CR round). The skips are the usual unreadable-credential denial cases.
  • ruff check and ruff format --check are clean.

Remaining for #47 (off-repo)

Refs #47, #1, #29, #37, epic #24, CannObserv/watcher#326, CannObserv/watcher#350.

🤖 Generated with Claude Code

gregoryfoster and others added 2 commits October 10, 2026 21:48
…r's v1 byte for byte

scripts/gen_parity_goldens.py, rewritten in place: imports only the stdlib
and co_core.pure.extract (a test walks its AST), and follows Watcher's
a5d6f34 path. On co-core 0.19.7 it reproduces all 13 committed goldens
byte for byte (trap 1), and that is now a standing test. goldens.json:
digests untouched; Watcher's metadata moved, once by hand, into
v1_provenance, which every run carries forward. Each run prints what
moved, for the bump note. The version check is re-anchored on
co_core + LOCAL_GENERATION.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oldens from co-core

Spec: an amendment entry; D5's row restated with its history; section 5's
bump rule; section 6 steps 4 and 5 marked done (watcher#326's gate and soak
verdicts, watcher#350); section 7's golden source. AGENTS.md lines 21 and 55
and DEPLOYMENT.md's bump procedure follow, with the never-regenerate-to-pass
rule kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gregoryfoster and others added 7 commits October 10, 2026 22:03
…er rerun their writer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t is generator == committed goldens

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ispatch, not co-core's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s written

At a bump such as #29's (cannobserv#523 refuses xpath/regex/jsonpath), the
traceback named only the extractor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The golden-source sub-bullet was spliced in mid-paragraph, leaving the
parent's Include: sentence trailing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 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.

1 participant