Repository navigation
PP-C2: every run is described; undescribed runs and their compatibility code removed (v0.5.1, 2/3) - #260
Merged
Conversation
…ty code removed No backward compatibility before the first pipeline release (owner policy of 10 November 2026; MorphoBricks-Spec ADR 0002 AR10, AR11; Stage 2 plan §0.1, §0.2, the PP-C row). Core and run paths - A published morphobricks.toml is required for every run: run_experiment, prepare_mask_step, the CLI's check, run and masks, and RunInputs.open refuse an output folder without one with A_DESCRIPTION_REQUIRED, before anything is read or written, naming the fix (new required_description module; DescriptionRequiredError, exported). - Removed the undescribed run: the NO_DESCRIPTION warning, preflight/remasked/find_masks with_description and description_in_use (the name refusals always apply), the None answers of RunInputs' semantic methods. - Removed experiment_design.csv as a grouping input: run_experiment(design=), run --design, the design command (cli_design.py), run/design_file.py, check's design template (write_check_outputs, CheckOutputs), recorded.design_change, planned_changes(design=), run_summary(design_template=). The run derives the design from the description and writes it with the table (an output only). - Run manifest: version "4" only is written and read; "1", "2", "3" and later versions are refused with "Run preprocessing again" (owner ruling 16); the version-1 branches of reuse, recorded inputs, check_sources and RunInputs are gone. Notebook - PreprocessingNotebook has no describe argument; every _describe branch is gone, and the design card no longer reads or writes experiment_design.csv. Test fixtures - testing.make_clean_run makes a described run of the same tree (clean_description, publish_and_run) and runs the mask step when there are masks. - tests/described_tree.py: run_described, main_described, describe_tree, check_masks, without_mask_step, description_entry. 70 test files now run described trees; tests that only checked undescribed or legacy behaviour are deleted (listed in the PR). - test_strict_manifest.py and test_described_manifest_version.py are replaced by test_manifest_version.py; released_code.py and the rc4 manifest fixture are deleted; CI no longer fetches the whole history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
This was referenced Nov 10, 2026
…elease Review of PP-C (#260): main's notebook installs RELEASE_REF fd7afd3 (v0.5.0), whose PreprocessingNotebook() is the undescribed v0.4 run. The cell goes back to PreprocessingNotebook(describe=True), as on 3f10545; the release PR moves RELEASE_REF and the call together. test_the_shipped_cell_calls_the_api_of_its_release_ref pins the call of each RELEASE_REF (RELEASE_CALLS) and fails for a ref without one; the kernel test, which runs this checkout, swaps in this checkout's call. Release check list: the pin item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
…y route Review of PP-C (#260): run_experiment read every image header (the preflight) and the recorded run before A_DESCRIPTION_REQUIRED when the output folder was inside the experiment or the masks; prepare_mask_step(None, out) and the command line's run/masks read the recorded run first, and the command line opened --log and removed a stale lock before refusing. Now A_DESCRIPTION_REQUIRED comes first (with output_inside_experiment/_masks from the paths given, compared without reading anything). Regression tests: no preflight, recorded-run read, log or lock change without a description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
… assertions Review of PP-C (#260): design_not_confirmed, repeat_group_conflict and repeat_missing_conditions named the removed design command (--confirm) and editing experiment_design.csv, now an output only. They name the notebook's describe steps / Replicates page and Check and save (regression test). Docstrings that named the design command or --design are corrected. Restored from the conversion: the run's missing_axes refusal of the mixed TIFF/OME-Zarr tree, and the error severity of channel_names_differ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Follows a7006de: the description refusal now comes first, so the test publishes one to reach experiment_not_recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Contributor
Author
|
Independent review: sound after fixes. Pushed onto this branch:
Parity check, main 3f10545 vs this stack: I compared v01, v03, v08, v08 with a bad binary mask, v09, v13, v28, v33, v34, v04, v05, and the P21/P29 trees. Histograms, manifests (apart from the version and file mtimes), the derived CSV, records, mask representation, the
Gate on 5a21cb5: ruff and code rules clean; 4972 passed, 4 skipped (environment skips); Spec modules 1665 passed, 0 skipped; CI green. Reported, not changed:
Generated by Claude Code |
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.
PP-C2 of 3 (stacked on #259): PP-C, the first change of v0.5.1. Base
claude/pp-c1-goldens. Next: PP-C3 (docs: CHANGELOG, contract, README, user guide, AGENTS). Do not merge before the independent review. Retarget tomainonce #259 merges.Owner policy of 10 November 2026: no backward compatibility before the first pipeline release. A published
morphobricks.tomlis required for every run, on every route (Spec ADR 0002 AR10, AR11; Stage 2 plan §0.1, §0.2, the PP-C row).Summary (by module)
Core and run paths
required_description(new, io):is_published,description_required_issue;run_inputs_error.DescriptionRequiredError(A_DESCRIPTION_REQUIRED, exported). The message names the fix: the notebook's describe steps (Check and save), or the CLI'sdescribeto see what is open.run_experiment: refused before anything is read or written without a published description (one issue, no report, no lock). The run derivesexperiment_design.csvfrom the description (derive_design) and writes it with the table;design=is gone.prepare_mask_step/ CLImasks: refused (MaskStep.refusal). CLIcheckandrun: refused, exit 1, nothing written.RunInputs.open:DescriptionRequiredError;description(),section_digests(),images_without_header_channel_names(),references(),mask_semantics()never return None.preflight,remasked,masks.find_masks:with_descriptionremoved (R_FOLDER_NOT_NFC,R_MASK_TYPE_NAME_INVALIDalways apply);run.preflight.description_in_useremoved;description_run.NO_DESCRIPTIONwarning removed.experiment_design.csvas an input removed:cli_design.py(designcommand),run/design_file.py(write_design_template,write_design,edit_design,design_for_run),run --design,check's template (write_check_outputs,CheckOutputs;write_check_reportstays),recorded.design_change,planned_changes(design=),run_summary(design_template=),run_log_refusal(design=).manifest_versions: only"4"is written and read (owner ruling 16)."1","2","3"and later versions are refused with "Run preprocessing again" (UnsupportedVersionError→ManifestFormatError); a manifest withoutexperiment_descriptionis refused. RemovedSTRICT_MANIFEST_VERSION,DESCRIBED_MANIFEST_VERSION,LEGACY_MANIFEST_VERSION,version_for, themanifest_before_v040source issue and the version-1 branches ofreuse,recorded,sources,run_inputs. The next run over a refused manifest reads every image again.Notebook
PreprocessingNotebook(experiment_folder, output_folder): nodescribeargument; every_describebranch removed. The design card no longer reads or writesexperiment_design.csv(its undescribed_open_design,_save_design,_design_load_note,_refresh_design_status,_design_pending,_folder_celland the check's template removed). The shipped notebook callsPreprocessingNotebook().show_designstays (embedding API).Test fixtures
testing.make_clean_runmakes a described run of the same tree and FOV keys (ctrl/drug,rep1,a/b): it publishestesting.clean_description(...)(channelsch1..chN, oneinstancesmask per mask type;design=Truemakesdrugreferencectrl), always writes the derivedexperiment_design.csv, and runs the mask step when there are masks. New:testing_described.publish_and_run.tests/described_tree.py(test-only, never in the package):describe_treepublishes the description the user would confirm for a tree a test wrote, every proposal accepted (IDs from the draft rules, a fixed confirmation date, header names as aliases,instancesmasks);run_described,main_described,check_masks,without_mask_step,description_entry. 70 test files run described trees now instead of undescribed ones (not deleted).test_strict_manifest.py+test_described_manifest_version.py→test_manifest_version.py(7 tests);released_code.py,tests/data/rc4_run_manifest.json,make_rc4_manifest.pydeleted; CI'sfetch-depth: 0removed.position_idstays the file stem (owner ruling 2): no test or code changed for it.What was removed (counts, PP-C2)
cli_design.py,run/design_file.py), src diff +520/−1440 lines; 1 module added.test_design_command.py10,test_strict_manifest.py9,test_described_manifest_version.py6,test_notebook_design_output.py6) plusreleased_code.py, and 85 functions in 29 other files that checked only undescribed or legacy behaviour (v0.4 notebook design/labels/image-type cards, the design command and--design, the undescribed-run warning and None answers, version 1/2/3 and rc4 manifests). 22 tests are new or rewritten as the described equivalent (refusals on every route, the derived design,test_manifest_version.py, the unit-level checks). 70 test files were converted to described runs.Deleted test functions, by file
Decisions (made here, for review)
make_described_rundid not), soexperiment_design.csvis always an output andexperiment_design_sha256is always set.A_DESCRIPTION_REQUIREDrefusal comes before anything is read (likeoutput_locked), after the output-inside-experiment/masks checks; it writes no report.read_experiment_design(used only bydraft.migrate_legacy_design, PP-03),ExperimentDesign/default_design/apply_design_editbehind the pairing card (answer 4),read_confirmed_design/RunInputs.design(answer 3, until CP-1/MF-4), the tolerant version-1 field reading inmanifest_fields(PP-05), the conversion record version 2 (PP-06),source_fingerprint(PP-08), the global--image-typeand the retired notebook widgets (image-type card),docs/migration-0.3-to-0.4.md.Notes for review
notebooks/MorphoBricks_Preprocessing.ipynbnow callsPreprocessingNotebook()but still installsRELEASE_REFof v0.5.0, where the default is the undescribed mode. Until the v0.5.1 release step movesRELEASE_REF, a user opening main's notebook gets v0.5.0 without the describe steps. The release PR must move the pin.make_clean_run's manifest records its masksnot yet checked(the mask step runs after the run);RunInputs.read_maskreads the livemask_representation.json, so masks read as checked. A rerun recordschecked.convert's printed next commands (check,run) still need a described output folder; the refusal names the fix.Tests
ruff check .,ruff format --check .clean; code rules against the baseline: no violation (baseline lowered:run_experimentparameters 16 → 15 and two test files shorter).pytest(Python 3.13, Linux): 4965 passed, 4 skipped (environment skips: case-sensitive-name tests ×3, file modes ignored as root ×1); Spec modules (test_spec_*.py): 1665 passed, 0 skipped.Downstream impact (when each brick moves its pin to v0.5.1)
morphobricks.toml;run_experiment(design=...),PreprocessingNotebook(describe=...),edit_design,write_check_outputs/CheckOutputs,description_in_use,with_description,version_forand the*_MANIFEST_VERSIONaliases (exceptMANIFEST_VERSION, now"4") are gone; run folders written by v0.5.0 or earlier are refused until run again;RunInputs.description()is never None.make_clean_run(10 test files) now gives a described run: derivedexperiment_design.csvalways present, masks checked, channel IDsch1/ch2, manifest v4;design=Truestill accepted (now a reference).tests/helpers.py:115callsrun_experimentundescribed → refused. CP-1's empty-ID path for undescribed runs has no caller left.tests/clean_runs.py:82viamake_clean_run(as above);notebooks/MorphoBricks_end_to_end.ipynb:414-422buildsPreprocessingNotebook(...)in the default (formerly undescribed) mode → its run waits for Check and save: the notebook must show the describe steps (steps()or the channels/masks/check-save pages). Undescribed-run tests and the BY_NAME branch lose their input.notebook_steps.py:42,101,198embedsfolder_step(show_design=False)/axis_step/run_step→ its preprocessing run is refused until the experiment is described and saved (it must add the describe steps, X-01);notebook_masks.py:83andtools/preprocessing_runs.py:90callrun_experimentwithout a description → refused.test_embedding_api.py's pin of__init__changed (nodescribe).tests/run_fixtures.py:70anddocs/example_run.py:30callrun_experimentwithout a description → refused.Generated by Claude Code