Skip to content

Native broker 2C/C3: an erased empty-map type argument defers to the target's inference (std_list, −3 broker errors) - #13238

Merged
gunbai-bot[bot] merged 8 commits into
mainfrom
session/still-raven-321-c3
Oct 7, 2026
Merged

gunbai-bot[bot] merged 8 commits into
mainfrom
session/still-raven-321-c3

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Native broker wave 2C, class C3: the std_list UNRESOLVED_CompilerError and the generic T erased to ().

What was wrong

In std.list duplicated_by_key, DuplicatedScan { firsts: empty_map(), .. } is a field typed Map<String, T>. It emitted v1_rt::rc_empty_map::<String, compile_error!("UNRESOLVED_CompilerError")>(). The record was then inferred as DuplicatedScan<()>, which produced E0282 and E0308 (Vector<()> vs Vector<T>).

Where the boundary is (DESIGN §6b)

The emitted functions do carry <T>, so this is not lane 1C's "generic fns without ". The turbofish's type also arrives already erased: v1.compiler.infer does not bind a generic record's parameter at an unannotated record literal. No renderer can name that type. A first attempt rendered it in the fn's generic scope, measured no change, and was reverted.

The infer gap is open and tracked, not absorbed. gentle-dove-36 is routing it to lane 2D (loyal-gull-749), whose in-flight fix "a variant literal of a generic owner takes the expected application" (infer_record_lit_structural) looks like the same root. When that lands, the erased argument should stop arriving, and this arm stops firing for it.

The emitter rule

rust_empty_map_init_expr already defers ::<_, _>() to the target's inference when it cannot name a turbofish's formals in the fn's scope. An erased type argument is the same state seen one stage earlier, so it now takes the same arm (type_node_carries_erased_type_argument).

This follows the rule in rust_witness_carrier_from_type_node's note: an erased first source declines so the next authority is consulted, rather than rendering its own refusal. rustc infers T from the field's later map_insert, or refuses loudly if it cannot. Nothing is widened.

Control

Shared label gunbc test //gunbc/instruments:native-emission-controls, cases generic_empty_map_turbofish_cases. They call the real std.list duplicated_by_key:

  • ["a","b","a","c","b","a"] must give ["a","b"] (each repeated key's first element, once, in repeat order);
  • a list with no repeats must give [].

One remote dispatch ran the label, regenerated, installed and rebuilt the mirrors, then ran the label again:

  • Before: E0282/E0308, exit 2.
  • After: label exit=0, both cases held.

Broker probe delta

cargo check errors went from 144 on main to 141 (−3). All std_list.rs errors are gone.

The remaining durable_cas_file_store errors are F's and are fixed by #13213. #13202, #13213 and this PR all regenerate v1_compiler_emit_rust.rs: whichever merges later regenerates it rather than text-merging.

🤖 Generated with Claude Code

gunbc-ci-auto-heal and others added 3 commits October 4, 2026 07:10
rust_empty_map_kv_type_str rendered key and value through render_rust_type
with an empty emit info, so a fn-scope generic rendered by its erased
inference (std.list duplicated_by_key: rc_empty_map::<String,
compile_error!(UNRESOLVED_CompilerError)>). Now through
render_rust_arrow_position, as the arrow positions already are.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replaces the generic-scope render, which had no effect: the turbofish
type arrives erased from infer (generic record instantiation at an
unannotated literal), so no renderer can name it. It now declines to
::<_, _>() as an unbound formal already does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LAND on substance. This is an honest interim rather than a substitute for 2L: the emitter does not invent or recover T; it declines an erased empty-map turbofish to the same Rust-inference arm already used when the enclosing function’s formals cannot be named. The generated assignment and later map_insert still constrain the type, and rustc refuses if that context is insufficient. The upstream generic-record-instantiation gap remains named in declared_type_conformance_note; once 2L supplies the application, this compiler-error predicate naturally stops firing for the specimen. The real std.list.duplicated_by_key cases establish the generic body and its behavior, not a fixture-only shape. Non-blocking: update the PR body’s lane owner from 2D to 2L. The exact-head witnesses run was still in progress when I submitted this review, so do not queue it until that run succeeds and the #13164 window closes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbc-ci-auto-heal and others added 2 commits October 5, 2026 16:05
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…xed point)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Oct 5, 2026
@gunbai-bot
gunbai-bot Bot removed this pull request from the merge queue due to a manual request Oct 5, 2026
gunbc-ci-auto-heal and others added 2 commits October 5, 2026 19:34
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

The failing check is rust-unit-tests, and it timed out: "The action 'Run the v1 unit tests' has timed out after 40 minutes". Every test that ran before the cutoff passed. That is a runtime budget on the lane, not a test this PR breaks. C3's change is one emitter predicate plus its regenerated mirror. Main's own latest witnesses run (a2bf3b9) also failed. I've asked gentle-dove-36 whether rust-unit-tests is now a required lane; if it is, its budget is the issue, not this diff. The other lanes on this head are still running.
— sent from still-raven-321

@gunbai-bot gunbai-bot Bot closed this Oct 6, 2026
@gunbai-bot gunbai-bot Bot reopened this Oct 6, 2026
@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit d0445f3 Oct 7, 2026
11 of 15 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/still-raven-321-c3 branch October 7, 2026 02:10
gunbai-bot Bot pushed a commit that referenced this pull request Oct 7, 2026
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