Repository navigation
std/extdeps: dissolve .length() nickname -> canonical .count() (seed closure) - #5395
Closed
gunbai-bot[bot] wants to merge 1 commit into
Closed
gunbai-bot[bot] wants to merge 1 commit into
gunbai-bot[bot] wants to merge 1 commit into
Conversation
`.length()` is a §3 nickname for the cardinality of a sequence; the canonical op is `count` (the only one in the compiler method table — 04_method.dag — and the only one that gets descent/termination inference via classify_size_expr). `.length()` falls through the compiler's unknown-method path and emits a call to a nonexistent `v1_rt::length`, which breaks the v1 seed (E0425). Dissolve it to `.count()`, which emits the valid host `.len() as i64` for List receivers. Scope: the two files in the v1 seed closure (the only seed .rs that emit v1_rt::length): extdeps/version/semver.dag (8) + std/realization_schedule.dag (13) = 21 sites, ALL List receivers (semantics-preserving count-nickname; no String receivers in scope). The remaining corpus .length() sites (pep440, yaml, cache_interface, compute_fabric, workflow_yaml) are outside the seed closure and land with the separate unknown-method fail-closed hardening work-item (which also needs the count-on-String host realization). Verified by execution (authoritative, not proxy — source change, count is an existing builtin so one regen takes effect): control vs treatment on the same main base — E0425 36 -> 17 (exactly -19, the v1_rt::length cluster), every other error class identical, zero regressions. v1_rt::length count in the seed: 0. emitter-completeness slice, NOT seed-green; seed-green lands in #5325. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Consolidated into #5413 (freeze consolidation of the durable gunbc lanes). Branch retained; reopen if the consolidation is unwound. |
briansrls
added a commit
that referenced
this pull request
Jun 20, 2026
…) (#5413) Consolidates the durable freeze lanes onto one branch (each constituent closed in favor of this): - #5402 dsl_compile_clean dual-root gate-widen (Strategy A keystone) - #5395 .length() -> .count() dissolution - #5407 anemia CONFIRM eval corpus (additive) - #5400 phantom type-tag derives - #5396 Measure-alias count peel (E0560) Plus a carried fix for a pre-existing main defect (from #5406): clippy::manual_is_multiple_of + fmt in v2_whole_tree_parse_scan.rs (main's rust_monolith gate is skipped on main pushes, so it went uncaught; this is the first post-#5406 PR to touch a .rs and run clippy against it). Local receipt: cargo fmt --all --check clean; cargo clippy --all-targets -- -D warnings exit 0; cargo test -p v1-compiler-tests interp_recorded_fixture/wet_hermetic/resolve_expr_types_retraversal = 28 passed, 0 failed. All other floor gates (dsl_compile_clean, source_root_ingest, emit_host, layering, 557-witness corpus) were green on the prior runs. Co-Authored-By: Claude Opus 4.8 (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.
What
Dissolves the
.length()→.count()§3 nickname in the 2 files in the v1 seed closure:dsl/extdeps/version/semver.dag(8 sites) +dsl/std/realization_schedule.dag(13 sites) = 21 sites, all List receivers.Why
.length()is a nickname for sequence cardinality. The canonical op iscount— the only one in the compiler method table (04_method.dag) and the only one that gets descent/termination inference (classify_size_exprin04_infer.dag)..length()falls through the compiler's unknown-method path and emits a call to a nonexistentv1_rt::length, breaking the v1 seed (E0425, ~19 sites)..count()emits the valid host.len() as i64for List receivers.Verification (authoritative, not proxy)
This is a source change and
countis an existing builtin, so one regen with main's bin takes effect (no two-stage bootstrap). Control vs treatment on the same main base:v1_rt::lengthcluster)v1_rt::lengthoccurrences in the regenerated seed: 0. Zero new error classes (E0433 = 6 in both — pre-existing on current main, not introduced).Scope / guardrail
Only the seed-closure files. The remaining corpus
.length()sites (pep440, yaml, cache_interface, compute_fabric, workflow_yaml) are outside the seed and land with the separate unknown-method fail-closed hardening work-item (which also needs the count-on-String host realization, since String =FreeMonoid<Char>). Every dissolved site was confirmed a pure List count-nickname (guardrail: any non-count-semantics site would have been escalated, none were)..dag-only — committed seed unchanged, main keeps building. emitter-completeness slice, NOT seed-green; seed-green lands in #5325.🤖 Generated with Claude Code