Skip to content

WIP: SEP 52 milestone 1 — native _testing module; remove Batch and every group path - #853

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

jtravs merged 9 commits into
mainfrom
feature/sep-0052-backend-shape-p1

Conversation

@jtravs

@jtravs jtravs commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Milestone 1 of SEP 52 (accepted in #850), tracked in #849. This is the first of four stacked pull requests (decision D7): later milestones are based on this branch. The details are in the SEP's Part II report for milestone 1.

Phase 0 — native deletions and the test module

  • Deletes the bindings nothing reached and the dead per-step _ResidentAdams adapter, together with the bindings that only it reached. The timing probe's paths stay until phase 4.
  • Adds solprop_native._core._testing, a private submodule built into the same extension. It holds the 54 test-only entry points (traces, fault injection, owners, engine parity, statistics, helpers, runtime probes), and every test that calls them is repointed. State goes from 96 bound names to 55.
  • The wheel smoke test imports _testing. nanobind is pinned to 3.1.0.

Phase 1 — remove Batch and every group path

Size: −9.7k / +0.6k lines over 137 files for phase 1. Python total 271,036 → 266,928.

Overlap with SEP 51 (#851): this branch touches driver/_scan_run.py and some tests/driver files that SEP 51 may also edit. The hunks don't overlap; no save-plane behaviour changes.

Checks run locally: targeted tests on an M5 Max (about 3,000 tests across the touched modules, plus native tests); ruff, basedpyright, docstrings, codespell, poe docs, poe size-check. One native test, test_band_plasma.py::…[19], fails locally on a thread-sizing assertion unrelated to this change; CI will confirm. The full gate, coverage and wheel lanes run here.

🤖 Generated with Claude Code

jtravs and others added 6 commits November 15, 2026 23:41
…e 1)

Delete the fixed-schedule Batch scan executor and the group machinery
behind it on both backends and in the driver: driver/executors/batch.py,
driver/batch.py (compatible_groups), driver/_scan_batch.py and the
run_batch hook; Backend.max_batch, Backend.prepare_group and the
BatchBackend protocol; GroupSession, PreparedGroup, check_group,
check_member_ticket, start_group, GroupBatch and ExportTicket.member;
select_batch; the reference's HostGroup, HostGroupSession and
NumpyBatchBackend; solprop_native.group and its counters; and the
group_batch benchmark case. StatsSpec.same_tables, whose only caller
was the group's compatibility check, goes too.

The Backend protocol keeps SEP 52 section 5.1's members. The leading
unit axis of the trajectory's arrays stays for a later phase.

Group-only tests are deleted; tests that used a group to reach a
member's behaviour run singly. The scan build helper moves to
tests/builders.py. The user guide, the API page, the developer pages
and the structure figures drop Batch, pending changelog fragments that
announced Batch features are corrected, and a Removed fragment names
Local, Pool, Queue and Slurm as replacements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s to _testing (SEP 52 phase 0)

Delete the bindings nothing reaches (table_evaluate, table_rate,
set_flow_actions, shutdown_runtime) and the resident Adams engine's per-step
adapter, which the compiled march (SEP 39) replaced: its trials, accepts,
start-up, holds and dense observations, with the bindings only they reached
(adams_fused_trial_at, adams_fused_accept, adams_observe,
adams_exponential_observe). _ResidentAdams keeps its construction, resume and
snapshot sizing; the timing probe's paths stay until phase 4.

Move every entry point only solprop's tests reach into a private `_testing`
submodule built into the extension: the scripted marches and march runs,
fault injection, the monitor and transverse-edge owners and watch functions,
the engine-level parity reads, the state-level statistics, the vector-maths
and width helpers, and the runtime probes. Moved State methods take the state
first. Repoint the tests; the resident-history helpers they used move to
tests/sessions/runs.py over `_testing`.

The `_testing` stub is hand-written (_core_testing.pyi); problem_stub.py
--check holds its names to the module's. The wheel smoke test runs one of its
checks. Release builds pin nanobind 3.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	tests/sessions/test_native_session_axis_plasma.py
… [skip ci]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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!

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtravs
jtravs marked this pull request as ready for review November 16, 2026 03:58
@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-16T04:01:19.495653Z e63b409 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-16T04:02:52.760840Z e63b409 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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtravs
jtravs merged commit aa681a6 into main Nov 16, 2026
68 checks passed
@jtravs
jtravs deleted the feature/sep-0052-backend-shape-p1 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.

One diverging point fails every member of its Batch group

1 participant