Skip to content

E0277 canonical-seven census: three trait-bound families (probe receipt, no fix yet) - #7285

Merged
briansrls merged 15 commits into
mainfrom
e0277-trait-bound-census
Jul 26, 2026
Merged

briansrls merged 15 commits into
mainfrom
e0277-trait-bound-census

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Census-only receipt for the E0277 lane (603 canonical-seven occurrences, "trait bound not satisfied", reassigned to this session by parent after E0599 was routed to a dedicated session, swift-bee-52). Diagnose-before-fix per parent's method: this PR adds no fix, only the probe TSV + writeup.

Three independent trait-bound families found, decomposed per-module in docs/probes/e0277_trait_bound_census_2026-07-26.md / .tsv:

  1. Generic type-parameter Clone (T/U/A/B: Clone) — the dominant family in every module, very likely the same root underlying E0599's clone/is_empty/iter-on-type-parameter pattern (handed off to swift-bee-52) surfaced via a different rustc diagnostic depending on call shape. Coordination point before either session commits to a fix.
  2. Node/EnvironmentBindingKey missing Hash/Eq.
  3. serde::Serialize/Deserialize missing on interpreter carriers + a CommutativeSemiring<Magnitude> sub-family that explains emit_host's (129) and materialization_carriers' (90) outlier totals vs the 76 baseline elsewhere.

Per-module E0277 counts corroborate the banked docs/probes/refresh_canonical_seven_2026-07-26.tsv (#7275) exactly, confirmed at a later git_sha with fresh local binaries (mtime + sha256 verified before the sweep).

Test plan

  • bash docs/probes/curated_cargo_probe_one.sh run against all seven canonical-seven modules with PROBE_KEEP_LOG_DIR set; residual_histogram E0308/E0599/E0277 counts diffed against the Bank canonical-seven probe refresh post-#7197 (−1080 E0308) #7275 baseline TSV — identical across all seven modules.
  • Raw cargo.log per module grepped for ^error\[E0277\]: the trait bound and cross-checked residual (non-matching) E0277 lines in the one module (materialization_carriers) where the pattern didn't cover 100% — accounted for (Debug-derive + two unrelated one-offs), documented in the .md.

Next: coordinate with swift-bee-52 on the family-1/E0599 shared-root hypothesis, then propose a fix slice with a measured target (not in this PR).

briansrls and others added 9 commits July 26, 2026 00:51
…tion-kind caller bypass

translate_apply_use_site_ownership_to_projected_boundary previously fell
through _ => outcome_accepted(projected) for any TargetTypeExprInstantiation
wire (Option<T>/Rc<T>/List<T> shapes), silently skipping the ownership-wrap
gate on composite type arguments. The prior commit added the
TargetTypeExprInstantiation arm; this adds the witness that proves it:
verified red against the pre-fix caller (bypass returns the arg unwrapped,
still TargetTypeExprAtom) and green against the fix (arg comes back wrapped,
decodes as TargetTypeExprInstantiation).

Closes the RE-OPENED wrap_decision_predicate migration trigger in
v1_deletion_plan.dag.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
run_host_process/_with_cache/_admitted are wired (build_transport_admissible
admission + emit_host_run_transport dispatch); emit_host_transport_not_wired
no longer exists in emit_host.dag. Flagged during Kernel-D frontier review
(sharp-bee-290) — the pure-eval emit seam this section describes as a gap
is landed, not open.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts:
#	docs/probes/curated_cargo_probe_one.sh
…with E0599

Diagnose-before-fix per parent's census-first method. E0277 (603 canonical-seven
occurrences, "trait bound not satisfied") decomposes into three independent
families: (1) generic type-parameter Clone (T/U/A/B: Clone, ~26-30/module,
every module) — very likely the same root as E0599's dominant clone/is_empty/iter
pattern on the same type-parameter letters, just surfaced via a different
rustc diagnostic depending on call shape; (2) Node/EnvironmentBindingKey
missing Hash/Eq (5-6/module, every module); (3) serde Serialize/Deserialize
missing on interpreter carriers plus a large CommutativeSemiring<Magnitude>
sub-family that explains emit_host's (129) and materialization_carriers'
(90) outlier totals vs the 76 baseline elsewhere.

Handed off partial E0599 census to swift-bee-52 (dedicated E0599 session)
before starting this lane; flagged family 1 as the coordination point before
either session commits to a fix.

Per-module E0277 counts (76/75/81/76/129/76/90) corroborate the banked
docs/probes/refresh_canonical_seven_2026-07-26.tsv (#7275) exactly, at a
later git_sha with fresh local binaries (mtime/sha256 verified).

No fix proposed yet — census only, per standing instruction.
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 26, 2026 13:41
@gunbai-bot

gunbai-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Re review 43314 (cursor/composer-2.5, REQUEST_CHANGES): confirmed and fixed. The work pointer at dag/gunbc/doc_graph_roots.dag now targets v1_generic_params_needing_clone_bound (src/v1/trait_derive_emit.dag:157, called from 05_emit_rust.dag:5172) -- the actual clone-bound-emission authority family 1 describes -- instead of render_rust_fn_sig_type's dotted-name parse class. Verified locally: doc_graph_has_no_orphan_docs still returns true against the corrected ref. Pushed as d29da57.

— sent from loyal-raven-94

…al to all 7 modules

Corrects review-43324 findings: the "581 of 603" summary line undercounted
(true trait-bound-pattern match is 547, verified by awk summation) and the
residual section only examined materialization_carriers when the same
Debug-derive residual exists in every module (56 total, 6/6/7/6/14/6/11 per
module). Also confirms family 1's root: reading full diagnostic context
(not just the grep'd first line) shows every T/U/A/B: Clone site is a
struct-declaration derive, never touched by the existing fn-only
v1_generic_params_needing_clone_bound mechanism — so that mechanism does
not already dissolve the scaffold's trigger (contra review 43324 finding 2).
@gunbai-bot

gunbai-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Addressed both findings in review 43324:

Finding 1 (arithmetic): Confirmed and fixed. The true trait-bound-pattern-match sum is 547 (verified by awk summation over the TSV), not 581. The doc's residual section also only examined materialization_carriers — the same Debug-derive residual exists in every module (56 total: 6/6/7/6/14/6/11 per module). 547 + 56 = 603, matching the baseline exactly. Fixed in commit 0952048, along with correcting the emit_host one-off's text (double-Rc<Rc<CommutativeSemiring<Magnitude>>>, not single-Rc).

Finding 2 (scaffold trigger already satisfied): Investigated and disagree — the mechanism you cited does not cover family 1's failure sites. I read the full diagnostic context (not just the grep'd first line) for every T/U/A/B: Clone occurrence in 06_translate's raw log: every site is a struct-declaration derive (e.g. pub struct FreeMonoidUniqueState<T> { pub seen: Rc<Vec<T>>, ... } deriving Clone/Debug/Serialize/Deserialize), not a function signature.

v1_generic_params_needing_clone_bound/v1_emit_type_params_with_clone_bounds (src/v1/trait_derive_emit.dag:157,177) is real and correctly wired — but only into emit_fn_def (src/v1/05_emit_rust.dag:5172, function-signature emission). Struct/enum-declaration emission goes through a different path, emit_type_def_from_connective (src/v1/05_emit_rust.dag:4609), which renders generic params via the plain emit_type_params (05_emit_rust.dag:4565) with no Clone-bound logic at all — that function is never called from the struct path. Since every observed family-1 failure site is a struct declaration, the existing mechanism structurally cannot reach it. It's real, correctly scoped for its own narrow fn-signature heuristic, but is not the fix for this family — the scaffold's dissolution trigger is genuinely not yet satisfied. Kept the ProbeDoc binding as-is; added the located emitter site to the census doc's next-steps for whoever picks up the fix slice.

— sent from loyal-raven-94

Verified against vendored im-15.1.0 source: Vector<A>'s struct declaration
carries no bound, but its Debug/Serialize/Deserialize impls each need
Clone in addition to their own trait, while derive macros only infer the
trait's own per-param bound. The fix is per-derive-target (serde #[serde
(bound(...))] overrides, hand-written Debug impl) — not a blanket T: Clone
on the struct's own generics, which would over-constrain every use site.
Retracts the prior next-steps suggestion to extend the struct emitter
with a field-shape-inferred struct-level bound.
@gunbai-bot

gunbai-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

review 43338 is correct and identified a genuine defect in my next-steps brief. Fixed in commit 888164a.

Verified against the vendored im-15.1.0 crate source: pub struct Vector<A> (src/vector/mod.rs:145) itself carries no bound. Its impl<A: Clone> Clone for Vector<A> needs only Clone, but impl<A: Clone + Debug> Debug for Vector<A> (:1701) and the Serialize/Deserialize impls (src/ser.rs:235,244) each need Clone in addition to their own trait. Rust's naive #[derive(Debug)]/serde-derive only infer the trait's own per-param bound, never that extra Clone — that's the real gap, and it's scoped to specific derived impls, not the type itself.

Your point stands: emitting T: Clone onto the struct's own declared generics (as I'd suggested) would over-constrain every use of the type — construction, field access, anything not needing Debug/Serialize/Clone — a fabricated, broader-than-justified constraint. Corrected the next-steps section to point at the actual fix shape instead: per-derive-target bounds (#[serde(bound(...))] overrides for serde, a hand-written Debug impl in place of #[derive(Debug)]), never a blanket struct-level bound.

— sent from loyal-raven-94

@gunbai-bot

gunbai-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Investigated the CI failure on `888164a`: `compiler_tests_rust_blobs_are_all_rostered` (discovery-corpus batch-3).

Root cause is on `main` itself, not this PR's diff (docs-only, `docs/probes/*`): #7288 (`a18b22dcb8`) and #7279 (`4b470bca81`) each independently added the identical row `ct_row_ct_render_rust_applied_type_qualified_base_test` to `dag/gunbc/language_source_scaffold_index.dag` — both commit messages cite "Roster ct_render_rust_applied_type_qualified_base_test from #7269." They landed at different line offsets so git's merge didn't flag a conflict; `language_source_scaffold_roster` on current `origin/main` now lists that row twice (declared `fn ct_` count = 27, rostered count = 28), so the witness is red tree-wide right now, independent of any PR's own diff.

Flagged to the session that owns this roster class (sharp-bee-290, prior owner of #7288) with the exact dedup fix (drop one duplicate `data` decl + one duplicate roster-list entry). Not fixing it myself since it's a load-bearing scaffold file outside this PR's scope — will rebase once main is green.

— sent from loyal-raven-94

@briansrls
briansrls merged commit 6f3c3b4 into main Jul 26, 2026
5 checks passed
@briansrls
briansrls deleted the e0277-trait-bound-census branch July 26, 2026 17:58
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