Repository navigation
Run integration of the published experiment description (Stage 1, PR 11) - #209
Merged
Merged
Conversation
A run whose output folder holds a published morphobricks.toml reads it with the strict reader, refuses units with more than one channel layout (R_HETEROGENEOUS_LAYOUT_NOT_ENABLED) and records experiment_description in the manifest: the file's SHA-256, section digests, image-type verification, mask file status and the publication records copied unchanged. The mask step checks each declared mask's representation (R_MASK_CONTRADICTS_REPRESENTATION) and records what it checked in mask_representation.json. A run without a description is unchanged and warns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
The no-fallback scan allows code literals only in description_rules.py; the two codes the run and the mask step raise live beside the other R_* constants of physical_check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
# Conflicts: # CHANGELOG.md
main now validates each record against the Spec record shapes (#207), so the four-key record this test wrote was refused and nothing was run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
This was referenced Nov 8, 2026
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.
What changed
Stage 1 design PR 11 (design section 3 "Run" and "Explicit refusal of heterogeneous runs at Stage 1"). Related to issue 170 (canonical channels recorded in the manifest); it does not close it.
With a published
morphobricks.tomlin the output folder,run:R_HETEROGENEOUS_LAYOUT_NOT_ENABLED(layouts and units named; nothing processed);R_*checks against the folder and image headers (these were not wired into the run before);experiment_descriptioninrun_manifest.json: SHA-256 of the file, section digests, which units' image type was header-verified, status of every declared mask file (checked/not yet checked, with images having a mask out of images), andmorphobricks.records.jsonlcopied unchanged.The mask step (
maskscommand,describe_masks) checks each declared mask's representation: abinarymask with more than two values isR_MASK_CONTRADICTS_REPRESENTATION(CLI exits 1,MaskStepResult.issues). What it checked is written tomask_representation.json, each file bound to the fingerprint it had when read, so a new batch isnot yet checkedagain. Publication and the run read no mask pixels.Owner Q1: a run without a description is the v0.4 run (byte-identical outputs, no new manifest key) and issues a
UserWarning.Conformance P04, P05, P11, P28 are in
tests/test_spec_run_description.py(added to the Spec gate's expected modules).Why
The notebook and later stages need the run to carry the confirmed description and to stop on layouts it cannot process yet.
Regression tests
tests/test_spec_run_description.py(9 tests) andtests/test_run_description.py(10). Run againstorigin/maincode the Spec file gives 9 failures; for exampletest_p04_heterogeneous_layouts_are_refused_and_nothing_is_processed[v04]fails because the old run writes the output (assert not True), and v05/v06/v17 give onlydifferent_channel_counts, not the Spec code.Checks
python tools/check.py: ruff and code rules clean; 4170 passed, 4 skipped, 0 failed. The 4 skips are environmental (case-sensitive file system x3, running as root x1), none Spec or parity. The v0.4.0 parity suite (tests/test_parity_v0_4_0.py) passed.Not done here (needs a decision or is outside this PR)
channel_names_differanddifferent_channel_countschecks are not yet replaced by per-unit checks for described runs (P26 aliases); they still run, so a described run with differing header spellings is refused loudly, not accepted wrongly.spec_commitis not in the manifest entry: the package holds no pinned Spec commit (only the tests'PIN.toml).MaskStepResult.issues; the notebook is a later PR.Generated by Claude Code