Repository navigation
Retire DOCS_ERROR and FIXTURE_CURATION locks through reviewed corrections - #4535
Open
evanchooly wants to merge 1 commit into
Open
evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
…ions A FormCorrection replaces, removes or adds one documented field, pinned to the documented value so a changed page makes it stale. Corrections are discovered field by field after rules and retypes, never reach a whole file or top-level row, and are allowed only for DOCS_ERROR and FIXTURE_CURATION locks. fetch.py falls back to the page before the manual move and to the first page for fixtures that predate it, recorded as AFTER_ORIGIN.
This was referenced Nov 21, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #4534. Step 4, slice 5 of the operator audit plan: the
DOCS_ERRORandFIXTURE_CURATIONlock families.Problem
These locks mark fixtures that deliberately differ from the docs.
DOCS_ERRORmeans the docs are wrong:bsonSizeprints sizes the server doesn't return,binarySizemisspellstea_setin the expected output, andrankdocuments the wrong rank.FIXTURE_CURATIONmeans Morphia changed something on purpose:$graphLookupreads from the harness collectionexample_test, andtoUUIDdrops generated ids.The lock text says why the fixture differs, but not what changed or which source it was checked against. So an upstream change can't be detected, and nobody can see exactly what was edited.
Change
FormCorrection(file, pointer, documented?, curated?, index?)is a reviewed correction to one field. It works in three modes:A rename is a remove plus an add. The documented value is pinned in extended JSON, so if the page no longer documents exactly that value, the correction is stale instead of applying to something else.
Corrections are discovered field by field, after form rules and number retypes. Discovery keeps going after each one, so every edit in a document needs its own correction. These differences are never corrected and stay gaps:
Form rules are preferred: rule minimization never drops a rule if doing so needs more corrections. Each correction must be necessary.
Corrections are allowed only for
DOCS_ERRORandFIXTURE_CURATIONlocks.fetch.py candidateshas two fallbacks:SourceRelation.AFTER_ORIGIN(only$toUUID).The one
lockdmarker is handled, and each declaration records its marker's name.Result
52 such locks have no family outside
MORPHIA_FORM,NUMERIC_TYPE,DOCS_ERRORandFIXTURE_CURATION.onNull, dropped ids and the harness collection name.Totals are now 91 overrides and 51 unresolved. The inventory shows 91
OVERRIDDEN, 143PRESERVED_CURATEDand 145 locked examples. Recapturing the earlier 62 overrides and 28 gaps gave identical results.Decisions to review
degreesToRadiansalso removes the documentedObjectId_idfrom its expected row. Its lock only says "the angle_a's were different". I accepted it as a reviewed decision and documented it.toUUID's source page is newer than the fixture (AFTER_ORIGIN). It pins the values the correction changes, but it isn't the fixture's provenance.Verification
FormCorrectionsTest(pinning, staleness, remove/add in place, out-of-range position, row floor) andFormMigrationTest#valueCorrectionsNeedADocsErrorOrCurationLock(category gating, field-level discovery, rules kept over corrections, a changed page rejected).toUUID's provenance wasn't explicit. All of that is fixed.