Skip to content

Image label to the observation's notes; ngrid and binaryseries_parameters carries - #288

Merged
jesshaley merged 6 commits into
V2from
claude/build-image-bodies
Oct 29, 2026
Merged

jesshaley merged 6 commits into
V2from
claude/build-image-bodies

Conversation

@jesshaley

Copy link
Copy Markdown
Collaborator

Builds three decisions from did-schema V_eta_go_forward_class_audit.md (2026-10-29). Nothing here has been run in MATLAB; CI is the first run.

[image label goes to the observation's notes] (supersedes [image label goes to notes])

  • +migrators_j/image_stack.m: when the source is a v1 image, the statement notes of the intensity observation is now the image block's label. It is written only when the label is non-empty, exactly as v1 wrote it. An imageStack still uses its own label. The data body gets no new field.
  • +migrators_j/image.m: removes the carry-051 carry of a labelled image, and the sourceId helper that only that carry used.
  • Tests (testMigratorsJ.m): testDidV1ImageWithALabelIsCarriedAsV1 is inverted to testDidV1ImageLabelIsTheObservationsNotes. New test testDidV1ImageWithNoLabelHasEmptyNotes.
  • Round trip not updated: there is no did2.convert.roundtrip.image. A v1 image is not read as raw v1 (rawV1Classes.m says why), so there is no inverse to change. Whether to build one is an open question.

[ngrid migrates to sampled bodies] + [ngrid with no statement carried]

  • +migrators/ngrid.m: a standalone ngrid is now carried whole as v1, needs_mapping. Before, the block was reshaped and data_size and coordinates were deleted (did-schema sqlitedb: make each write operation one transaction, recovered by replay #227). Under every V2 target, a document with an ngrid superclass gets +migrators_j/+super/ngrid.m, so this base migrator only runs on a document whose class is ngrid. That makes sqlitedb: make each write operation one transaction, recovered by replay #227's loss the same code, and it is fixed here.
  • +migrators_j/ontology_image.m: a vintage-B ontologyImage whose only non-empty edge is ontologyTableRow_id is now carried, needs_mapping, with a carried_as_v1 note. Before, it passed through with no note. The emitted body is the same as before.
  • The fold into sampled_body was already built wherever a statement exists (jNgridBody: hartley_calc, and the ontology_image raster arm). It is unchanged.
  • Tests:
    • testMigrators.m: the 3 ngrid tests that checked the reshape are inverted. Added a dispatcher test showing a standalone ngrid keeps all four v1 fields.
    • testNgridCoordinates.m: testBaseNgridMigratorStillReshapesAndDrops is inverted to testBaseNgridMigratorCarriesTheBlockUnchanged.
    • testRawV1RoundTripOntologyImage.m: testTheWriterDocumentRoundTripsAsAPassthrough is inverted to testTheWriterDocumentIsCarriedAndRoundTrips. New test: a writer document with an empty table row still passes through.
    • testNgridSampledBodyFold.m and testMigratorsJ.m: added assertions that the carry is noted.
  • Not covered by the decision, so left unchanged and asked: a vintage-B ontologyImage with no non-empty edge (imageDocMaker writes one when it is given no row), or with a subject edge next to the row.

[binaryseries parameters carried] (with [binaryseries parameters fold as decided])

  • +migrators_j/binaryseries_parameters.m: every v1 document is now carried whole as v1, needs_mapping. The invented-field guard and the raw read (carry-049 / carry-100) still run first. The placeholder normalising and the char-integer refusal are removed.
  • +roundtrip/binaryseries_parameters.m: header updated.
  • Tests:
    • testMiscSingletons.m: testBinaryseriesTemplatePlaceholdersAreDropped and testBinaryseriesRejectsNonEmptyCharInAnIntegerField are inverted. The populated-body test now checks the carry.
    • testRawV1RoundTripDemo.m: the binaryseries fixture's not-carried round trip is inverted to testBinaryseriesParametersIsCarriedAndRoundTrips.

Carry register

  • 3 new carry sites have no register row yet. Each marker says none, and check_carry_citations.py lists them:
    • +migrators/ngrid.m: standalone ngrid
    • +migrators_j/ontology_image.m: ontologyImage whose only edge is the table row
    • +migrators_j/binaryseries_parameters.m
  • carry-051 (image.label) is no longer cited by any carry site.

Python checks

  • check_carry_citations.py: OK. It reports 74 sites and 7 with no row; 3 of those 7 are new.
  • test_check_carry_citations.py: 19 tests, 0 failures.
  • check_migrator_roster.py: OK, after running --write.
  • The other tools/test_*.py files also pass.

Generated by Claude Code

[image label goes to the observation's notes] (Jess Haley, 2026-10-29): a
non-empty v1 image.label is written to the image observation's statement
notes (image_stack reads the image block's label); the carry-051 carry is
removed. testDidV1ImageWithALabelIsCarriedAsV1 is inverted.

[ngrid with no statement carried] (Jess Haley, 2026-10-29): a standalone
ngrid (+migrators/ngrid.m, the only document that base migrator still
reaches) is carried whole as v1, needs_mapping, instead of being reshaped
with data_size and coordinates dropped (did-schema #227); a vintage-B
ontologyImage whose only edge is its table row is carried, needs_mapping,
with a note (it was a silent passthrough). No register row exists yet: both
markers say none.

[binaryseries parameters carried] (Jess Haley, 2026-10-29): every v1
binaryseries_parameters is carried whole as v1, needs_mapping, after the
invented-field guard and the raw read; the placeholder normalising and the
char-integer refusal are gone. No register row yet: the marker says none.

Tests that pinned the old behaviour are inverted, not deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
did-schema 64ad58b8 adds the register rows these carries waited for:
binaryseries_parameters cites carry-122 ([binaryseries parameters carried]),
a standalone ngrid carry-123 and a row-only vintage-B ontologyImage carry-124
(both [ngrid with no statement carried]). Each marker names its row, each note
starts with its [carry-NNN] tag, and the tests that read the note prefix
expect the tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
…y one

testDidV1ImageWithNoLabelHasEmptyNotes read statement.notes through
document.get, which errors on a field the builder left out because it is
empty (did2:document:missingField, CI on 3b0b21d). It now accepts the field
being absent or empty, which is what the test is about.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (e6bb66e) to head (163f602).
⚠️ Report is 7 commits behind head on V2.

Additional details and impacted files
@@    Coverage Diff    @@
##   V2   #288   +/-   ##
=========================
=========================

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jesshaley
jesshaley deleted the claude/build-image-bodies branch October 30, 2026 13:58
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.

2 participants