Repository navigation
Conversation
The compiler asks the TARGET to render a produced declaration and receives a
bodied-arrow scaffold. emit_produced.dag imports no target language: it matches
on target.produced_decl_support, refuses ProducedDeclUnwired with a typed,
located produced_decl_target_unwired, and otherwise calls the target's renderer.
Rust and C each own their own order, authored in their own modules:
Rust fn add(x: i32, y: i32) -> i32 { x + y }
C int add(int x, int y) { return x + y; }
Those differ in every axis the compiler previously owned -- keyword-first versus
return-type-first, NAME colon TYPE versus TYPE NAME, return arrow versus none,
value-producing versus statement-sequenced with a return token and terminator.
C required no compiler edit: it registers a renderer and supplies its own
binding spellings. That is criterion 5, and the cross-golden arms are its
discriminating RED -- neither target can produce the other's text, so a seam
that kept order in the compiler would fail the witness rather than pass quietly.
target_model_with_produced_scaffold installs the rendered scaffold, deciding
only WHERE it attaches. It reuses target_model_bundle_replace_edge_target rather
than adding node surgery, and takes the BARE base row from ProducedDeclWired --
the target's ordinary rule already carries a fixed scaffold, and appending a
second bodied-scaffold edge would let the fixed one win every lookup, emitting
one declaration's signature for every declaration.
Deleted as obsoleted by the climb: rust_produced_decl_target and, cascading,
rust_bodied_relation_rules_node_with_scaffold. The rust_signature_* chain is
KEPT -- it is now Rust's renderer body, which is where order belongs.
Re-cut onto merged main after #8155 squash-merged; the field carrier and its
preservation fixes come from that commit rather than being duplicated here.
Not verified by execution -- CI is the consumer.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both findings in review 51267 verified against the code and fixed. FINDING 1 - a regression I introduced. On main, emit_produced_module_rust ignored the passed target and built a per-decl Rust target internally. Making the passed TargetModel authoritative is the right seam cut, but it means rust_target_model_staging -- still ProducedDeclUnwired after the mechanical pass -- now refuses. Its two consumers, v2.workflow.realization_attempt and emit_host_produced_module_equals_eval_test, would have hit produced_decl_target_unwired instead of emitting. Staging now carries rust_produced_decl_support(): it is a Rust target and renders Rust order, differing from production only in lex, which is the dissolution-by-identity sequencing already ruled for it. FINDING 2 - the criterion-5 witness could not have passed. C's bundle carried selection policy, declared inhabitants, translation rules, serialize source and semantic-decl emission, but neither value_expression_projection nor operator_realizations, and produced-decl emission serializes the arrow BODY through those. The signature renderer covers prefix and scaffold order only; it does not substitute for body projection. Took the wire-it option rather than narrowing the golden to signature-only, because narrowing would have made the receipt claim less than criterion 5 asks while still reading like a two-target proof. C now carries a minimal value-expression surface -- binding-ref plus an op_add catalog on c_token_plus, mirroring Rust -- so the shared fixture body projects for C. Forms C has not modeled carry token classes with no lex rule, so reaching one REFUSES at serialization rather than emitting fabricated text. That is the existing fail-closed lex-miss arm, not a new mechanism, and it keeps C's unmodeled surface honest instead of quietly wrong. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
Closing as a duplicate of #8168 — no content is lost. Both branches point at the identical commit #8168 is the live one — it carries the reviews, the corrected title and body, and the CI run. Two open PRs with byte-identical content is the ambiguity that gets the wrong one approved, so this one goes and its branch is deleted. Nothing here exists outside #8168. |
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.
Auto-opened by session-dashboard for session
wise-swift-269.Pushing to
session/wise-swift-269-wiring-v2advances this PR.Worker attestation
Before flipping this PR to ready for review, confirm each item:
npm test,cargo test) and the result.Closes #Ndirective.Summary
TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.
Test plan