Skip to content

Workflow-replay harness (display == export == replay) + set-zero frame fix#31

Merged
jacobson30-bot merged 1 commit into
mainfrom
workflow-replay-harness
Jun 11, 2026
Merged

Workflow-replay harness (display == export == replay) + set-zero frame fix#31
jacobson30-bot merged 1 commit into
mainfrom
workflow-replay-harness

Conversation

@jacobson30-bot

Copy link
Copy Markdown
Contributor

Summary

The integration pass suggested after the module reviews: a harness that drives the real ImageViewerDialog through multi-step user workflows and enforces, after every step:

what you see == what you export == what the provenance replays (after a JSON round trip, exactly what .probeflow.json stores), with consistent physical extents.

Result: all 17 workflow combinations passed on the first run — the season's seam fixes (scope ordering, frozen geometry, mains params, calibration threading) compose correctly end-to-end. The harness is now permanent regression coverage: any future feature that breaks WYSIWYG-replay fails CI.

One intent-level bug found (and fixed)

Building the harness exposed a class the invariant cannot see — display and replay consistently wrong together. The set-zero-plane pick mapped click fractions onto the raw array's frame: with a flip/rotation in the pipeline, the zero plane anchored at the mirrored/wrong feature while the markers (same fractions) showed the clicked spots. Same family as the scope-ordering bug, fixed with the same mechanism: picks map into the displayed frame and stamp set_zero_after_geometric_ops; the adapter interleaves stamped set-zero steps at that position. Legacy states replay byte-identically.

TestSetZeroIntent pins the user-level contract (3×3 patch means at the clicked display points are zero, after flips and after arbitrary rotation) — verified to fail with the fix stashed.

Test plan

  • 20 workflow tests in tests/test_workflow_replay.py (registered as a GUI module), 3 ordering pins in test_processing_scope_seams.py.
  • Full suite green locally: 2399 passed, 3 skipped.

🤖 Generated with Claude Code

…set-zero frames

New tests/test_workflow_replay.py drives the real ImageViewerDialog through
multi-step workflows the way a user performs them (STM background, panel
filters, quick-selection commits across flips, frozen ROI scopes surviving
rotate_arbitrary's live-ROI removal, mains streak pairs with background
fill, inverse-FFT selections, threshold/scale/quantize chains, arithmetic,
navigation, undo/redo, channel switches, and a kitchen-sink chain) and
asserts after each step that the displayed array equals the export array
and that the canonical ProcessingState recorded on the export — after a
JSON round trip, exactly what a .probeflow.json sidecar stores — replays
bit-for-bit from the raw plane, with consistent physical extents. All 17
workflow combinations passed on the first run: the season's seam fixes
compose.

One intent-level bug found while building the harness (the invariant cannot
see it because display and replay are consistently wrong together): the
set-zero-plane pick mapped click fractions onto the RAW array's frame, so
with a flip or rotation in the pipeline the plane anchored at the mirrored /
wrong feature — while the markers, drawn from the same fractions, showed
the clicked spots. Same family as the scope-ordering bug, same fix
mechanism: picks now map into the displayed frame and stamp the
geometric-op count (set_zero_after_geometric_ops, preserved across panel
applies); the adapter interleaves stamped set-zero steps at that pipeline
position. Unstamped legacy states keep their historical order
byte-for-byte. The positioned-steps machinery is hoisted above the set-zero
blocks; behaviour for every other step is unchanged.

TestSetZeroIntent pins the user-level contract (the 3x3 patch means at the
clicked display points are zero after flips and after arbitrary rotation)
and was verified to fail with the fix stashed.

Co-Authored-By: Claude Fable 5 <[email protected]>
@jacobson30-bot jacobson30-bot merged commit b60185a into main Jun 11, 2026
@jacobson30-bot jacobson30-bot deleted the workflow-replay-harness branch June 12, 2026 03:28
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