Skip to content

Retire the legacy RST extractor and form-migration commands - #4588

Open
evanchooly wants to merge 1 commit into
audits-structured-inventoryfrom
audits-retire-rst
Open

evanchooly wants to merge 1 commit into
audits-structured-inventoryfrom
audits-retire-rst

Conversation

@evanchooly

Copy link
Copy Markdown
Member

Stacked on #4587 (audits-structured-inventory). Step 3 of the parser retirement.

Problem

After #4587 the inventory and discovery read operator pages with the structured extractor, but the old path was still in the tree. That was the legacy RST extractor (rst/, model/), GizaExtracts, audits/probes/form-sources/fetch.py (along with a committed __pycache__ .pyc), and the FormMainKt commands that read historical pages through it. Those commands no longer had any work to do:

  • form-review.json has 0 pending declarations (136 migrated);
  • form-migration.json has 0 overrides and 0 unresolved;
  • all 250 legacy-references.json references point at fixtures that are already in the fixture-migration.json ledger (386 entries).

Keeping the old code meant a second parser to maintain, tests for extraction failures nobody hits anymore, and docs describing commands that would only produce empty diffs.

Change

  • Deleted:
    • rst/ and model/;
    • repairs/GizaExtracts.kt;
    • fetch.py and its .pyc;
    • the GizaExtracts, RawCodeBlock and Snippets tests, and their parser/ fixtures;
    • the FormMainKt commands draft, capture, apply, references, recheck-references, migrate and convert;
    • AuditJson.formCandidates.
  • Kept: FormMainKt keeps rescenario and manifest. FormMigration.documented, FormEquivalence, FormCorrections, NumericRetypes and PublishedComparison stay because they are still in use; PublishedComparison will be used by the option (c) update reads.
  • Offline checks: FormMigration.verify(review, report) and verifyReferences(report, moved) check the frozen catalogs offline. Declarations must match overrides, override digests must match, references must not be duplicated, reference digests must match, and every referenced fixture must be in the ledger. A new test, referenceChecksRejectDrift, shows both a missing ledger entry and an edited source text being rejected.
  • Docs:
    • The README's "Converting legacy cases" section becomes "Legacy cases".
    • operator-audits-design.md gains a "Frozen records" section.
    • operator-audits-reference.md's "Generated cases" and "Scheduled discovery" sections were stale since Inventory documented examples with the structured extractor #4587 and now describe plan/inventory and SourcesMainKt/DocumentsMainKt.
    • The test-generation doc now uses the past tense for the retired commands.
    • The form-migration doc is marked as a historical record.
    • The original plan doc notes that its rst/ and model/ links no longer resolve.
    • The progress log has a new entry.

Decisions to review

  1. Retired more than the approved list. migrate and apply were also retired, beyond the approved list (draft, capture, references, recheck-references, convert, and fetch.py candidates/references). They only act on unmigrated declarations or unconverted fixtures, and there are none of either.
  2. reproduce and the legacy-layout checks are removed. They compared catalogs against legacy fixture folders, and those folders no longer exist for any case, so they couldn't run on the frozen data. Integrity is now checked through the digests and ledger membership described above.
  3. The reference doc's discovery and inventory sections are fixed here, although they went stale in Inventory documented examples with the structured extractor #4587.

Testing

  • Audits suite: 437 tests, 0 failures, 4 skipped. A Codex review ran it under both Critter and reflection.
  • Local review: one Codex round, no findings.

Self-reviewed only.

Delete rst/, model/, GizaExtracts, fetch.py and the FormMainKt commands
that read historical pages (draft, capture, apply, references,
recheck-references, migrate, convert). Every fixture has moved, so their
catalogs are frozen: FormMigrationTest now checks the migrated
declarations and references offline, including that each referenced
fixture is in the ledger. FormMainKt keeps rescenario and manifest.
Update the README and design docs to match.

This branch has not been deployed

No deployments
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