Skip to content

Routing v0.4: stale reference cleanup and typed/legacy parity matrix - #279

Open
sigilabcodex wants to merge 5 commits into
mainfrom
test-pr-272
Open

Routing v0.4: stale reference cleanup and typed/legacy parity matrix#279
sigilabcodex wants to merge 5 commits into
mainfrom
test-pr-272

Conversation

@sigilabcodex

Copy link
Copy Markdown
Owner

Summary

This PR advances the v0.4 routing consolidation work in two compatibility-first phases:

  1. Adds a confirmed cleanup flow for stale routing references.
  2. Adds an executable typed/legacy routing compatibility matrix.

The PR intentionally does not migrate routing ownership, remove legacy routing, change the patch schema, or make Patch.routes the sole runtime authority.

Phase 3 — confirmed stale routing cleanup

Adds a user-confirmed cleanup action for routing references whose module or bus endpoint no longer exists.

Covered representations:

  • legacy triggerSource
  • legacy target-owned modulations
  • legacy audio connections
  • typed Patch.routes

Safety constraints:

  • opening the routing inspector remains read-only;
  • cleanup requires explicit confirmation;
  • cancellation causes no mutation;
  • valid references are preserved;
  • cleanup is deterministic and idempotent;
  • unrelated validation warnings are not automatically removed;
  • legacy routing support and schema version remain unchanged.

Phase 4 — typed/legacy parity characterization

Adds docs/routing-compatibility-matrix.md and executable characterization tests covering:

  • legacy, typed, and hybrid event routing;
  • partial typed adoption;
  • multiple event sources targeting one sound;
  • legacy, typed, and hybrid modulation routing;
  • legacy, typed, and hybrid audio routing;
  • missing and unsupported bus endpoints;
  • compiler, inspector, scheduler, modulation-runtime, and audio-runtime divergence.

Important documented findings:

  • compileRoutingGraph() is still a normalizer/read model rather than the sole runtime authority;
  • scheduler event resolution uses compiled routes first, then legacy triggerSource fallback;
  • typed modulation is visible in the graph, but runtime modulation still reads legacy target-owned modulations;
  • typed audio is compiled into connection-like records and then validated through the legacy connection validator;
  • the inspector follows compiled graph state and may differ from scheduler-effective fallback behavior.

Validation

  • npm run typecheck — passed
  • npm test — passed, 164 tests
  • npm run build — passed

Scope

This PR is intentionally limited to safe cleanup, characterization tests, and documentation. The next recommended step is an event-domain read resolver that can report both compiler-canonical and scheduler-effective sources before any ownership or runtime behavior is changed.

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.

1 participant