feat(operation): CORA-conducted flat/dark normalization ceremony (recipe-driven)#309
Merged
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
…ipe-driven)
The flat/dark normalization ceremony is the first deliberate consumer of
the Procedure Conductor at 2-BM, proving the recipe->conduct ladder end to
end: a deployment Recipe (the templated step list) realizing the existing
cora.capability.acquisition is registered via register_procedure_from_recipe,
and the conduct handler re-expands the pinned template and drives it through
the ControlPort against a soft IOC. This is the conduct-path "101" before
the heavier consumers (fly-scan resume, autonomous control) ride the same
rails.
The flats save-and-restore is a staging composition (cora.operation.staging),
deliberately kept out of the scan-primitive set {collect, discrete,
continuous}: it brackets a collect with an absolute axis read-then-restore
only because the conduct step model is static. Conduct-level runtime value
capture, which would let the recipe express the save-restore directly and
retire the flats body, is the designated next design (its own Stage 0/1);
a generic retract-around primitive is the rule-of-three step between.
2-BM stays record-path live (TomoScan owns the Actuate axis); this is a
deliberate Actuate-axis exercise, not a production seam shift. Every
physical specific (shutter PV + inverted sense, sample-out axis, clearance,
frame counts) is an illustrative soft-IOC stand-in, pending staff
confirmation before any live-EPICS wiring.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
a0f4d4b to
1e27d47
Compare
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.
What
The flat/dark normalization baseline ceremony, modeled as a Recipe and run as the first deliberate consumer of the Procedure Conductor at 2-BM. Proves the recipe -> conduct ladder end to end against the soft-IOC + Postgres harness.
cora.operation.staging.flats(new): a save-and-restore staging action -- read the sample axis, retract by a clearance (absolute write, since CORA has no relative-move primitive),collect, restore. Composes the publiccollectprimitive; lives in a staging module, deliberately not a fourth scan primitive. A non-numeric axis read maps toControlValueCoercionErrorso the Conductor records a structured failure instead of letting a bareTypeErrorescape.test_2bm_normalization_baseline(new scenario): seedcora.capability.acquisition->define_recipe(8-step template: shutter-closed / check / collect-darks / shutter-open / check / flats / shutter-closed / check) ->register_procedure_from_recipe-> conduct (the handler re-expands the pinned template) -> Completed -> terminal-gatedregister_datasetcarryingproducing_actuation_kind="Simulated"derived from the conduct. The first end-to-end exercise of the recipe-driven conduct path against real Postgres + soft-IOC.normalization_baselineadded to the procedure-kind carve-out; the noun-LAST fitness scanner broadened to also coverRegisterProcedureFromRecipe(it previously missed the recipe-driven registration path);catalog.yamlreconciled to[Method, Procedure]for the acquisition capability.Why
The conduct-path "101": prove the runtime on the simplest real 2-BM ceremony before the heavier consumers (fly-scan resume, autonomous control) ride the same rails. 2-BM stays record-path live (TomoScan owns the Actuate axis); this is a deliberate Actuate-axis exercise, not a production seam shift.
Deferred (each its own Stage 0/1, post-merge)
flatsbody. The principled fix.retract_aroundprimitive -- the rule-of-three step between (real n=3 candidates: flat-field, reference/I0-in, target-in characterization, beamstop dark; they differ in shape, so the seam should be designed against >=2 real consumers). NeedsActionContextto carry the registry. Trigger: the second conduct-path staging consumer.Illustrative-pending-staff
Every physical specific is a soft-IOC stand-in pending staff sign-off: the shutter PV (the real S02BM-PSS:SBS inverted-sense leaf), the sample-out axis + clearance (SampleTop_X / theta-park), the frame counts + dwell.
Tests
Local gate green: ruff, pyright, tach, architecture tier (26868), catalog descriptor (30), operation unit (888), recipe unit (1219), plus the new scenario / staging integration / flats unit tests. Two adversarial gate-review passes (APPROVE_WITH_NITS, 0 majors; all findings folded, including proving the broadened scanner is load-bearing).
🤖 Generated with Claude Code