Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
492 changes: 492 additions & 0 deletions dag/gunbc/capability_origin.dag

Large diffs are not rendered by default.

1,004 changes: 1,004 additions & 0 deletions dag/gunbc/rust_item_host_observation.dag

Large diffs are not rendered by default.

26 changes: 23 additions & 3 deletions dag/gunbc/rust_item_identity.dag
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,20 @@ type RustItemKind
| RustImplMethod
| RustTestFunction

// enclosing_module CARRIES THE INLINE-MODULE PATH BECAUSE THE CITATION VOCABULARY ALREADY DOES.
// gunbc.declaration_index_seed_growth cites seven declarations under
// v1_compiler.cli_run.bare_reference_scanner_tests -- an inline `mod` inside cli_run.rs whose
// members are cited individually -- so a repo_path plus a bare name cannot address them: two
// same-named items in two inline modules of one file would collide onto one key, and the join
// would silently treat an addition as already justified. It is "" for a file-level item, which is
// the ordinary case rather than an absence: a file-level item is not enclosed by anything, and
// there is no third state for the field to conflate.
type RustItemIdentity {
repo_path: FilePath
kind: RustItemKind
name: NonEmptyStr
impl_subject: String
enclosing_module: String
start_line: Int
loc: Int
}
Expand All @@ -41,11 +50,22 @@ type RustItemDeclarationRef {
field: RustItemDeclField
}

fn rust_item_identity_qualified_name(item: RustItemIdentity) -> String {
if item.enclosing_module == "" {
item.name as String
} else {
concat(item.enclosing_module, concat(".", item.name as String))
}
}

fn rust_item_identity_key(item: RustItemIdentity) -> String {
if item.impl_subject == "" {
concat(
concat(item.repo_path as String, "::"),
concat(rust_item_kind_label(kind: item.kind), concat("::", item.name as String))
concat(
rust_item_kind_label(kind: item.kind),
concat("::", rust_item_identity_qualified_name(item: item))
)
)
} else {
concat(
Expand All @@ -54,7 +74,7 @@ fn rust_item_identity_key(item: RustItemIdentity) -> String {
rust_item_kind_label(kind: item.kind),
concat(
"::",
concat(item.impl_subject, concat("::", item.name as String))
concat(item.impl_subject, concat("::", rust_item_identity_qualified_name(item: item)))
)
)
)
Expand Down Expand Up @@ -95,6 +115,6 @@ fn rust_item_declaration_ref_key(ref: RustItemDeclarationRef) -> String {
}
}

data rust_item_host_observation_scaffold_note: String = "MODELED G0 PRODUCER (not yet implemented). Replaces scripts/rust_item_census.py: merge-base and HEAD populations of RustItemIdentity rows parsed through dag/extdeps/languages/rust grammar authority (or an enrolled witness realization), not regex beside the grammar. Dissolve-on: producer lands and enrolls; Python script deleted; gunbc.seed_growth_admission seed_growth_g0_census_host_scaffold retires."
data rust_item_host_observation_producer_note: String = "THE PRODUCER LANDED, AND THIS ROW REPLACES THE SCAFFOLD NOTE THAT STOOD HERE. What was here declared a MODELED G0 PRODUCER that did not exist, with a dissolution reading \"producer lands and enrolls; Python script deleted\". That is a CONJUNCTION, and its second half fired on 2026-08-24 for an unrelated reason -- gunbc#9132 bankrupted the measurement corpus and took scripts/rust_item_census.py with it -- while the producer never landed. So the trigger was half-satisfied by a cut that restored nothing, which is exactly the failure DESIGN section 4b(3) names when it requires a restoration trigger to state the CAPABILITY rather than an artifact that would contribute to one. The capability itself went to zero and nobody declared the drop, because the census's consumers were lanes rather than modules and no dependent could refuse. THE PRODUCER IS NOW gunbc.rust_item_scan scan_rust_source, reading item identities from rustfmt-normalized Rust source with its item-keyword population taken from extdeps.languages.rust.syntax rust_item_forms rather than from a second roster, and gunbc.rust_item_host_observation, which supplies the two populations the admission join consumes -- the merge-base-to-HEAD change and the live hand-Rust surface. WHAT IS STILL OPEN: no modeled Rust INGEST grammar exists, so the reader recognizes item headers and extents rather than parsing, and refuses on any structural line it cannot classify. That refusal is the wall, not a gap; the next rung is a Rust ingest grammar publishing real item identities, at which point gunbc.rust_item_scan deletes in favour of it."

data rust_item_identity_extension_proposal_note: String = "PROPOSED std.decl_ref EXTENSION (report before G1 lands). Add ImplMethod { impl_subject: NonEmptyStr, method_name: NonEmptyStr } to DeclField. Rationale: the seventh Cargo-manifest item is impl std::fmt::Display for Stage0CargoBinManifestParseRefusal — an impl-block method, not a field of the enum. MIGRATION: existing DeclarationRef rows remain valid (WholeDeclaration / NamedField unchanged). New seed-growth justifications cite impl methods via ImplMethod. Dissolve-on: when std.decl_ref adopts ImplMethod, rust_item_identity.RustItemDeclField deletes in favor of the std type."
Loading
Loading