Repository navigation
Spec conformance P26: per-unit header channel-name checks for described runs - #218
Merged
Merged
Conversation
A run with a published morphobricks.toml no longer applies the experiment-wide channel_names_differ and different_channel_counts checks; the per-unit R_HEADER_CONTRADICTION, R_CHANNEL_COUNT_MISMATCH and R_UNIT_NOT_HOMOGENEOUS decide, so units may spell headers through confirmed aliases. Refusals name the unit, image, header names and declared names. Undescribed runs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
# Conflicts: # CHANGELOG.md
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
For a run whose output folder holds a published
morphobricks.toml, the experiment-wide v0.4 checkschannel_names_differanddifferent_channel_countsno longer apply (run/description_run.py,without_global_channel_checks). The per-unit checks already inphysical_check.pydecide instead (R_HEADER_CONTRADICTION,R_CHANNEL_COUNT_MISMATCH,R_UNIT_NOT_HOMOGENEOUS; units with different channel lists are stillR_HETEROGENEOUS_LAYOUT_NOT_ENABLED).Refusal text now names the unit folders, the image, the image's header names (as read, quoted) and the channel's confirmed header names; the count mismatch also lists the declared channel IDs.
Runs without a description (v0.4 path) are unchanged: the global checks still apply. If the description cannot be read, the global checks are kept too.
Why
experiment-v1 section 4.3 and 8: header evidence is compared per unit and per C index, after NFC of both sides, with no trimming, case folding or similarity. A described experiment whose units spell a channel differently through confirmed aliases (fixture v11:
DAPI/Hoechst 33342) was refused by the global check.Regression evidence
New
tests/test_spec_run_aliases.py(15 tests, added toEXPECTED_MODULES).maincode (src changes stashed): 4 failed, 11 passed. The 4 failures are the alias run being refused (channel_names_differ), the undeclared-name refusal carrying the global code and lacking the unit/names text, the by-C-index refusal text, and the wrong-count unit also raisingdifferent_channel_counts. The 11 passes are the negative cases that must keep refusing, and the undescribed run.Checks
python tools/check.py: 4241 passed, 4 skipped (skips not individually inspected; none are Spec modules, since a skipped Spec test fails the gate), code rules pass. Includestests/test_parity_v0_4_0.py.Needs an owner decision
CHANGELOG: one entry added under Unreleased (keep both entries when merging main).
Generated by Claude Code