Skip to content

Spec conformance P26: per-unit header channel-name checks for described runs - #218

Merged
guijacquemet merged 2 commits into
mainfrom
claude/spec-p26-aliases
Nov 8, 2026
Merged

guijacquemet merged 2 commits into
mainfrom
claude/spec-p26-aliases

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

What

For a run whose output folder holds a published morphobricks.toml, the experiment-wide v0.4 checks channel_names_differ and different_channel_counts no longer apply (run/description_run.py, without_global_channel_checks). The per-unit checks already in physical_check.py decide instead (R_HEADER_CONTRADICTION, R_CHANNEL_COUNT_MISMATCH, R_UNIT_NOT_HOMOGENEOUS; units with different channel lists are still R_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 to EXPECTED_MODULES).

  • On current main code (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 raising different_channel_counts. The 11 passes are the negative cases that must keep refusing, and the undescribed run.
  • With the change: 15 passed.

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. Includes tests/test_parity_v0_4_0.py.

Needs an owner decision

  1. Images with no header names: the Spec says they "need no evidence" (section 4.3, fixture v12), so they pass the header check and are not listed as unchecked. The request suggested listing them as unchecked; implemented the Spec text instead. Should such images be surfaced (for example a warning or a manifest list) even though the Spec does not require it?
  2. An image with names at some C indices and none at others: each non-empty name is checked, empty ones need none. The Spec says "a non-empty header channel name", so this follows it; confirm that partial naming is intended to pass.

CHANGELOG: one entry added under Unreleased (keep both entries when merging main).


Generated by Claude Code

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
@guijacquemet
guijacquemet merged commit f02a07b into main Nov 8, 2026
7 checks passed
@guijacquemet
guijacquemet deleted the claude/spec-p26-aliases branch November 8, 2026 04:15
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