crates.sage_ir.checking.signature.narrow_detail

Interface detail is split at semantic reuse boundaries. Fields and associated-item enumeration remain independently keyed from the owner signature, and selecting one associated item reads only that item’s signature. Enumeration never checks sibling signatures or bodies eagerly.

Read in specification context · design/crates/sage_ir/checking.sage

Implementation

Implemented crates/sage-ir/src/local_syms/associated.rs:32–37

sage_ir::local_syms::associated · lib:sage_ir

#![allow(unused)]
fn main() {
// {anchor}`crates.sage_ir.checking.signature.narrow_detail`
// {anchor}`crates.sage_ir.checking.symbol_keyed_interfaces`
pub(crate) fn lower_items<'db>(
    db: &'db dyn crate::Db,
    owner: LocalAssociatedOwner<'db>,
    source: &Stash,

}

See more source ↗

Implemented crates/sage-ir/src/local_syms/associated.rs:77–82

sage_ir::local_syms::associated · lib:sage_ir

#![allow(unused)]
fn main() {
// {anchor}`crates.sage_ir.checking.signature.narrow_detail`
pub fn local_associated_items<'db>(
    db: &'db dyn crate::Db,
    owner: LocalAssociatedOwner<'db>,
) -> &'db [LocalModItemSym<'db>] {
    match owner {

}

See more source ↗

Implemented crates/sage-ir/src/local_syms/fns.rs:130–135

sage_ir::local_syms::fns · lib:sage_ir

#![allow(unused)]
fn main() {
    // {anchor}`crates.sage_ir.checking.signature.narrow_detail`
    pub fn sig(self, db: &'db dyn crate::Db) -> Stashed<Binder<'db, FnSig<'db>>> {
        use crate::check::Check;
        use crate::cst::fns::ReceiverCst;
        use crate::cst::generics::CheckGenerics;
        use crate::resolve::{Namespace, Resolution, Resolver};

}

See more source ↗

Implemented crates/sage-ir/src/local_syms/impls.rs:182–187

sage_ir::local_syms::impls · lib:sage_ir

#![allow(unused)]
fn main() {
    // {anchor}`crates.sage_ir.checking.signature.narrow_detail`
    pub fn items(self, db: &'db dyn crate::Db) -> sage_stash::Stashed<crate::ty::ImplItems<'db>> {
        use crate::ty::BinderExt;

        let (source, cst) = self.cst(db).open_deref();
        crate::local_syms::associated::lower_items(

}

See more source ↗

Implemented crates/sage-ir/src/local_syms/structs.rs:85–90

sage_ir::local_syms::structs · lib:sage_ir

#![allow(unused)]
fn main() {
    // {anchor}`crates.sage_ir.checking.signature.narrow_detail`
    // {anchor}`crates.sage_ir.checking.symbol_keyed_interfaces`
    pub fn fields(self, db: &'db dyn crate::Db) -> Stashed<StructFields<'db>> {
        use crate::check::Check;
        use crate::resolve::Resolver;
        use crate::ty::FieldSig;

}

See more source ↗

Implemented crates/sage-ir/src/local_syms/traits.rs:104–109

sage_ir::local_syms::traits · lib:sage_ir

#![allow(unused)]
fn main() {
    // {anchor}`crates.sage_ir.checking.signature.narrow_detail`
    pub fn items(self, db: &'db dyn crate::Db) -> sage_stash::Stashed<crate::ty::TraitItems<'db>> {
        use crate::ty::BinderExt;

        let (source, cst) = self.cst(db).open_deref();
        crate::local_syms::associated::lower_items(

}

See more source ↗

TODO crates/sage-ir/src/ty.rs:387–393

sage_ir::ty::todo · lib:sage_ir

TODO: Associated type aliases and constants have no checked signature queries yet. Implement item-keyed queries that reuse the owner binder without eagerly checking sibling signatures or bodies; enumeration and function signatures already have separate query boundaries. Verification for these missing item kinds depends on introducing their signature APIs.

#![allow(unused)]
fn main() {
    // {anchor}`crates.sage_ir.checking.signature.narrow_detail`<<
    // TODO: Associated type aliases and constants have no checked signature queries
    // yet. Implement item-keyed queries that reuse the owner binder without eagerly
    // checking sibling signatures or bodies; enumeration and function signatures
    // already have separate query boundaries. Verification for these missing item
    // kinds depends on introducing their signature APIs.
    // >>

}

See more source ↗

Tests and review

Indexed tests and the implementation-completeness and test-adequacy review; no test run is implied.

TODO sage_meta::todo::checking_signature_narrow_detail

crates/sage-meta/tests/semantic_spec.rs · test:semantic_spec

#![allow(unused)]
fn main() {
#[test]
    #[sage::test(crates.sage_ir.checking.signature.narrow_detail)]
    fn checking_signature_narrow_detail() {
        // TODO: Complete the claim-specific verification matrix:
        // Query traces select one field or associated item and reject reads of unselected sibling
        // signatures and all bodies; edit tests show that a detail-only change does not remint the owner
        // binder or invalidate unrelated detail queries.
    }
}

See more source ↗

Review: Accepted · Codex /root/final_quality.

Reviewed the complete narrow_detail claim, six ordinary implementation entries, the implementation TODO in ty.rs, and the sole TODO test. Requirements: field details and associated-item enumeration are separately keyed from the owner signature; selecting an associated item obtains that item's signature without eagerly checking siblings; enumeration does not check sibling signatures or bodies.

Ordinary implementation: LocalStructSym::fields is a distinct tracked query from sig. sig computes the generic binder and declared parameter environment without lowering fields. fields reopens the signature's parameters and lowers field types in its own output stash. The present field detail product groups the owner's fields; the claim requires separation from the owner signature and does not promise a separate query for every individual field. LocalTraitSym::items and LocalImplSym::items are separate tracked queries from their sig methods, passing existing owner parameters to associated::lower_items. lower_items walks member kind/name/occurrence keys, obtains symbols through keyed trait/impl associated-item queries and returns TraitItemDef handles in a binder. It does not call member signature or body queries. local_associated_items supplies an additional identity-only membership boundary through tracked trait/impl enumeration helpers, without even requiring the owner signature. Keyed member lowering copies selected CST and creates the corresponding function/type/constant symbol; copying syntax is not checking its body or signature.

LocalFnSym::sig is keyed by the selected function symbol. It opens its owner's signature for generics/Self/predicates, then checks the selected function's own declaration. Owner signatures do not enumerate or check sibling methods. This does not prohibit the owner's binder or legitimate type/trait interfaces required by the selected declaration. The captured generic checker, type syntax checker, predicate lowering and Check completion helpers support that path without adding eager sibling function signature/body queries. BinderExt in the initial ty.rs implementation file iterates existing parameters, so enumeration and details reuse the owner binder instead of rebuilding parameters. Whole associated.rs also shows the shared key-based lowering boundary, including functions, types and constants.

Implementation deferral is material: the ty.rs TODO explicitly says associated type aliases and constants lack checked signature queries and requires item-keyed APIs that reuse the owner binder without eager sibling checking. Captured type_aliases.rs and consts.rs confirm these types currently supply symbols/CST/attributes rather than such checked signature operations. Their selection/signature portion is therefore not claimed implemented. The existing narrow associated-type-value normalization helper in impls.rs is not treated as a replacement for a complete associated type signature API.

Test evidence remains deferred. todo::checking_signature_narrow_detail contains only the explicit verification matrix comment, not behavioral assertions. It calls for query traces selecting a field or associated item, rejecting unselected sibling signatures and all bodies, and persistent edits that preserve owner binder identity and unrelated detail queries. The prerequisite for missing item kinds is the signature APIs identified in the implementation TODO. For existing field/function/enumeration paths, completing the matrix requires source-backed query observation and persistent database edits with meaningful identity and execution comparisons. This TODO honestly retains the full verification gap; passing the placeholder would not establish any of those behaviors. No N/A evidence applies and no new suspected defect was identified requiring a reproduction.

Executed a fresh cargo meta review start with coordinator instructions and review read captures for checking design, signature/type/generic/predicate helpers, and the currently limited type-alias/constant symbol APIs. Assessed current source and the complete associated test. No test commands or build were run by this reviewer; central suite results are separate. No source edits. Recorded assessment retains both existing implementation and test TODOs rather than claiming full implementation or verification.

Browse crates anchors

139 anchors

Specification anchors and declared coverage
AnchorImplementationTests
crates (139)114 Implemented37 TODO2 N/A74 Implemented107 TODO
crates.sage_inspector (15)13 Implemented1 TODO2 N/A3 Implemented15 TODO
crates.sage_inspector.inspection (15)13 Implemented1 TODO2 N/A3 Implemented15 TODO
balanced_tracesImplementedTODO
canonical_ownershipImplementedImplementedTODO
derive_reflectionImplementedImplementedTODO
detail_free_indexImplementedTODO
deterministic_traceImplementedTODO
durable_navigationN/ATODO
generic_browserN/ATODO
owned_reflectionImplementedImplementedTODO
product_availabilityImplementedTODO
revision_and_demandImplementedTODO
semantic_phase_boundaryImplementedTODO
source_evidenceImplementedTODO
typed_serviceImplementedTODO
unknown_workImplementedTODOTODO
workspace_actorImplementedTODO
crates.sage_ir (90)67 Implemented34 TODO40 Implemented88 TODO
crates.sage_ir.checking (12)12 Implemented3 TODO5 Implemented12 TODO
crates.sage_ir.checking.body (5)5 Implemented2 TODO3 Implemented5 TODO
elaborationImplementedImplementedTODO
expected_typesImplementedTODOTODO
interface_dependenciesImplementedImplementedTODO
isolated_completionImplementedImplementedTODO
operator_callsImplementedTODOTODO
identity_mintingImplementedTODO
owned_productsImplementedImplementedTODO
crates.sage_ir.checking.signature (4)4 Implemented1 TODO1 Implemented4 TODO
body_independenceImplementedTODO
narrow_detailImplementedTODOTODO
owner_binderImplementedImplementedTODO
storageImplementedTODO
symbol_keyed_interfacesImplementedTODO
crates.sage_ir.crate (9)9 TODO9 TODO
explicit_restrictionsTODOTODO
identity_before_detailTODOTODO
incremental_evidenceTODOTODO
narrow_demandsTODOTODO
reexecution_and_invalidationTODOTODO
represented_completenessTODOTODO
restrictions_and_gapsTODOTODO
semantic_query_boundariesTODOTODO
terminal_incompletenessTODOTODO
crates.sage_ir.inference (8)8 Implemented6 Implemented8 TODO
atomic_checkingImplementedImplementedTODO
body_local_quiescenceImplementedImplementedTODO
canonical_boundaryImplementedImplementedTODO
completed_body_boundaryImplementedTODO
numeric_domainsImplementedImplementedTODO
subtyping_and_coercionImplementedImplementedTODO
terminal_obligationsImplementedTODO
transaction_isolationImplementedImplementedTODO
crates.sage_ir.metadata (4)4 Implemented1 TODO4 TODO
explicit_incompletenessImplementedTODO
keyed_reuseImplementedTODOTODO
product_boundariesImplementedTODO
provider_authorityImplementedTODO
crates.sage_ir.modules (8)7 Implemented1 TODO4 Implemented8 TODO
crates.sage_ir.modules.expand (4)4 Implemented2 Implemented4 TODO
completenessImplementedImplementedTODO
dependenciesImplementedTODO
direct_membersImplementedTODO
recursion_and_fixpointImplementedImplementedTODO
crates.sage_ir.modules.parse (4)3 Implemented1 TODO2 Implemented4 TODO
dependenciesImplementedTODO
detail_firewallImplementedImplementedTODO
recovery_completenessTODOTODO
syntax_identitiesImplementedImplementedTODO
crates.sage_ir.resolution (5)5 Implemented1 TODO3 Implemented4 TODO
crates.sage_ir.resolution.lookup (5)5 Implemented1 TODO3 Implemented4 TODO
completenessImplementedTODOImplementedTODO
dependenciesImplementedTODO
expansion_import_ambiguityImplementedImplemented
identity_onlyImplementedTODO
precedenceImplementedImplementedTODO
crates.sage_ir.solver (9)7 Implemented7 TODO5 Implemented9 TODO
alternative_isolationImplementedTODOImplementedTODO
bounded_completenessImplementedTODOTODO
candidate_completenessImplementedTODO
canonical_cyclesTODOTODO
canonical_outputsImplementedImplementedTODO
local_index_firewallTODOTODO
normalization_demandImplementedTODOImplementedTODO
schedule_independenceImplementedTODOImplementedTODO
shared_final_resultImplementedTODOImplementedTODO
crates.sage_ir.symbols (8)8 Implemented4 Implemented7 TODO
associated_identityImplementedImplemented
associated_interfacesImplementedTODO
body_interfacesImplementedImplementedTODO
definition_identityImplementedTODO
external_fact_queriesImplementedTODO
external_identityImplementedTODO
kind_wrappersImplementedImplementedTODO
local_identityImplementedImplementedTODO
crates.sage_ir.types (27)16 Implemented12 TODO13 Implemented27 TODO
crates.sage_ir.types.aliases (2)1 Implemented1 TODO1 Implemented2 TODO
identityImplementedImplementedTODO
revelationTODOTODO
crates.sage_ir.types.binder (1)1 Implemented1 TODO1 Implemented1 TODO
owner_parametersImplementedTODOImplementedTODO
crates.sage_ir.types.body (13)4 Implemented9 TODO3 Implemented13 TODO
awaitTODOTODO
closuresTODOTODO
conditional_patternsTODOTODO
coroutinesTODOTODO
diagnosed_recoveryImplementedImplementedTODO
elaboratedTODOImplementedTODO
for_iterationTODOTODO
indexingTODOTODO
macro_expansionTODOTODO
no_inferenceImplementedImplementedTODO
resolved_referencesImplementedTODO
try_residualTODOTODO
typed_provenanceImplementedTODO
crates.sage_ir.types.calls (2)1 Implemented1 TODO1 Implemented2 TODO
dispatch_familiesTODOTODO
selected_semanticsImplementedImplementedTODO
crates.sage_ir.types.lifetimes (2)2 Implemented2 Implemented2 TODO
dummyImplementedImplementedTODO
unchecked_borrowsImplementedImplementedTODO
crates.sage_ir.types.operators (2)2 Implemented1 Implemented2 TODO
lazy_control_flowImplementedTODO
trait_callsImplementedImplementedTODO
scoped_identitiesImplementedTODO
crates.sage_ir.types.spans (4)4 Implemented4 Implemented4 TODO
generated_identityImplementedImplementedTODO
item_originImplementedImplementedTODO
offset_reuseImplementedImplementedTODO
relative_compositionImplementedImplementedTODO
crates.sage_oracle_harness (4)4 Implemented2 TODO1 Implemented4 TODO
crates.sage_oracle_harness.crate (4)4 Implemented2 TODO1 Implemented4 TODO
deterministic_emissionImplementedTODO
exact_comparisonImplementedTODOImplementedTODO
fixed_projectionImplementedTODO
independent_coverageImplementedTODOTODO
crates.sage_stash (5)5 Implemented5 Implemented
crates.sage_stash.storage (5)5 Implemented5 Implemented
handle_ownershipImplementedImplemented
immutable_entriesImplementedImplemented
query_valueImplementedImplemented
rooted_equalityImplementedImplemented
typed_interningImplementedImplemented
crates.sage_test_harness (25)25 Implemented25 Implemented
crates.sage_test_harness.compile_tests (25)25 Implemented25 Implemented
annotation_validationImplementedImplemented
blessing_gateImplementedImplemented
callsite_updatesImplementedImplemented
checking_scopeImplementedImplemented
compiler_conditionsImplementedImplemented
completed_typesImplementedImplemented
coordinatesImplementedImplemented
dependenciesImplementedImplemented
diagnostic_countsImplementedImplemented
diagnostic_locationsImplementedImplemented
editionImplementedImplemented
fixturesImplementedImplemented
grouped_observationsImplementedImplemented
invocationImplementedImplemented
production_executionImplementedImplemented
project_isolationImplementedImplemented
query_captureImplementedImplemented
query_projectionImplementedImplemented
renderingImplementedImplemented
resolved_symbolsImplementedImplemented
review_visibilityImplementedImplemented
rustc_executionImplementedImplemented
rustc_lintsImplementedImplemented
starting_expressionsImplementedImplemented
target_lineImplementedImplemented