Skip to content

fix(stage): fall back to the installed library version for Code.version - #25

Merged
peter-grotz merged 1 commit into
devfrom
fix/code-version-fallback
Sep 22, 2026
Merged

peter-grotz merged 1 commit into
devfrom
fix/code-version-fallback

Conversation

@peter-grotz

Copy link
Copy Markdown
Owner

CODE_VERSION was introduced as the contract for the pinned capsule commit, assuming main.nf could export it. It cannot — Code Ocean generates main.nf from the pipeline UI (it carries a hash:sha256 marker) and exports only CO_CAPSULE_ID, CO_CPUS, CO_MEMORY. The pinned commit is used in a git checkout and the repo is then deleted, so the running code never sees it.

Code.version now resolves: CODE_VERSION -> installed version of exaspim-swc-processing -> None.

For capsules that are thin glue over the library, the library version is what actually determines behaviour, and AIND accepts a version in place of a commit hash. The hand-written pipeline/nextflow.config can still set CODE_VERSION globally if a single value per run is wanted.

Tests: 111 passed, 100% coverage, ruff and interrogate clean.

CODE_VERSION was introduced as a contract for the pinned capsule commit, on the
assumption that main.nf could export it. It cannot: Code Ocean generates
main.nf from the pipeline UI -- it carries a hash:sha256 marker -- and exports
only CO_CAPSULE_ID, CO_CPUS and CO_MEMORY. The pinned commit is used in a git
checkout and then the repo is deleted, so the running code never sees it.

Code.version now resolves CODE_VERSION, then the installed version of
exaspim-swc-processing, then None. For capsules that are thin glue over the
library, the library version is what actually determines behaviour, and AIND
accepts a version in place of a commit hash.
@peter-grotz
peter-grotz merged commit 0977096 into dev Sep 22, 2026
3 checks passed
@peter-grotz
peter-grotz deleted the fix/code-version-fallback branch September 22, 2026 17:23
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