Repository navigation
RFC 07 — System Access Declarations + Auto-DAG (Units 1-5) - #276
Merged
Merged
Conversation
This was referenced Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements RFC 07 — System Access Declarations + Auto-DAG (Units 1-5). This is the engine-side delivery; Workbench surfacing (Unit 6 / #275) is deferred pending runtime hosting in Workbench's
OpenSession.Closes #270, #271, #272, #273, #274.
What this delivers
Phaseprimitive + registration (Auto-DAG Unit 1 — Phase primitive + registration #270): readonly struct wrappingstring, Typhon-shipped statics (Input/Simulation/Output/Cleanup),RuntimeOptions.Phasesordered list +RuntimeOptions.DefaultPhase, phase-token → integer index map resolved atBuild().SystemBuilderdeclaration methods (Auto-DAG Unit 2 — SystemBuilder declaration methods #271): converted all 14 existing methods to fluent (return this); added.Before(string); 11 new declaration methods (Reads/ReadsFresh/ReadsSnapshot/AdditionalReads/Writes/SideWrites/WritesEvents/ReadsEvents/WritesResource/ReadsResource/ExclusivePhase); batch overloads (arities 2–6) forReads/Writes/ReadsFresh/ReadsSnapshot.Build()validator + auto-DAG derivation (Auto-DAG Unit 3 — Build() validator + auto-DAG derivation #272): per-phase conflict detection (W×W with XOR rule, R×W-plain hard error, R×W-fresh/snapshot edge derivation), event producer→consumer + named resource edges, ExclusivePhase enforcement, cross-phase chain over consecutive populated phases, merge with explicit.After()/.Before()edges, downstream Kahn cycle detection.[ThreadStatic]SystemAccessValidatorwith push/pop frame stack;[Conditional("DEBUG")]onEnterSystem/LeaveSystem/AssertWriteso all 7 dispatch-site call sites inDagSchedulerstrip entirely in RELEASE;InvalidAccessExceptionthrown on undeclared writes in DEBUG with system name + undeclared type + declared summary.RuntimeOptions.DefaultPhaseensures every system lands in some phase post-Build(); pragmatic divergence from "strict required Phase" documented in RFC body;02-system-scheduling.mdsuperseded by RFC 07; newclaude/rules/runtime-scheduling.mdcodifies the auto-DAG invariants.Test plan
dotnet build Typhon.slnx -c Debugclean (no new warnings)dotnet test --filter "FullyQualifiedName~PhaseTests|SystemBuilderFluentTests|AccessDagDerivationTests|SystemAccessValidatorTests"— 61 RFC 07 tests greendotnet testregression — 3387+ tests pass, no failures (one flaky concurrent BTree test passes on rerun)[Conditional("DEBUG")]stripping by inspecting Release IL forEntityRef.Write<T>(no validator calls present)Documentation
02-system-scheduling.mdheader note → RFC 07 supersedes R3/R-Q6claude/rules/runtime-scheduling.md— NEW rules file with 5 modules (Phase Resolution, Access Conflict Detection, Edge Derivation, Debug-Runtime Write Validation, API Contract Stability)SchemaRelationshipsPanel.tsxbadge text +SystemRelationshipDto.csdoc-comment now point at Auto-DAG Unit 6 — Workbench Schema Inspector + Profiler surfacing #275 for runtime-hosting prerequisiteKnown limitations / follow-ups
AccessConflictErrorenvelope not built — current implementation uses formattedInvalidOperationException; substantive UX is met.[Conditional("DEBUG")]IL stripping; BenchmarkDotNet measurement nice-to-have.claude/overview/13-runtime.mdprose update pending — RFC body + rules file capture the design; overview prose is a follow-up.OpenSessionhosting a liveTyphonRuntimein Workbench.Companion PR
claude/documentation changes: see the typhon-claude repo PR (link to follow once created).