Skip to content

fix(runtime): enforce single-owner simulation delivery - #27

Merged
nikstern merged 2 commits into
mainfrom
codex/issue-24-single-owner-delivery
Aug 23, 2026
Merged

nikstern merged 2 commits into
mainfrom
codex/issue-24-single-owner-delivery

Conversation

@nikstern

@nikstern nikstern commented Aug 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • make SimScheduler::tick enqueue-only and drain mailboxes deterministically through one owner
  • port upstream fix(runtime): single-ownership delivery for scheduled simulation messages (ARN-236) nerdsane/temper#404 while preserving fork crash/restart reconstruction and durable reactions
  • route integration callbacks through the scheduler and surface handler, callback, unknown-target, stale-action, and budget failures
  • evaluate L2 reaches over states visited during the trace
  • add seeded regressions for retained clones, delayed tails, duplicate sends, crash/restart, and rejection paths

Design and tradeoffs

ADR-0177 defines the ownership and fault boundaries. Restart injection occurs at the start of each tick; runtime reconstruction precedes drain; crash injection occurs after application in finish_tick. Drivers allow one in-flight action per actor and explicitly budget tail flushing.

Corrected runs may execute more transitions and produce different traces for an existing seed because delayed deliveries that were previously lost are now consumed. A flush budget that cannot reach quiescence is an explicit violation instead of a successful-looking result.

Validation

  • cargo test --workspace
  • bash scripts/verify-spec-directories.sh (all curated L0-L3 directories)
  • cargo clippy -p temper-runtime -p temper-verify --all-targets --all-features -- -D warnings
  • bash scripts/check-determinism.sh (0 findings)
  • bash scripts/readability-ratchet.sh check .ci/readability-baseline.env
  • bash scripts/ci-integrity.sh
  • mandatory code-quality review: PASS, 0 findings
  • mandatory DST review: DST-READY, 0 findings

Closes #24.

@nikstern
nikstern marked this pull request as ready for review August 23, 2026 23:06
@nikstern
nikstern merged commit 666e10f into main Aug 23, 2026
24 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.

Port single-owner scheduled simulation delivery

1 participant