Skip to content

Parity script: find runs nested by session and other entities - #195

Merged
astewartau merged 1 commit into
mainfrom
fix-parity-session-level
Oct 26, 2026
Merged

astewartau merged 1 commit into
mainfrom
fix-parity-session-level

Conversation

@astewartau

Copy link
Copy Markdown
Owner

Fixes #193

What changes

scripts/parity/e2e.mjs looked for the native run's pipeline graph, methods text and run record at workflow/<run>/<run>_*. qsmxt run nests that folder by the run's entities (workflow/sub-1/ses-2/acq-x_run-1/), so on data with a session the checks said the files were not written.

  • The script now finds the run's workflow folder as the one holding <run>_runrecord.json, and reads the planned graph, the graph the run took, the methods text and the record from there.
  • Published images are picked by their run name (outside workflow/), not by a top-level folder named after the run, which also failed with a session (sub-1/ses-2/anat/…).
  • New case tkd-session: the phantom's files are named sub-phantom_ses-1_acq-bridge_run-1_… and placed in sub-phantom/ses-1/anat/. tests/e2e/phantom.js takes an entities option for this (default sub-phantom, so the browser tests are unchanged).

Decisions taken

  • Find, don't build. The folder naming lives in the qsmxt binary (Derivatives::workflow_run_dir), not in the engine qsmbly links, so the script finds the folder by the record's file name rather than copying the naming rule.

Not done here

The export bundle writes the graph the run took at workflow/<run>/, which matches qsmxt run only for runs without a session or other entities. Fixing that needs the folder naming in the engine. A QSMxT issue draft is written (not filed). The new case runs as planned, so it has no such graph and is not affected.

🤖 Generated with Claude Code

…rkflow folders

`qsmxt run` keeps a run's record, methods text and graph in a workflow folder nested by
the run's entities (workflow/sub-1/ses-2/acq-x_run-1/), not workflow/<run name>/. The
script now finds the folder that holds <run>_runrecord.json, and picks the published
images by their run name rather than by a top-level folder named after it.

A new case, tkd-session, names the phantom's files sub-phantom_ses-1_acq-bridge_run-1
(tests/e2e/phantom.js takes the entities), so the parity run covers a session level.

Fixes #193

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@astewartau
astewartau merged commit 1bd6430 into main Oct 26, 2026
9 checks passed
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.

Parity script: run record, methods and graph checks miss runs with a session level

1 participant