Skip to content

Make simulator scenarios deterministic and compare allocation invariants with the runtime #12

Description

@ctfbruce

Problem

Research simulation needs reproducible seeds, configurations and replayable traces before its allocation results can be compared with the deployed implementation.

Proposed change

In the companion simulator, record seed/algorithm/configuration, export traces and compare shared allocation invariants with core fixtures. Keep simulator code in its current project.

Acceptance criteria

  • Repeating a seed/configuration produces the same event trace and allocation results.
  • Scenarios include congestion, node churn and hierarchical destination limits, with explicit differences from real packet accounting.
  • Core and simulator fixtures agree on units and conservation invariants; failed comparisons produce a minimal reproducible trace.

Current evidence

unimplemented requirement. Backlog classification is based on source inspection; this issue does not claim a new runtime reproduction.

Priority

Optional expansion. This does not block the working local team alpha; select it after the required contracts and maintenance ownership are established.

Validation must use owned local fixtures on supported Linux environments. Record the implementing merge request and relevant test results before closing this issue.


Imported from GitLab issue 11. Originally opened 2026-09-10. Historical GitLab links may require access to the original project.

Activity

  1. added this to the Research and results milestone on Sep 24, 2026
  2. added
    DeferredIntentionally deferred; see the issue for its activation condition.
    OptionalAn optional product expansion, not required for the local team alpha.
    P2Follow-on improvement or optional expansion after core requirements.
    Research and resultsPortable results and controlled, reproducible measurement experiments.
    Source reviewedCurrent source evidence checked; no new runtime reproduction claimed by backlog creation.
    TestA specific missing validation gate or reproducible test harness.
    on Sep 24, 2026
  3. ctfbruce commented on Oct 5, 2026

    @ctfbruce
    CollaboratorAuthor

    Progress. The companion simulator has deterministic, seeded scenarios with exported traces and allocation invariants on branch b14/deterministic-scenarios of its repository (commit e918b0c1; draft merge request to follow): repeating a seed and configuration yields a byte-identical trace and digest; the congestion, churn and hierarchical-destination families are generated from the seed alone; invariants are checked after every event and the first violation produces the shortest reproducing prefix. It records a divergence of the simulator's multi v1 filter from the dispatcher: the filter does not bound ceilings by destination or source capacity, so the hierarchical scenario reproducibly violates the destination invariant.

    #372 replays the congestion trace against the dispatcher's destination accounting with core's invariants after every event. The admission decisions differ in one class only: the simulator refuses a run whose executor's admitted floors would exceed its capacity, where core's destination accounting admits; core enforces executor capacity earlier, in the scheduler at submission, which the replay does not model.

    Remaining before closing: replaying the hierarchical family and prefix destination updates (or retaining them explicitly), a comparison that includes the executor side, and the live simulation mode, which still runs on real time and goroutines.

  4. ctfbruce commented on Oct 7, 2026

    @ctfbruce
    CollaboratorAuthor

    Completed in core PR #408, merge aa3ac6d629a13374a99ce2ce76ebb434f6e96478, and simulator MR1, merge 5762df7136ae75c48a6e5a4242a670cfab49dded.

    The deterministic scenario mode records seed, algorithm and configuration, produces repeatable traces, and covers congestion, churn, hierarchical prefix updates and shared destinations. The simulator now conserves executor/source/destination allocations; the prefix-update ordering and equal-value removal regressions retain their reproducing inputs. Core replay checks actual scheduler admission/floor reservations and runtime per-run/aggregate budgets with the same units, after every event, and emits the shortest failing prefix. Trace fixtures and limits describe the comparison.

    The legacy live visualization still uses wall time and goroutines and is explicitly not the deterministic trace/acceptance mode. Simulated allocation and application budgets are distinct from packet-counter wire enforcement.

    Core candidate CI and merged-main CI, plus their guest source gates, passed. Simulator candidate and main passed formatting, full race tests, vet, build and replay gates with matching trace digests.

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

    DeferredIntentionally deferred; see the issue for its activation condition.OptionalAn optional product expansion, not required for the local team alpha.P2Follow-on improvement or optional expansion after core requirements.Research and resultsPortable results and controlled, reproducible measurement experiments.Source reviewedCurrent source evidence checked; no new runtime reproduction claimed by backlog creation.TestA specific missing validation gate or reproducible test harness.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions