Skip to content

Determinism witness: two-pass byte-identity test for parse/instantiate/compile (review IMP-4) #506

@Brad-Edwards

Description

@Brad-Edwards

Finding (Recorded-only — review IMP-4)

docs/explain/sdl/parser.md:51-53 claims file-backed deterministic expansion; no test runs the pipeline twice and asserts identical output. The design (lockfile-backed imports, no ambient state) is plausibly deterministic — the claim simply lacks its witness.

Scope (one PR)

  1. Test: parse → instantiate (with variable substitution) → compile a representative scenario twice in separate passes; assert canonical JSON serializations are byte-identical (excluding any explicitly timestamp-typed fields — enumerate them in the test).
  2. Cover ordered-collection surfaces (multiple agents, features, relationships) and at least one module-import scenario so expansion order is exercised.
  3. Run one pass with PYTHONHASHSEED variation (subprocess) to catch hash-order dependence.

Acceptance criteria

  • The witness runs in CI; parser.md's determinism claim cites it.

Related

#262 (ASR-514 Determinism And Stability Verification) — this is the narrow witness for the existing documented claim; ASR-514 remains the broader requirement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions