Spec amendment 1: typed RIR semantics + D21 (no string-tagged dispatch)#75
Merged
StarGazerM merged 1 commit intoMay 19, 2026
Conversation
…tch gaps) User review of merged PR #74 surfaced 8 places where the proposed RIR vocabulary still expressed operational meaning as string-tagged dispatch or implicit list ordering, in violation of the spec's own ACID test. This amendment fills them by promoting each concern to typed IR ops or typed metadata: 11 typed maintenance ops (replacing one MaintenanceCall with kind:str), typed TerminationCheck union, typed Step.deps DAG edges, typed DeltaVariantSet + VariantOrdering, typed MultiHeadInsert + HeadOrdering, three typed kernel-def ops (Count/Materialize/Fused replacing KernelDef.phase:str), typed ComposabilityMeta on Pragma, and typed ViewBinding carrier. RIR op count grows ~10 to 30; PR-2 splits to PR-2a + PR-2b; total ledger 6 to 7 PRs. D21 discipline (no string dispatch in renderer bodies) added. PR-1 scope unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
First spec refinement after PR #74 (the redesign baseline). Addresses 8 semantic gaps in the RIR vocabulary where operational meaning was hidden behind string-tagged fields instead of typed ops. Expands RIR from ~10 op families to 30 typed ops + 5 carrier dataclasses.
What's new
§ 1 ACID sub-clause
§ 3.1.1.1 expanded RIR vocabulary (30 typed ops, 5 carriers)
RunnerStruct,StepDispatch,FixpointLoop,Step(with explicitdeps: tuple[StepId, ...]DAG edges)ConvergenceCheck,MaxIterationFuel,EitherFirst,AndAllKernelLaunch+ 4 schedulersphase)CountKernelDef,MaterializeKernelDef,FusedKernelDefDeltaVariantSet(ordering=Sequential|Independent|Fusable)MultiHeadInsert(heads, ordering=Sequential|Concurrent)DedupTableComputeDeltaCall,MergeIndexCall,RebuildIndexCall,CheckSizeCall, etc.Plus carriers:
HeadSpec,ViewBinding,ComposabilityMeta,VariantOrdering,HeadOrdering.§ 7.1 D21 discipline rule
§ 10 Amendment log
Acknowledges the spec is a living document during the redesign; subsequent amendments are PR-shaped and reviewed.
Two corrections surfaced during review
orchestrator.py:506-588is 11 (verified againstmir/types.py). The spec conflatedExecutePipeline+ParallelGroup+ a duplicate branch into the count. Now corrected throughout.KernelDef(name, phase: KernelPhase, body)is superseded — replaced by 3 typed ops. Old code block left intact with a supersession callout, per the "don't rename/move existing headers; expand instead" rule.PR-2 split: YES (6 → 7 PRs total)
With 30 typed ops + 11 lowerings to maintenance ops, PR-2's scope ballooned past comfortable. Split:
Both gate on
verify_runner_completeness(WARN in 2a, HARD in 2b).Final ledger: PR-1 → PR-2a → PR-2b → PR-3 → PR-4 → PR-5 → PR-6. Strictly serial.
Test plan
.mdfiles in doc body (only the existing example of the forbidden pattern in a code span at line 14)🤖 Generated with Claude Code