Repository navigation
Conversation
did-schema #414, flat document layout. On the flat kind-cell schema the quick tests failed reading documents they built as nested. The reads named by the first flat run (V2 614f83f, quick run 47225707855) move, by script (fix_sites: the failing line, then reads of the same expression in the same test function), to did2.document.idOf (EXPR.base.id), did2.document.blockOf (EXPR.<class>.<field>) and, for value cells, the new test helper did2.unittest.helpers.valueCell, a wrapper of did2.schema.cache/valueCellIn ([no kind value alias]); doc.get('<kind>.value...') reads move to valueCell in every test file. Reads of v1 inputs (v1*, pre*, legacy*, raw* roots) stay nested. Hand fixes: testBuild doc.(cls) reads; one dose absence check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
did-schema #414. Helpers that select documents by a block's presence (isfield(d, 'entity'), isfield(d, 'base') && ...) found nothing on a flat document, so lookups came back empty or absence checks became vacuous. They read through did2.document.blockOf / idOf, and value cells through did2.unittest.helpers.valueCell or did2.schema.cache/valueCellIn (the flag: [no kind value alias]): classKey, carryNote, failureDocuments, tuningSummary, and the local lookups in 20 test files. Two tests that edit a built document (testTuningDecisions relabel and withParameter) write the cell or block where the document keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
did-schema #414. From the second flat run (c3d33f7, quick run 47228058895): the next failing reads move to did2.document.idOf / blockOf / did2.unittest.helpers.valueCell, by the same script, with a hand-kept exclusion list for reads that are not of a built document (a summary keyed by class, a time view) or that assert the nested shape (reported in the PR). Whole-block reads doc.get('<class>') and doc.get('relation.<path>') (the class relation, whose name a flat directed_relation also uses for its relation term) read through blockOf. Reads of the value's data-body flag (value.data_body nested, external flat) read through the new test helper did2.unittest.helpers.valueIsExternal, the EXTERNAL output of did2.schema.cache/valueCellIn ([no kind value alias]). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
did-schema #414. From the third flat run (c955223, quick run 47229902613): the next failing reads, by the same script (now only for an error raised in the test file itself, not in code it calls) and by hand: - testBuildGaps names its gap and known-defect paths through did2.build.gapPath ([flat accessor names]) and compares the report's paths with the same names; - testBuild's valueNowhere test clears the flag where the document keeps it (value.data_body nested, external flat), and its dose reads read the cell through valueCell; - block-guarded absence and presence checks (isfield(X, 'B') && isfield(X.B, f)) read through blockOf, so they are not vacuous on a flat document; - reads of an element of a value cell (X.<kind>.value(1).f) read getfield(valueCell(X), {1}, f); - testRawV1RoundTripElement edits its older-shape entity where the document keeps its fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
did-schema #414. From the fourth flat run (e1b6db8, quick run 47231644417): the next failing reads, by the same script and by hand (testMigratorsJMethodParams' pipeline-entity premise, the testNonSpecimenGroupOwners body lookup, the release-date value cell in testResolveOpenmindsCitations). Two script rewrites of reads that are not of a built document (a rebuilt v1 element, a time view) are left as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
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.
Draft. Flat-layout follow-up (did-schema #414), DID-matlab test code: tests read the v2 documents they build through the layout accessors, so the suite passes on did-schema
main(nested) and moves toward passing on the flat kind-cell schema before did-schema switches layout (step 8). Measurements and the list of tests that assert the nested shape itself are being filled in; this body is updated when the runs finish.The flat-schema runs (
test-builder.yml,test-migrators-quick.yml, through the did-schema mirror branchclaude/flat-test-reads= did-schema #469's head withmainmerged) are red by design until step 8.Generated by Claude Code