Build the parameter object, behaviour unchanged - #55
Merged
Conversation
Stage 1 of docs/parameter_spec_proposal.md, which is the stage that costs nobody anything: the objects exist, the generator accepts one, and no call site has to move. Every existing keyword call produces exactly what it did before. RecordingSpec / BackgroundModel / CoordinationModel in a new src/bugarach/spec.py. The acceptance test is the one that matters and it is a test, not a promise: the spec path and the keyword path produce byte-identical trains, planted times, participants and realized onsets at the same seed. If that ever fails, migrating a call site changes the data while looking like a refactor. Three decisions taken to get it built, all reversible and all flagged as open in the proposal: - Recording shape (n_roi, duration_sec, grid_sec) lives in the spec with the fitted models rather than beside them. One object is easier to hand between stages; the argument for two is that it separates what is measured from what is configured. grid_sec has NO default here on purpose — it cannot be recovered from onsets, so a default would bake a guess about someone's microscope into a value object that then travels. - Keywords keep working with no deprecation warning yet. Several sessions are mid-flight and warning-spamming their runs to make a point about an API they have not been asked to adopt is a poor trade. - Passing a spec AND a field the spec owns is a TypeError naming the field, rather than one silently winning. That is how a figure ends up labelled with settings it was not drawn at. The probe and the distractors stay out of the spec, which is the part worth more than the object: they are test constructs nobody can measure from tissue, so they belong to the bench. That puts the generator/bench boundary in code after a week of it being conflated in conversation, twice by me. _SIGNATURE_DEFAULTS is derived by inspecting the signature rather than written out, so the clash check cannot end up comparing against a stale default. Not done, and next: bench moves to the spec form, the fitting stage returns one, a sapper rule against new bg_* call sites, and then the slow-epoch axis as the first change that costs no caller anything. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Stage 1 of PR #53's proposal — the stage that costs nobody anything. The objects exist, the generator accepts one, no call site has to move, and every existing keyword call produces exactly what it did before.
The acceptance test is a test, not a promise
The spec path and the keyword path produce byte-identical trains, planted times, participants and realized onsets at the same seed. If that ever fails, migrating a call site changes the data while looking like a refactor.
Three decisions taken to get it built
All reversible, all flagged open in the proposal:
grid_sechas no default — it cannot be recovered from onsets, so a default would bake a guess about someone's microscope into a value object that then travels.TypeErrornaming the field, rather than one silently winning. That is how a figure ends up labelled with settings it was not drawn at.The part worth more than the object
The probe and the distractors stay out of the spec. They are test constructs nobody can measure from tissue, so they belong to the bench — which puts the generator/bench boundary in code after a week of it being conflated in conversation, twice by me.
Next, not in this PR
Bench moves to the spec form · the fitting stage returns one · a sapper rule against new
bg_*call sites · then the slow-epoch axis, as the first change that costs no caller anything.384 passed, 1 skipped · sapper clear.
🤖 Generated with Claude Code