Skip to content

SEP 51: one rule for the saved planes and the end of a run - #851

Open
jtravs wants to merge 20 commits into
feature/sep-0052-backend-shape-p4from
feature/sep-0051-save-planes
Open

jtravs wants to merge 20 commits into
feature/sep-0052-backend-shape-p4from
feature/sep-0051-save-planes

Conversation

@jtravs

@jtravs jtravs commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #859 (SEP 52 milestone 4): merge #859 first; GitHub then retargets this PR to main.

Implements SEP 51, accepted in #847, and sets it Final. Tracking issue: #846.

Phase 1 — driver and recipes

  • length is optional on the keyword routes. Given beside grid, the two must agree within LANDING_ULPS, and a call with neither is refused.
  • Every run marches over [initial_z, length] and always records both ends.
  • SimulationSettings gains n_save, a count of evenly spaced observations over that interval with both ends included. Its save_planes becomes optional.
  • One placement helper holds the rounding at the endpoints and every refusal. A bare integer save_planes is refused with "pass n_save=…", which fixes On the object routes, save_planes = 80 means one plane at z = 80 m #533.
  • Settings are resolved wherever a simulation adopts them: the constructor, the settings setter and with_*.
  • A replayed FixedSchedule must cover the run's interval.
  • Recipes get n_save, and their refusals are raised as RecipeError. The resolved recipe writes the canonical positions.
  • The seam (RunRequest, PropagationProblem and the frozen tables) is unchanged.

Phase 2 — front end

  • The "Saved planes" row has two modes, "Evenly spaced" and "Explicit positions". Entering a value in one mode removes the other selector in a single undoable edit.

Existing tests. About 45 test and benchmark files are fitted to runs that end at their length. Where a running test used to cover a short window of a longer grid, the grid is now cut at the run's end, with the collar pinned to the rates the longer grid gave (tests/builders.py: grid_at, held_collar). No tolerance was loosened.

Accepted deviation. length stays positional-or-keyword rather than keyword-only, as the maintainer settled (#857, closed). Remaining follow-up: #855.

Closes #533.
Closes #846.
Closes #856 (the fixed-step scaffold's n_save takes SEP 51's meaning).
Closes #664 (the heartbeat test polls to a deadline instead of one fixed sleep).

🤖 Generated with Claude Code

https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH

@read-the-docs-community

read-the-docs-community Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

@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-16T10:38:57.865470Z 13b9f21 New commits
🔒 Security Review ✅ Completed 2026-11-16T10:41:00.727636Z 13b9f21 New commits
ℹ️ 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.

@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!

jtravs and others added 17 commits November 16, 2026 10:34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
One helper places a count, normalizes listed endpoints within LANDING_ULPS
and refuses positions outside [initial_z, length]; the Simulation settings
setter adopts every settings object through it, so a run always records its
entrance and ends at grid.length. SimulationSettings gains n_save, its
save_planes becomes optional, and bare numbers, both selectors and bad
counts are refused by name. A replay schedule must cover the interval.

Tests that ran a short window of a longer grid now shorten the grid and
keep the collar the old length gave (tests/builders.py grid_at, held_collar).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
length becomes optional on prop_/from_gnlse, capillary and waveguide; given
a grid it must agree with grid.length within LANDING_ULPS, which is then
the run's length, and neither is refused. length stays positional-or-keyword
for now (an interim choice, pending with the maintainer); the
capillary's gas therefore takes a default and is refused when omitted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
…rror

The object routes' settings metadata drops the integer form of save_planes
and gains n_save; a bare integer save_planes is refused with 'write
n_save = N' on every route, and the driver's refusals of the planes, the
length and replay reach a recipe as a RecipeError naming the keyword. The
resolved recipe writes the run's canonical positions where the route reads
them, nested [build.settings] included, and drops n_save (#533).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
Short windows of longer grids keep their physics: the grid is cut at the
run's end and the collar, and where a default step depended on the length
the step, are those the longer length gave. Construction- and refusal-only
cases shorten freely; a schedule past the run's end is now a refusal test.
The benchmark harness's shortened runs (ab --length) rebuild the case on
its grid cut at the stop, and a coupled case that is translated at
construction runs whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
tests/driver/test_save_planes.py covers the refusal table, placement and
endpoint rounding, count/positions parity, interior launches, with_input,
adoption and reuse, the length/grid table and replay. A recipe with
neither length nor grid is refused before the route is called. Refusal
messages print plain floats, a NumPy integer is a count, and readers of
settings.save_planes, which may now be None before adoption, convert it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
The manual's running and recipe pages describe the length stated once,
the interval, the two selectors and endpoint rounding; the beam page
takes n_save; the docstrings follow. Changelog fragments carry the
migration and the fix for #533. The phase report records the survey, the
tests pinned or moved, and the interim keyword-only deviation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
…staged radial runs

The staged radial relaunch runs each stage on the window cut at its length,
with the collar the whole window gave, so the stages and the whole run share
one absorber and the 1e-10 agreement holds unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
…SEP 51)

An interrupted file, one holding a terminal checkpoint and a completed
one resume to the grid's length, directly and through recipe.resume_file.
from_history and uniform schedules whose step sums end below or above the
length within replay_tolerance are accepted, and histories that stop short,
run past or start late are refused before they run. A run rebuilt from its
file's resolved recipe keeps its hash when DEFAULT_N_SAVE changes, and the
TDSE capillary's two observations and natural steps are written out in its
resolved document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
Every sheet's Saved planes row offers Evenly spaced (n_save) and Explicit
positions (save_planes). An entry in one form unsets the other in the same
undoable edit, a setup opens on the form it holds, and an issue on the
positions shows at the row. The object sheets' expansion of a count into a
list, and its rewriting when the length changes, are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
Both phases are reported in Part II. The SEP is archived, its index row and
toctree entry move to the archive, its roadmap entry is removed, the manual
pages it produced link to it, and its open questions are issues #855-#857.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
The capability catalogue lists save-planes-count, save-planes-outside,
length-or-grid, length-grid and replay-interval on the keyword routes.
The moving-guide cases, the GRIN self-imaging run, the facet-envelope
port, the envelope-plasma host run and the native general modal window
cut their grids at the run's end, keeping the collar the longer grid
gave where one is used; the collar-step comparison states the millimetre
it always ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
The general modal and graded-index tutorials and the radial-to-capillary
coupling ran a short window of a longer grid. Each now builds its run's
grid for the length it propagates, sampled as before, and the two that
use a collar keep the longer grid's rate through boundary_length. The
regenerated output prints the same numbers; one diagnostic at the 1e-36
level, in the gap run this change does not touch, differs by rounding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
jtravs and others added 3 commits November 16, 2026 10:35
…the rest

Every caller passes settings the setter has already adopted, which refuses an
out-of-range initial_z and keeps every plane after it, so the check could no
longer fire. Tests cover printing unadopted counts and a recipe refusal that
is not about the planes keeping its own type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
propagate_fixed_rk4's n_save now counts evenly spaced planes over
[0, z_end] with both ends included, at least 2, as on every Simulation
route; n_steps must be a multiple of n_save - 1. The SEP records the
maintainer's settlement of Q8 (length stays positional-or-keyword) and
Q9 (this change).

test_a_quiet_run_still_beats polls read_status to a deadline instead of
reading once after a fixed sleep, which a loaded Windows runner missed.

Closes #856
Closes #664

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
@jtravs
jtravs force-pushed the feature/sep-0051-save-planes branch from 47d8c52 to 13b9f21 Compare November 16, 2026 10:36
@jtravs
jtravs changed the base branch from main to feature/sep-0052-backend-shape-p4 November 16, 2026 10:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant