Skip to content

WIP: SEP 52 milestone 2 — run records, engine protocols, corpus; unit axis removed (schema 3) - #854

Merged
jtravs merged 13 commits into
mainfrom
feature/sep-0052-backend-shape-p2
Nov 16, 2026
Merged

jtravs merged 13 commits into
mainfrom
feature/sep-0052-backend-shape-p2

Conversation

@jtravs

@jtravs jtravs commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Milestone 2 of SEP 52, tracked in #849. Stacked on #853 (milestone 1): review and merge #853 first. GitHub then retargets this PR to main. The details are in the SEP's Part II report for milestone 2.

Phase 2 — shared records, engine protocols and the corpus

  • solprop.backends.records: run_records(problem, request, start) builds the method's policy (RungeKuttaPolicy, the shared adams_policy), the low-storage settings, the schedule, the plane plan and the monitor/edge configuration and continuation. These records moved from solprop_native._watch/_transverse. Native's session builds every _core configuration dict from them, and the reference reads the same facts from them. What crosses into _core is unchanged.
  • solprop.backends.engines: the RungeKuttaEngine and AdamsEngine protocols of SEP §5.2, with AcceptRecord, BoundaryReading, HistoryEntry and AttemptOutcome; frozen by tests/backends/test_engines.py.
  • Pinned corpus (tests/data/backend_corpus.npz, 1.2 MB, 13 cases × both backends), recorded before anything moved: fields, plane statistics, step history, monitor/edge records (split removal and occupancies), resume, and probe. Held to SEP 25 budgets; bitwise agreement is reported but not required. It is the comparison for milestone 3.
  • The split collar's accumulation and drain rules are pinned on both backends (tests/sessions/test_split_collar_rules.py).

Phase 3, first part — the unit axis removed everywhere (fixes #618)

  • Translation's value tables, the boundary functions, both backends' state, passes, history, ledgers and load/readback, resume, and the stored MarchSnapshot all lose the leading axis of one. No C++ changed.
  • Output schema 3: an older snapshot is refused by name.
  • The frozen HOST_SURFACE strings lose n_batch; no field is added or removed.
  • The corpus passes unchanged after the axis removal.

For the maintainer: see the milestone 2 "Decisions" and "Findings" in Part II (schema 3 vs the old development numbers; the untestable dense-observation rule; native bits depending on process history).

Overlap with SEP 51 (#851): driver/resume.py (one line) and array shapes in some tests/driver files. No save-plane behaviour changes.

🤖 Generated with Claude Code

jtravs and others added 12 commits November 16, 2026 00:22
…EP 52 phase 2)

A corpus of 13 cases on numpy_ref and the native CPU build, recorded from
e52efb2 (tests/data/backend_corpus.npz, 1.2 MB, by
tests/data/generate_backend_corpus.py): every march and route family on
short fixed schedules (two adaptive), with the last field, statistics,
step history, monitor and transverse-edge records, a resume from the
middle plane and the timing probe's read-backs or low-storage refusal.
Each backend is held to its own record within the matched march's budget
or an accuracy envelope; bitwise agreement is reported as a diagnostic
only. The bounds were spot-checked: native's records meet the reference's
under the same comparison, and a field or removal moved by ten budgets
fails.

The split collar's session rules of SEP 52 section 5.2 are pinned on both
backends through sessions before ownership moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hase 2)

Each run's records are formed once by solprop.backends.records from the
problem, the request and the start: the method's policy (MarchPolicy via
adams_policy, RungeKuttaPolicy via runge_kutta_policy, now carrying the
landings), the low-storage settings, the schedule, the plane plan with
the session's capacities, and the boundary monitor's configuration, edge
configuration and resume continuation. MonitorConfig, Resumption,
EdgeConfig, the edge's resumption, Notice and EdgeNotice move there from
solprop_native._watch and _transverse, as typed records importable
without the native package; collar_rests is the one quiet-collar rule.

The native session builds its configuration dictionaries from one
run_records call through solprop_native._records; _watch and
_transverse keep only the formatting of native records and verdicts.
Nothing that crosses into _core changes. The reference reads the same
records for its Runge-Kutta and Adams policies, its landings, its collar
rule and its session's plane plan.

solprop.backends.engines declares RungeKuttaEngine and AdamsEngine,
mirroring rk::Engine and march::Engine, with AcceptRecord,
BoundaryReading, HistoryEntry and AttemptOutcome and the commit
contract; the existing engine protocols stay in use until phase 3.
Tests pin the protocols' members and signatures and hold the records to
their sources on both backends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…schema 3 (SEP 52 phase 3)

A trajectory's arrays carry no leading axis of one: the reference's state,
passes and history; native's load, readback and Adams rows (reshaped at the
Python boundary; no C++ change); the operator's value tables
(phi_coefficients, phi_constant, expansion terms, separable value_shape)
and the stage terms; the boundary monitor's and split collar's readings
(#618); the design check's launch; the carrier chord (a scalar); and a
MarchSnapshot's stored state and rows.

The snapshot's layout on disk changes, so the output schema is bumped to 3
(the next release's one bump); a snapshot in the earlier four-axis layout is
refused by name, not squeezed. The frozen HOST_SURFACE strings lose the
unit axis in the same commit; no field is added or removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ip ci]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…et allows another build

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The top-level Cartesian-precision and safety-ramp tests and the kernel-problem
page's plot index the three-axis value tables; the M2 baseline's stored
phi expansion is squeezed, not recaptured; the metadata digest follows the
schema version it hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The axis change narrowed the tolerant read of the state to an error the read
never raises, so a snapshot cut short before its state would have propagated
a KeyError. The docs ignore the transverse verdict literal the run records
name in a signature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtravs
jtravs marked this pull request as ready for review November 16, 2026 05:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T05:18:23.983927Z 34db4b6 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-16T05:19:16.360473Z 34db4b6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Base automatically changed from feature/sep-0052-backend-shape-p1 to main November 16, 2026 09:07
@jtravs
jtravs merged commit e18613c into main Nov 16, 2026
44 checks passed
@jtravs
jtravs deleted the feature/sep-0052-backend-shape-p2 branch November 16, 2026 09:07
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.

A leading batch axis outlives SEP 47 in the collar check, the split crossing, the boundary monitor and Backend.max_batch

1 participant