Skip to content

madsim spike: notification_drain trailing-grace invariant #19

Open

Description

@kevintruong

Worker tracking issue for the madsim spike covering crates/spur-core/src/notification_drain.rs trailing-notification grace behavior.

Scope:

  • Add cfg-gated madsim dev-dependency to crates/spur-core.
  • Add crates/spur-core/tests/notification_drain_madsim.rs gated behind cfg(madsim).
  • Prove notifications emitted before the 100ms grace deadline are delivered and notifications after are not.
  • Verify normal spur-core checks remain unaffected.

Activity

  1. kevintruong commented on May 27, 2026

    @kevintruong
    ContributorAuthor

    [[spur-signal v1]]
    {"signal_id":"3b1df65e-c984-48d8-9f48-3e3a44e1b68e","kind":"scope_drift","severity":0.82,"reason":"Required verification commands fail before the madsim test because cargo check -p spur-core compiles spur-pm, whose existing unsafe statfs blocks violate the workspace unsafe_code deny lint.","estimated_subtasks":1}

  2. added
    signal:scope-drift:high
    on May 27, 2026
  3. kevintruong commented on May 27, 2026

    @kevintruong
    ContributorAuthor

    Progress update for native shutdown madsim harness:

    • Commit: efd72225 test(spur-acp): #19 add madsim native shutdown timing
    • Added crates/spur-acp/tests/native_shutdown_madsim.rs, gated with #![cfg(madsim)].
    • Mirrored cfg-gated madsim / madsim-tokio dev-deps in crates/spur-acp/Cargo.toml.
    • Added a small pure timing helper at crates/spur-acp/src/connection/native_shutdown.rs; no real subprocess or libc::kill calls are exercised by the harness.
    • Verified:
      • ./scripts/spur-cargo check -p spur-acp exited 0.
      • RUSTFLAGS="--cfg madsim" ./scripts/spur-cargo test -p spur-acp --test native_shutdown_madsim exited 0 with 2 tests passed.
    • Determinism check: two runs with MADSIM_TEST_SEED=4242 produced the same test-level output and pass order; wrapper/cache counters differed as expected.

    Recommendation: before replicating across more grace sites, consider a shared spur-test-madsim helper module/crate for the seed assertion and timing/event assertions. The harness shape is already repeating across crates.

  4. kevintruong commented on May 27, 2026

    @kevintruong
    ContributorAuthor

    PROGRESS: Replicated the madsim bounded-grace harness for the session notification-pump retire path in commit 3fa8052a. Added crates/spur-core/tests/session_pump_retire_madsim.rs to prove the 99 ms notification is delivered, the 101 ms notification is dropped after the 100 ms retire grace, and the pump is explicitly aborted at the deadline when the producer remains alive.

  5. added 15 commits that reference this issue on Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    signal:scope-drift:highspur:agent:codex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions