Repository navigation
S2: relocate rust.dag emit-host test scaffolding to rust_test.dag - #6409
Merged
Merged
Conversation
Pure relocation. src/v2/extdeps/languages/rust.dag had grown to 8037
lines / 602 top-level decls; ~273 of those were per-form emit-host test
apparatus (source_text / target_model_staging / runtime_row /
host_transport_descriptor / serialize_source_node / grammar_sequence /
concrete_tokens / signature_with_open / translation_rules / lex rows /
formal_production_fn_* / fixtures / goldens / main-suffixes) that had
accumulated in the language-authority file because every emit witness
dumped its fixtures straight into rust.dag.
Move criterion (provably safe): computed the prod-reachable closure over
rust.dag's intra-file reference graph, seeded by every decl referenced by
any non-test .dag file. Everything NOT reachable from that seed is
consumed only by *_test.dag files. Those 273 data/fn decls move verbatim
to the new v2.extdeps.languages.rust_test module; all 329 remaining decls
(every decl any non-test code touches, plus all `type` language
vocabulary) stay in rust.dag. No staying decl references a moved decl, so
rust.dag has no dependency on rust_test (no import cycle).
rust.dag: 8037 -> 4716 lines. Decl bodies moved byte-for-byte; only the
rust.dag import header was pruned to what the remaining decls use, and
the 21 affected test files had their `import ... rust {...}` split so
moved symbols resolve from rust_test.
Regression: all 62 rust emit + emit-host witnesses green before and after,
identical PASS set (structural goldens unchanged by construction — a pure
move; a golden shift would red its emit witness).
Phase 2 (parameterized emit-host row factory) intentionally skipped:
the per-form rows differ enough that a factory risked shifting a golden;
relocation is the deliverable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls
added a commit
that referenced
this pull request
Jul 10, 2026
…ust_test module (#6458) #6409 relocated rust_emit_directive_emitted_call / rust_emit_directive_target_model from v2.extdeps.languages.rust to v2.extdeps.languages.rust_test (test-only closure), but src/v2/test/claim/manual/emit_directive_rust_test.dag still imported them from the old module. Latent since #6409 (the manual discovery corpus was not CI-enrolled until the #6438 discovery flip), surfaced when #6451's affected set selected the file. Co-authored-by: Brian Searls <briansearls1@gmail.com> Co-authored-by: Claude Fable 5 <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.
What
Pure relocation to de-bloat
src/v2/extdeps/languages/rust.dag(the Rust language authority), which had grown to 8037 lines / 602 top-level decls — ~273 of those were per-form emit-host test scaffolding dumped into the authority file by emit witnesses (fixtures, goldens,*_source_text,*_target_model_staging,*_runtime_row,*_host_transport_descriptor,*_serialize_source_node,*_grammar_sequence,*_concrete_tokens,*_signature_with_open,*_translation_rules, per-form lex rows,rust_formal_production_fn_*,rust_grammar_production_fn_*, etc.).How (provably safe move criterion)
Computed the prod-reachable closure over rust.dag's intra-file reference graph, seeded by every decl referenced by any non-test
.dagfile. Everything NOT reachable from that seed is consumed only by*_test.dag. Those 273 data/fn decls move verbatim into the new modulev2.extdeps.languages.rust_test(src/v2/extdeps/languages/rust_test.dag); the remaining 329 decls — every decl any non-test code touches, plus alltypelanguage vocabulary — stay in rust.dag. No staying decl references a moved decl, so rust.dag has zero dependency on rust_test (no import cycle).rust.dag: 8037 → 4716 linesimport v2.extdeps.languages.rust { ... }split so moved symbols resolve fromrust_testand kept symbols still resolve fromrust.Regression gate
All 62 rust emit + emit-host witnesses (17
emit/files + 6manual/files) green before and after, identical PASS set. Structural goldens are unchanged by construction (pure move — a golden shift would red its emit witness).Phase 2 skipped
The parameterized emit-host row factory was intentionally skipped: the per-form
*_main_suffix/*_runtime_row/*_source_textrows differ enough that a factory risked shifting a golden. Relocation is the deliverable.🤖 Generated with Claude Code