Skip to content

Add a debug check that user actions do not delete secondaries - #711

Merged
SeverinDiederichs merged 1 commit into
apt-sim:masterfrom
SeverinDiederichs:debug-replay-guard
Oct 21, 2026
Merged

SeverinDiederichs merged 1 commit into
apt-sim:masterfrom
SeverinDiederichs:debug-replay-guard

Conversation

@SeverinDiederichs

Copy link
Copy Markdown
Collaborator

The secondaries attached to a replayed GPU step belong to particles that are already transported on the GPU. A user stepping action that removes, replaces, kills or reweights them introduces a difference for the CPU replay from the GPU transport, and one that deletes a removed secondary corrupts the replay storage. Such decisions have to be taken by the stepping action on the GPU before a secondary is created.

As this is a non-trivial check, it is for debug only, as this should normally never trigger.

Assisted-by: Claude Code (Claude Fable 5)

@SeverinDiederichs

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-21T14:20:15.864127Z
We couldn’t complete this review. Comment @codex review to try again.
2c98ac3 Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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".

@SeverinDiederichs

Copy link
Copy Markdown
Collaborator Author

/run-test

@SeverinDiederichs

Copy link
Copy Markdown
Collaborator Author

As the automatic AI review is broken: manual AI review with Codex 6.1 SoL ultra found no issues with the PR.

…lone

The secondaries attached to a replayed GPU step are placement-new'd
pool objects that are already transported on the GPU. A user stepping
action that removes, replaces, kills or reweights them desynchronizes
the CPU replay from the GPU transport, and one that deletes a removed
secondary corrupts the replay storage. Such decisions have to be taken
by the stepping action on the GPU before a secondary is created
(ClassifySecondary).

Snapshot the GPU-born secondaries before the user stepping action and
throw a descriptive exception if their identity, status or weight
changed. This is purely an extra consistency check for debugging such
mismatches: it is compiled out in release builds (NDEBUG, like the
asserts in this file), changes no behavior for compliant user actions,
and costs nothing in production.

Assisted-by: Claude Code (Claude Fable 5)
@SeverinDiederichs

Copy link
Copy Markdown
Collaborator Author

/run-test

@SeverinDiederichs
SeverinDiederichs merged commit aebbf35 into apt-sim:master Oct 21, 2026
6 checks passed
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.

1 participant