Skip to content

Tests: harness namespaces know core's Canonical_Inputs name and the shallow-storage flag - #105

Merged
TorecLuik merged 2 commits into
test-suitefrom
test/core-constant-and-flag-in-harness
Nov 16, 2026
Merged

TorecLuik merged 2 commits into
test-suitefrom
test/core-constant-and-flag-in-harness

Conversation

@TorecLuik

Copy link
Copy Markdown
Collaborator

Production PR #97 now takes Canonical_Inputs from core (constants.results.CANONICAL_INPUTS_OUTPUT) in the runner and the image transfer, and uses the existing SHALLOW_ZARR_STORAGE_ENABLED flag instead of the inline IMPORTER_ENABLED and SHALLOW_ZARR_ENABLED. Tests that run script functions in a bare namespace then fail (11 tests: NameError for constants / SHALLOW_ZARR_STORAGE_ENABLED, and one text assertion for the local constant).

This PR gives those namespaces constants.results.CANONICAL_INPUTS_OUTPUT and SHALLOW_ZARR_STORAGE_ENABLED, and lets the transfer-output text assertion accept the core constant. Source that defines them locally (current master) is unaffected.

Merges before #97 (with #104). Test changes only; no new tests.

Harness, run one at a time: against master source 484 passed, 34 skipped; against #97 source 484 passed, 34 skipped.

🤖 Generated with Claude Code

TorecLuik and others added 2 commits November 16, 2026 16:49
…hallow-storage flag

Bare-namespace tests of the runner and image transfer now also provide
constants.results.CANONICAL_INPUTS_OUTPUT and SHALLOW_ZARR_STORAGE_ENABLED, and
the transfer output test accepts the core constant. Source that defines the
name or the expression locally (master) is unaffected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…_ENABLED

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@TorecLuik

Copy link
Copy Markdown
Collaborator Author

Independent review

Reviewer: independent agent (did not write this change). Head ad755b4 against test-suite (151edf7, contained). Rules read from NL-BIOMERO master (engineering, review) and biomero-scripts master (AGENTS.md, biomero-scripts-dev). Core 2.9.0b26 from PyPI, one suite at a time.

Verdict: approve. No blocking findings; 2 nits.

Checked

  • The diff is 12 lines in 4 test files: constants.results.CANONICAL_INPUTS_OUTPUT and SHALLOW_ZARR_STORAGE_ENABLED added to the bare namespaces, plus one relaxed assertion. Nothing outside tests/.
  • The namespace additions are harmless for source that defines the names locally (extra globals are ignored). In test_slurm_image_initialization_status.py the flag is set consistently with the other two flags in each test (importer_enabled and shallow_enabled in the parametrized one).
  • Harness runs: against master source 484 passed, 34 skipped; against Remove the input marker from results after import on every path #97 head d0499b5 484 passed, 34 skipped. Same as the description.
  • Against the Use the core script-output constants #101 head (963101f) the canonical, snapshot, marker, detached and initialization selection passes (207 passed).

Mutation checks (scratch copy of the #97 source, relaxed assertion test_image_transfer_publishes_canonical_inputs_output)

Mutation Result
_SLURM_Image_Transfer.py passes the literal "Canonical_Input" to setOutput killed (assertion fails)
passes constants.results.RESULTS_PATH_OUTPUT instead of the core name killed
local CANONICAL_INPUTS_OUTPUT = "Canonical_Inputz" killed
runner parse_canonical_inputs_output looks up the wrong core attribute killed (test_parse_canonical_inputs_output_*, 2 tests)

The relaxation therefore still fails when the output name is wrong.

Findings

Severity Where Finding
nit tests/test_canonical_zarr_transfer.py:1372-1373 The or accepts either form without saying which one the source uses, and the core form is a substring test that the same text elsewhere in the file would also satisfy. The use-core-output-constants-tests branch (#102) has the stricter own_definition != from_core plus a value pin for core's constant (test_shared_output_names.py); take that version when resolving (below). Not worth hardening here, as #102 replaces it.
nit tests/test_canonical_snapshot_orchestration.py:37-41 Once #101 merges, the local "CANONICAL_INPUTS_OUTPUT" namespace entry is dead (nothing reads it). #102 keeps it too, so remove it in the follow-up that drops the old form.

None found for: correctness, tests that pass whatever the code does, configuration and documentation, stored data, planned work (test-only). Traceability: the description refers to #97; test-only PR, no issue needed.

Overlap with use-core-output-constants-tests (#102)

git merge-tree of this head with that branch conflicts in 3 places, all trivial:

  1. test_canonical_snapshot_orchestration.py:37-45: both add the same constants namespace entry; only the comment differs. Keep either.
  2. test_canonical_zarr_transfer.py:1371-1385: the relaxed assertion here vs Tests: shared output names come from core constants #102's stricter form. Take Tests: shared output names come from core constants #102's.
  3. test_detached_resume_cancel.py:108-114: a third hunk, not two: add/add because the Tests: shared output names come from core constants #102 branch's merge base predates the file; its content is otherwise identical to test-suite. Keep the SHALLOW_ZARR_STORAGE_ENABLED=False line.

Merging test-suite (with this PR) into the #102 branch resolves all three. #102 merged directly into the current test-suite is clean, so only the order matters (this PR first, as in the stated merge order).

Needs a real stack

Nothing.

🤖 Generated with Claude Code

@TorecLuik
TorecLuik merged commit cb8557f into test-suite Nov 16, 2026
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.

1 participant