[Design] what remains of #40 in pipekit-cycle, now that vardax owns 4D-Var
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Read #40, the design snapshot in this issue, and packages/pipekit-cycle/docs/ to understand the existing proposals and ADR conventions. Compare the two ownership options, then record the decision and consequences here and add an ADR; if the decision creates follow-up work, open and link those feature issues. Done means the decision is recorded, the ADR exists, and any needed follow-ups are linked.
Written by the indexing model from the issue text.
Description
4 Nov 2026 · J. Emmanuel Johnson
Problem / Question
Which of the contracts proposed in #40 should still ship in pipekit-cycle, now that part of it has landed and vardax implements 4D-Var itself?
Recommended: treat #40 as finished once AdjointObservationOperator is settled, and leave every variational driver and covariance contract in vardax.
Alternative: add the variational protocols to pipekit-cycle, so that a second algorithm library can interoperate with vardax without depending on it.
Status: open.
User Story
As a maintainer, I want #40's scope to match the code, so that the issue doesn't imply work that the design has moved elsewhere.
Motivation
#40 was written before BFNCycle, the adjoint specs and the added protocols landed.
Its checklist no longer describes what is left.
Report 10, which audits pipekit-cycle, doesn't mention FourDVar, CostFunction, Minimizer, ObservationWindow, NudgingStep or gaspari_cohn.
Design Snapshot
State of #40's proposals at 7c446f1 (packages/pipekit-cycle/src/pipekit_cycle/):
| #40 proposed | At this pin |
|---|---|
TangentLinearModel |
Ships in protocols.py |
ForwardBackwardCycle, NudgingStep |
Replaced by BFNCycle in bfn.py |
| Adjoint checkpointing primitive | Ships as declarative specs in adjoints.py (RecursiveCheckpointAdjoint and others), with the SupportsAdjoint protocol |
ControlVectorTransform |
Partly covered by ReducedBasis (operg, prior_inv, nbasis), which has no transpose |
AdjointObservationOperator |
Absent |
CostFunction, Covariance, Minimizer |
Absent |
Innovation, ObservationWindow |
Absent; align_observations in the OSSE epic covers window selection |
FourDVar |
Absent from pipekit; vardax ships StrongFourDVar, WeakFourDVar and IncrementalFourDVar |
gaspari_cohn, gaussian_kernel, matern_kernel |
Absent |
vardax's decision D8 (docs/design/decisions.md in jejjohnson/vardax) has its seven model classes satisfy pipekit-cycle's protocols directly, through .as_analysis_step().
Under that decision a variational solve is one AnalysisStep, and the cycle doesn't need to see its cost function.
Proposed Options
# Option A (recommended): vardax owns the solve; the cycle sees an AnalysisStep
# today (pipekit-cycle), not pinned (vardax)
cycle = pc.DACycle(forward, obs_op, vardax.StrongFourDVar(...).as_analysis_step(),
obs_source=obs_source, n_steps=10)
# Option B: pipekit-cycle names the variational contracts and a driver
# proposed (#40)
cycle = pc.FourDVar(forward, obs_op, background=x_b, B=B, R=R,
minimizer=ScipyMinimizer("L-BFGS-B"), n_steps=10)
Alternatives Considered
- Option A. Pro: no new surface, one owner for variational numerics, and pipekit-cycle stays algorithm-agnostic. Con: another library has to choose its own names for
CovarianceandMinimizer. - Option B. Pro: shared names across algorithm libraries. Con: two owners for the driver, and a contract with only one implementer.
- Keep #40 open as it is (rejected). Its checklist can't be completed as written.
Three small items are independent of the choice, and need one line each in the decision: AdjointObservationOperator, a transpose on ReducedBasis, and the localisation kernels, which may belong in a numerics library rather than here.
Decision
Open.
Consequences
Under Option A, #40 closes as completed and the remaining names are dropped.
Under Option B, #40 is replaced by feature issues for each protocol and the driver.
References & Existing Code
- #40, which holds the full proposal and the MASSH audit.
docs/design/pipekit_composition.mdanddocs/design/decisions.mdin jejjohnson/vardax.
Implementation Steps (post-decision)
- Record the decision in
packages/pipekit-cycle/docs/as an ADR. - Close or replace #40 accordingly.
Definition of Done
- Decision and Consequences written into this issue.
- ADR entry added.
- Follow-up feature issues opened and linked, if any.
Testing
- N/A; the decision adds no code.
Documentation
- The ADR.
Relationships
- Parent (theme epic): #148
- Blocks: #40
- Related: jejjohnson/vardax
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 3h 50m
- Merged PRs (30d)
- 143
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jejjohnson/pipekit
-
area:code layer:0-primitives priority:p2 type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jejjohnson/pipekit#296 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 3/5 1-2 days Newbie friendliness 57/100
jejjohnson/pipekit#411 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 4/5 3-5 days Newbie friendliness 48/100
jejjohnson/pipekit#410 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 5/5 Over a week Newbie friendliness 38/100
jejjohnson/pipekit#409 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 3/5 1-2 days Newbie friendliness 75/100
jejjohnson/pipekit#408 ·
Maintainers usually reply within 1 day
All issues in jejjohnson/pipekit
Similar issues
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
type/bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
h2oai/h2o-llmstudio#1163 ·
Maintainers usually reply within 1 day