Skip to content

Delete the legacy tests that no documented source backs - #4578

Open
evanchooly wants to merge 1 commit into
audits-stage-familyfrom
audits-delete-unbacked
Open

evanchooly wants to merge 1 commit into
audits-stage-familyfrom
audits-delete-unbacked

Conversation

@evanchooly

Copy link
Copy Markdown
Member

As you decided: remove the legacy tests whose fixtures have no documented source. Stacked on #4577.

Problem

183 legacy fixture directories still ran through TemplatedTestBase's legacy loader, which step 7 retires. 167 of them had no documented source that reproduces them:

  • 96 locked fixtures listed as unresolved in form-review.json: undeclared edits, page errors, text the normalizer can't read, commands outside the database, and so on;
  • 69 never-locked fixtures with no matching page in legacy-references.json;
  • 2 tsIncrement/tsSecond directories that held only a name and a lock.

Change

  • Deleted: the 165 owning test methods and all 167 fixture directories. 40 test classes were left with no tests and were removed, along with 40 now-empty operator resource directories.

  • audits/catalog/deleted-fixtures.json records each deletion: the test with its body digest (null for the two unowned directories), every fixture file's SHA-256, and the reason (the gap that left it without a source). In the audits module, FixtureDeletions:

    • remove drops the deleted tests from the frozen binding catalog, each exactly as recorded;
    • retired gives the preservation check the original digests;
    • verify requires each deletion to be gone, recorded once, with a reason.

    LegacyBindingsTest uses all three, alongside the migration ledger.

  • Removed with them:

    • the stale unresolved entries in form-review.json and legacy-references.json;
    • 93 lock reasons in repair-review.json that no remaining lock uses;
    • the two binding-policy entries for the unowned directories.
  • Inventory:

    • 20 examples whose only owner was deleted have generic titles and get reviewed names in example-names.json, such as $limit's "Return the First Five Movies";
    • two owner reviews whose chosen fixture was deleted are dropped.
  • Generation: 12 of the newly unowned examples are generated from their pages, integrated under both mappers and promoted, for 38 generated cases. $bitOr's "Long and Integer" example is excluded again, for the page error tracked in Follow up: report two mongodb/docs operator page errors #4563.

Result

  • 16 legacy directories remain, none locked. All have a documented source:
    • 15 legacy-only cases in cutover.json, each with the strict check it fails;
    • type/queryingByMultipleDataTypes, which needs alternative commands.
  • Retiring the legacy loader now depends only on those 16.

Decisions for review

  • The 20 new names are my proposals, like those in Review the generic and ambiguous example names #4573.
  • Deleted coverage. The deleted tests exercised real Morphia behavior; they're gone because they couldn't be tied to documentation. Twelve of their examples are back as documentation-backed generated cases. The rest need bindings, or their pages can't be read.

Verification

  • Core operator tests: 551 pass under Critter, then reflection (704 − 165 deleted + 12 generated).
  • Audits suite passes under both mappers: preservation, frozen catalog, cutover completeness and manifest.

Self-reviewed only: the independent reviewers are out of quota until 2026-11-26.

167 legacy tests and fixtures had no documented source that reproduces
them: 96 locked fixtures, 69 never-locked ones with no reference, and two
directories that held only a name and a lock. They are deleted, and
deleted-fixtures.json records each test's body digest, the fixture
files' digests and the reason, which the frozen-catalog and preservation
checks now honour. Stale review entries go with them, the newly exposed
untitled examples get reviewed names, and twelve of the exposed examples
are generated from their pages instead.

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