Skip to content

engine: no test cross-checks cycle handling for initial values #574

Closed as not planned

Description

@bpowers

The test suite cross-checks the engine's handling of cycles among flows and auxiliaries, but not cycles in initial values.
For the flow phase, a test-only helper recomputes the dependency cycles independently and asserts the engine either resolves each one (an element-by-element recurrence) or reports a circular-dependency error.
The initial-value phase has its own recurrence resolution but no such cross-check; it is covered only by a few targeted tests.

Why it matters

A change to the initial-value dependency rules could make the engine disagree with the true cycle structure without any test failing.
No such defect has shipped.
Note the cross-check would not have caught #595: both the engine and the helper treat a module as having no dependencies, so the cycle in that issue is invisible to both.

Fix

phase_cycle_sccs already takes the phase as a parameter, so an initial-value version of dt_cycle_sccs and its consistency check is small.
Alternative: drop the idea and delete the rustdoc on dt_cycle_sccs_consistency_violation that calls it a later-task obligation.

Pointers

  • src/simlin-engine/src/db/dep_graph.rs: phase_cycle_sccs, dt_cycle_sccs, dt_cycle_sccs_consistency_violation, dt_cycle_sccs_engine_consistent
  • src/simlin-engine/src/db/dep_graph_tests.rs

Activity

  1. added
    engine
    on Jun 8, 2026
  2. changed the title [-]engine: no init-phase cycle instrumentation + engine-consistency cross-check (init analogue of dt_cycle_sccs / dt_cycle_sccs_consistency_violation)[/-] [+]engine: no test cross-checks cycle handling for initial values[/+] on Oct 12, 2026
  3. added
    hygiene
    wontfix
    on Oct 12, 2026
  4. bpowers commented on Oct 12, 2026

    @bpowers
    OwnerAuthor

    Closing as won't fix.

    This is a test harness for a defect that has not shipped. It would not have caught #595, because the helper shares the engine's rule that a module has no dependencies. If closed, delete the 'later-task obligation' rustdoc on dt_cycle_sccs_consistency_violation.

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

    enginehygienewontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions