Repository navigation
Re-home LayerPrefix classification onto v2.std.layer - #13530
Conversation
…ution. The prefix walk answers a browsing-home question that LayerPrefix already owns; parking it in resolution made every resolution dependent a layer dependent once #13526 counts import-bearing qualified refs. Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
left a comment
There was a problem hiding this comment.
APPROVE at exact head fa159d0ea97748b468be2cd3b9438e1499b81af7, against the head's DESIGN §3. No blocking findings.
The ownership repair is substantive rather than an edge-count workaround. Both classifiers now live beside the LayerPrefix coproduct they produce. Their definitions are removed from v2.std.cross_tree.resolution, with no forwarding alias or second .dag classifier retained there. The inspected resolution module's source-root and cross-tree admission logic does not need LayerPrefix; its layer coupling was confined to the moved classification functions. The new home depends on the existing qualified-name/algebra utilities rather than importing the old resolver to do the work.
The moved decision bodies are unchanged apart from qualifying LayerPrefix at its own home. Empty input, the lone-v2 case, each named prefix and both unknown-prefix fallbacks retain the previous result. The dotted entry still calls qualified_name_from_dotted_string before the same qualified-name classifier. There is no narrowing of the classifier domain or deletion of a decision to manufacture a smaller dependency closure.
The six-file diff is consistent with that scope. gunbc.doc_graph_roots repoints its DeclarationRef to the new owner; the plan and layer_import_scan/Rust scaffold citations follow the symbol. The pre-existing layer_prefix_from_dotted_module Rust mirror is NOT removed or changed semantically, and its explicit scaffold/dissolution obligation remains. Thus this is one .dag authority with the existing declared host mirror, not a claim of having eliminated that mirror.
Caller precision: from_dotted_string_test.dag is not edited by this PR. Its existing calls are bare names, as is the inspected grounding use; the unique .dag definitions retain those names at the new owner. The reported targeted compilation of layer, the dotted-name witness and doc_graph_roots corroborates their new binding, but remains author-run evidence rather than a compiler run I performed. The doc-graph change is an owner-qualified DeclarationRef repoint, not a new wrapper or import-based duplicate.
The essential artifact -> refinement relationship is left intact. The inspected artifact source actually consumes the refinement types/operations; this PR does not delete or relabel that dependency to improve the measurement.
Evidence boundary: the 1334 -> 16 reverse-dependents reduction is the author's paired measurement using #13526's producer at e78c3b8349, roots dag + src/v2, no exclusions and seed excluded. The reported refinement population remains 1834 on both sides. I have not independently rerun that producer, the reverse traversal or the targeted compiles; I do not treat these figures as a measurement on an independently executed build of this head, or as an approval of #13526 itself. GitHub code search was used for discovery, with relevant files read at this SHA, not as an exact-head whole-tree absence certificate.
CI independently confirmed: workflow 37572035985 names this exact SHA and completed successfully. Its five jobs—emit-build, floor, generated, rust-unit-tests and witnesses—succeeded, including the generated lane's all-target lint step. I am not promoting the green aggregate into separate verified per-claim execution/timing receipts. No new Rust libtest or unit-budget exception is introduced by this move.
No further code, test-lane or receipt change requested. This approval does not override the PR body's do-not-merge instruction; I have not merged it or performed any hardware action.
…semver-precedence Conflict: main's #13398 added semver_core_of_dotted / semver_dotted_part / semver_minimum_of_constraint building SemVerVersion with NonNegativeInt fields, against this branch's retype of the fields to confined SemVerNumericField records. The port keeps main's semantics and tightens them where the confined constructor is the authority: parts are admitted through semver_numeric_field (an empty patch is the single digit 0), so a fourth part, a non-digit, a leading zero, or a negative is absent, never coerced. curl.dag and the r2 probe consume the Optional/label surfaces only, so they are type-transparent. Parse-check 0 blocking on curl, the r2 entry, and the semver witness entry.
Summary
GeneratedArtifactis aRefined<Artifact>produced byrefine/Validation. That is inhabitance ofv2.std.refinement, not a helper parked in the wrong module. No model break.v2.std.layer.*uses werelayer_prefix_from_qualified_name/layer_prefix_from_dotted_qualified_name. Resolution's actual job (source-root index,cross_tree_edge_decision) never readsLayerPrefix. The walk belongs withLayerPrefixinv2.std.layer(DESIGN §3). Moved there; citations (doc graph, host scaffold, plan) follow the symbol.Dependents closures (one instrument)
Producer:
cli_run::dependency_resolution_factsat #13526 heade78c3b8349, pool/importer rootsdag+src/v2, no excludes. Reverse BFS overimport_moduleedges keyed bymodule_declaration_factspaths; seed excluded.The earlier 2476 on refinement was a different walk (import-line strip, not this producer). Same producer, both trees:
v2.std.layerresolution_depends_on_layer=true, layer_direct=9)resolution_depends_on_layer=false, layer_direct=8)v2.std.refinementartifact_depends_on_refinement=true)Facts: 55063 before / 55064 after.
Checks
cargo clippy --all-targets -- -D warnings: clean (remote).layer_prefix_from_dotted_module_scaffold_marker_is_declaredpassed;cli_run.rscompiles under clippy.gunbc compile --output-dir … --source-root dag --source-root src/v2ofsrc/v2/std/layer.dag,from_dotted_string_test.dag, anddag/gunbc/doc_graph_roots.dag: exit 0 (DeclarationRef now namesv2.std.layer/layer_prefix_from_dotted_qualified_name).Do not merge.