Skip to content

docs: draft SEP 54, sharing one haCC response plan between propagations - #964

Open
jtravs wants to merge 6 commits into
mainfrom
docs/sep-0054-shared-hacc-plan
Open

jtravs wants to merge 6 commits into
mainfrom
docs/sep-0054-shared-hacc-plan

Conversation

@jtravs

@jtravs jtravs commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Drafts SEP 54 (tracking issue #963): solprop's side of the provider's accepted design in which several haCC propagation processes on one machine share one response plan through a server, so that a GPU marches all their rows together. Documentation only; no code changes.

What changed

  • docs/dev/seps/sep-0054-shared-hacc-plan.md: the draft, the AI review recorded in Part III, and the revision that answers it (Part I revised, with a "Response to review" in Part III).
  • docs/dev/seps/index.md: the index row and the toctree entry.

What the SEP proposes, in short

  • A setting. TDSEExecution(shared_plan=TDSESharedPlan(socket, attach_timeout, reconnect_timeout)), an execution setting outside the resume identity, for haCC responses on both backends.
  • One submission per step. All radial nodes go in one provider call; a run with more nodes than max_batch_rows is refused.
  • Checks without a local model. Which of today's checks hold on the unprepared model description and the client's plan record, and which move to the server's report. memory_limit bounds the run's own memory.
  • The consistency check. On a cache miss, a private one-row model in the worker before attaching, one run at a time under a lock.
  • Failures. A lost or restarting server is waited for and charges no failed call; an evicted run attaches again; a refused attachment or a path with no server is a configuration error; a failed march is resubmitted once; a failure of the run's own call is handled as today.
  • Waiting, stopping and leaving. A run attaches at its first evaluation, before anything is charged or archived; the existing stop poll ends every wait; and a run detaches before it writes its terminal records, so that the others do not wait for it.
  • Records. The batch of every call, the server's build, reattachments and suspensions; the raw archive's two haCC serializers go to version 2.
  • The server is started by the user. A scan that starts it was given back to A scan that starts the shared haCC plan's server itself, and groups its points by lattice #962.
  • Verification. A manufactured server in CI, the real provider on a host, and whole short propagations on a device against private plans, to two tolerances fixed beforehand.
  • Requests to the provider. Eight interface requests (P1 to P8, section 5.4) to pass on before its client is built.

The provider's repository is not public, so the SEP restates the contract it relies on (section 3.2) and links nothing there.

Review

  • AI review (Opus 5.5, 16 findings, three blocking): recorded in Part III and answered point by point; all accepted.
  • Human review: pending.

Decided

The maintainer decided Q1 to Q4 and Q6 to Q11 on 2026-12-04, each as the SEP recommends; section 12 lists them. Q5 (who starts the server) was decided before drafting. The provider's maintainers then accepted the requests P1 to P8, and Part I was revised to their answers (sections 3.2, 4, 5.4, 6.3 to 6.7, 7.1 and 7.4). After the answers the maintainer decided Q1 again (no private model on a device build), amended Q9 (the amplification at the size of the spread) and decided the new Q12 (a degraded server). A second AI review (Opus 5.5) of that revision is recorded in Part III: 15 findings, R17 to R31, two blocking, not yet answered. Left: the response to it, and the human review.

How it was verified

  • git diff --check and codespell on the changed files: clean.
  • pytest tests/test_seps.py: 552 passed, 3 skipped, 3 xfailed.
  • The public-tree scan on both files: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XGENPweEXKA16uoDh2DRRF

solprop's side of the provider's accepted design for one haCC plan shared
by several propagation processes through a server: an execution setting
naming the server, one submission per step, the checks and records of a
run that holds no atomic model, and waiting, stopping and a lost server.

Refs #963.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPweEXKA16uoDh2DRRF
@jtravs jtravs added documentation Improvements or additions to documentation sep Tracks an enhancement proposal (SEP) labels Dec 4, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 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-12-04T22:35:54.725999Z f0fb95e New commits
🔒 Security Review ✅ Completed 2026-12-04T22:35:51.639154Z f0fb95e 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.

@read-the-docs-community

read-the-docs-community Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

📖 4 files changed · 1 added · 3 modified


Preview · build overview · solprop · built Dec. 4, 2026, 10:37 p.m. UTC

jtravs and others added 2 commits December 4, 2026 17:55
Refs #963.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPweEXKA16uoDh2DRRF
Part I answers the sixteen findings: a separate attach request before the
archive and the charge, waits logged by the parent without a protocol
change, a defined band norm and perturbation for the device gate, detach
before a run's terminal records, the causes of a reattachment, the
corrected provider contract and eight requests to the provider, the lock
of the consistency check, and the archive's serializer versions. Q10 and
Q11 are new.

Refs #963.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPweEXKA16uoDh2DRRF

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b8b42894c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +796 to +800
2. *Unmatched sequences.* Where a decision differs,
$\Delta_B(s, p) \le \max\bigl(\Delta_B(s, \mathrm{ref}), \Delta_B(p, \mathrm{ref})\bigr)$,
with the reference a private-plan run on the same card and build at a tenfold
tighter `rtol`. This holds a shared run to the accuracy envelope and no more, so it
is the weaker test.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix the accuracy envelope independently of the shared result

When adaptive decisions differ, this criterion includes the shared run's own error in its acceptance threshold, so a worse shared result can increase the permitted error enough to pass. For example, with scalar amplitudes ref = 1, p = 1.001 and s = 2, the left side is approximately 0.998 and the right side is 1, so a shared result with 100% error passes against a private result with 0.1% error. Conversely, equally accurate results on opposite sides of the reference can fail. Establish the envelope beforehand from private/reference convergence and require the shared result to meet that fixed envelope, rather than using its measured error to set its own threshold.

AGENTS.md reference: AGENTS.md:L236-L239

Useful? React with 👍 / 👎.

Comment on lines +740 to +743
- **Two concurrent short propagations** on `numpy_ref` through the server, against the
same two on private plans. With bitwise rows the drives of every later call are the
same, so the returned rows of every call, and the saved fields, are asserted bitwise
equal.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use numerical budgets for independent host propagations

The proposed host qualification requires bitwise equality of independently computed propagation fields and classifies differences as defects. This contradicts the repository's explicit reproducibility policy, which permits rounding differences between repeated runs and reserves exact equality for structural contracts. Matching the provider's kernel entry and thread count establishes its stated single-call guarantee for identical drives, not a structural guarantee covering the entire optical propagation. Keep exact checks for lossless transport, but compare propagation results within a matched-computation rounding budget or an accuracy envelope when adaptive histories differ.

AGENTS.md reference: AGENTS.md:L214-L218

Useful? React with 👍 / 👎.

jtravs and others added 2 commits December 4, 2026 21:30
Q1 to Q4 and Q6 to Q11 are decided, each as the SEP recommends. Section 12
lists the decisions, and the three places in Part I that still put a
question now state its answer.

Refs #963

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPweEXKA16uoDh2DRRF
The provider's maintainers accepted the requests P1 to P8 and checked the
contract of section 3.2. Part I now states the contract with the answers:
the error classes, the status query, the round's record, the version rule
and the degraded state. The status query moves most refusals to preparation,
the failure cases are told apart by class, and a degraded server has a rule
of its own.

Decided by the maintainer after the answers: Q1 again (no private model on a
device build), Q9 amended (the amplification at the size of the spread) and
the new Q12 (a degraded server is retried for reconnect_timeout).

Refs #963

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPweEXKA16uoDh2DRRF

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50eb4a729f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +719 to +721
A degraded server is retried in two places. At a first attachment the `attach` request
fails with the cause, and the binding logs the warning and sends the request again at
intervals, so the user sees the reason while the run waits. Inside a call that is

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Define a recoverable reply for degraded attachment attempts

When the server is degraded at the first attachment, this retry loop cannot reuse the worker under the unchanged worker contract promised in §6.1. In src/solprop/driver/_source_worker.py, Worker._wait converts every error reply into RemoteError, and Worker.request kills the worker on that exception; sending another attach request therefore fails because the worker is no longer running. Specify a normal reply carrying the recoverable attachment status, explicitly change the worker's error handling, or require worker recreation and preparation between attempts so that T14 can actually wait through degradation.

Useful? React with 👍 / 👎.

| `device` against the build (`_build_record`) | the worker's `execution_space`, at construction | Skipped for the worker, whose build is recorded as the client's. Applied to the server's: from the status at preparation, and from `client.info.build` at each attachment |
| One provider revision | a fresh worker must report the first one's build | Also: the server refuses a client of another protocol version or source revision, at the status query and at every attachment, by the rule of §3.2. solprop compares nothing itself, so that the two cannot disagree on what equal means. The provider allows a revision it cannot verify (a modified tree, a build that reports none) with a warning; the run warns once as well and records it |
| The plan record (`check_info`) | each plan in the worker, each result in the parent | Unchanged, on `client.info` at each attachment and on each result, with the run's rows. The record's kernel and build fields are not compared, as today |
| The output selection and the closure | decided by the first plan | Decided by the first attachment, by the same sequence. A server already fixed at the other selection refuses with a `SettingsMismatchError` that names `outputs` alone, which tells it from the closure refusal, a plain `ValueError` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve custom-basis closure before rejecting output mismatches

For a custom mixed-gauge basis without a qualified closure, the first run falls back from total_current to full, fixing the server at full. A subsequent identical run still initially requests total_current: today's _HaccModel.plan discovers the fallback only after a plain closure ValueError. Under this proposal, however, build_plans raises the status query's output mismatch before attachment, and an attachment racing that query also treats SettingsMismatchError(outputs) as fatal rather than reaching the closure fallback. Thus the second otherwise compatible run is refused, contradicting T12 and the multi-run behavior described below. Specify how the effective closure/output selection is resolved before these comparisons, while retaining refusals for genuinely incompatible output requests.

Useful? React with 👍 / 👎.

An independent Opus 5.5 review of Part I as revised to the provider's
answers, with findings R17 to R31, two of them blocking. Recorded verbatim
and not yet answered; Part I is unchanged.

Refs #963

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPweEXKA16uoDh2DRRF

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0fb95e666

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

|---|---|---|---|
| **The run's own call**: a refused submission, a row that fails its monitors, a broken record | The `ValueError` or `TypeError` of a plan from `evaluate`, or an invalid row | Today's rule: the failure is recorded and archived, the worker is ended, `BackendError` ends the run at its last accepted step | Charged, and counted as a failed call |
| **A failed march** (cause `march`) | `RoundFailedError` from `evaluate`; the client stays attached | The adapter submits the same drive once more on the same client, and the failure is recorded. The server has built its plan again before that round. If the second march fails too, today's rule applies | Charged once. A failed call is counted only if the resubmission fails |
| **The server is lost or restarting** (cause `server`) | `ServerUnavailableError` from `evaluate`; the client is closed | The adapter constructs a new client, trying for up to `reconnect_timeout` in all for this call, then submits the same drive. The worker is kept. If the time runs out the run stops at its last accepted step, resumable. A returned server of another revision refuses the attachment, and one of another family stops the run (§6.3) | The call was charged once, before it was first submitted. A resubmission is the same call and is not charged again. The stop is not a failed call |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bound blocking reattachments by the remaining reconnect time

After a server restart, another returning client can occupy the available rows before this run reconnects. The new SharedPlan constructor then waits for a place under attach_timeout, whose default is unlimited; §3.2 also explicitly excludes admission builds from that timeout. Consequently, checking reconnect_timeout between constructor attempts cannot enforce the promised total bound, and a charged call can remain blocked indefinitely instead of stopping resumably after 600 seconds. Specify how the remaining reconnection deadline bounds a blocking constructor, including how it interacts with queueing and admission builds.

Useful? React with 👍 / 👎.

Comment on lines +809 to +811
size; the reattachments with their positions and causes, and every change of
`instance`; the sums of the calls' `missed_rounds`, `suspensions`, `wait_seconds` and
`march_seconds`; and the time spent waiting to attach, which the adapter measures.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Define how adapter recovery events reach the parent on failure

If an evaluation reconnects or retries a failed march and subsequently fails, the promised recovery history exists only inside the worker. In the inspected code, PyroraptorAdapter._result returns only kind, raw and model_match, while _source_worker._error_report carries only type, message, classification and traceback; Worker.request then kills the worker on an error. The unchanged error transport therefore loses the reattachment causes, durations and instance changes precisely for failed calls, and result.shared cannot recover them because no result was returned. Specify a relay for these events on both successful and failed requests, and have the binding retain them before worker teardown.

Useful? React with 👍 / 👎.

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

documentation Improvements or additions to documentation sep Tracks an enhancement proposal (SEP)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant