meta.anchors.implementation_coverage

Every specification anchor has at least one explicitly declared Rust implementation entry. An anchor without one is an error. A test annotation or #[sage::item(...)] correspondence alone does not supply this entry. A placeholder implementation counts as an entry with its explicit status.

Read in specification context · design/meta/anchors.md

Implementation

Implemented crates/sage-meta/src/spec.rs:123–128

sage_meta::spec · lib:sage_meta

#![allow(unused)]
fn main() {
    // {anchor}`meta.anchors.implementation_coverage`
    pub fn validate_implementations(
        &self,
        rust: &crate::correspondence::CorrespondenceIndex,
    ) -> Vec<Diagnostic> {
        self.anchors

}

See more source ↗

Tests and review

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

Implemented sage_meta::tests_and_model_correspondence_do_not_replace_explicit_implementation_entries

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.anchors.implementation_coverage)]
fn tests_and_model_correspondence_do_not_replace_explicit_implementation_entries() {
    let spec = SpecIndex::from_sources(&[source(
        "rules.md",
        "{anchor}`demo.rule` An independently covered rule.",
    )]);
    let rust = sage_meta::correspondence::CorrespondenceIndex::from_sources(&[sage_meta::correspondence::RustSource {
        crate_name: "demo".into(), target: "lib:demo".into(), file: "src/lib.rs".into(),
        source: "#[sage::item(crate)] mod model {}\n#[test] #[sage::test(demo.rule)] fn evidence() {}".into(),
    }]).unwrap();
    assert!(spec.validate(&rust.tests).is_empty());
    assert_eq!(spec.validate_implementations(&rust).len(), 1);
    assert!(
        spec.validate_implementations(&rust)[0]
            .message
            .contains("no associated Rust implementation")
    );
}
}

See more source ↗

TODO sage_meta::todo::independent_implementation_coverage

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

#![allow(unused)]
fn main() {
#[test]
    #[sage::test(meta.anchors.implementation_coverage)]
    fn independent_implementation_coverage() {
        // TODO: Missing implementation fails even when a test or Sage item
        // mapping exists; explicit placeholder entries retain their status.
    }
}

See more source ↗

Review: Accepted · Codex /root/anchor_094.

Fresh final followup review of implementation_coverage. Saved/read prior report and inputs, started fresh, recaptured all six dependencies and compared every fragment. Claim, both test bodies and all evidence/correspondence/check/helper captures are unchanged. The sole spec.rs delta is the implementation_references association comment on the separate unknown-reference validator; coverage behavior is unchanged.

The full claim requires every anchor to have an explicit Rust implementation entry, errors for missing entries, no substitution by tests or modeled-item correspondence, and placeholder entries counted with their explicit status. The sole ordinary implementation validate_implementations checks each anchor against only the implementations map and requires a nonempty vector. Missing and empty vectors produce a diagnostic at the defining source location. Test and item maps cannot satisfy this predicate. The captured main check invokes it independently from test validation; correspondence invokes the dedicated evidence indexer into the separate implementation map. Captured evidence construction preserves module-derived Ordinary/Todo/NotApplicable status, rationale and source metadata. Coverage accepts any nonempty entry vector without relabeling placeholders; conflicting placeholder ancestry produces its own error. The new marker does not affect any path.

The complete ordinary test tests_and_model_correspondence_do_not_replace_explicit_implementation_entries constructs a definition and real indexed Rust with both sage::item and sage::test but no implementation comment. It requires successful test validation, exactly one implementation diagnostic and the missing-Rust-implementation message. This directly exercises independence even when both other evidence types exist. Its captured source helper forwards actual text into SpecSource.

The sole TODO independent_implementation_coverage remains empty and explicit about the broader missing-entry/placeholder-status matrix. The ordinary test covers the combined negative scenario; separate cases and direct positive ordinary/TODO/N/A acceptance/status assertions remain deferred. Completing that verification requires distinct inventory fixtures and explicit acceptance/status assertions. Current source supports the predicate and retained statuses, but the TODO is not counted as behavioral proof or silently retired. No N/A evidence entry exists for this anchor.

The actual marker-only change was checked against the complete prior assessment, and all other relied-on inputs were verified unchanged. Full claim aspects remain implemented with the stated visible test deferral. No source edits, build or behavior tests occurred in this review; fresh start/read/record and source inspection only. No requested edits.

Browse meta anchors

116 anchors

Specification anchors and declared coverage
AnchorImplementationTests
meta (116)102 Implemented24 TODO103 Implemented36 TODO
meta.anchors (22)22 Implemented21 Implemented12 TODO
anchor_pagesImplementedImplementedTODO
book_explorerImplementedImplementedTODO
canonical_sourcesImplementedImplementedTODO
meta.anchors.content (7)7 Implemented7 Implemented
blocksImplementedImplemented
explicit_endImplementedImplemented
headingImplementedImplemented
literal_syntaxImplementedImplemented
next_anchorImplementedImplemented
source_endImplementedImplemented
unmatched_endImplementedImplemented
context_navigationImplementedImplementedTODO
evidence_statusImplementedImplementedTODO
explorer_navigationImplementedTODO
implementation_coverageImplementedImplementedTODO
implementation_referencesImplementedImplementedTODO
placeholder_statusImplementedImplementedTODO
point_excerptsImplementedImplementedTODO
region_balanceImplementedImplemented
region_excerptsImplementedImplementedTODO
test_coverageImplementedImplemented
test_referencesImplementedImplemented
unique_namesImplementedImplementedTODO
meta.book (21)10 Implemented18 TODO12 Implemented18 TODO
anchor_movesImplementedTODOImplementedTODO
authorityImplementedTODOImplementedTODO
browser_deliveryTODOImplementedTODO
browser_dependenciesTODOTODO
browser_rust_sourceTODOTODO
browser_searchTODOTODO
browser_serveTODOTODO
browser_structureTODOTODO
chapter_namesImplementedTODOImplementedTODO
crate_ownershipImplementedImplemented
crates_landingImplementedImplemented
entity_linksTODOTODO
index_groupsImplementedTODOImplementedTODO
index_namespace_pagesImplementedImplemented
index_rowsImplementedTODOImplementedTODO
index_statusImplementedTODOImplementedTODO
rfd_changesTODOTODO
sage_chaptersTODOImplementedTODO
self_descriptionTODOTODO
shared_modelImplementedTODOImplementedTODO
source_rolesTODOTODO
meta.contracts (4)4 Implemented3 TODO4 Implemented3 TODO
cache_invocationsImplementedTODOImplementedTODO
correspondenceImplementedImplemented
observation_coverageImplementedTODOImplementedTODO
validated_sessionImplementedTODOImplementedTODO
meta.language (39)39 Implemented39 Implemented
meta.language.calls (2)2 Implemented2 Implemented
declaredImplementedImplemented
forbiddenImplementedImplemented
meta.language.classes (3)3 Implemented3 Implemented
abstract_completeImplementedImplemented
override_signatureImplementedImplemented
single_inheritanceImplementedImplemented
meta.language.contexts (1)1 Implemented1 Implemented
inheritanceImplementedImplemented
meta.language.envelopes (7)7 Implemented7 Implemented
class_callsImplementedImplemented
createsImplementedImplemented
direct_callsImplementedImplemented
leafImplementedImplemented
permissionsImplementedImplemented
readsImplementedImplemented
receiver_callsImplementedImplemented
meta.language.fields (2)2 Implemented2 Implemented
context_stateImplementedImplemented
kindsImplementedImplemented
meta.language.methods (2)2 Implemented2 Implemented
kindsImplementedImplemented
proseImplementedImplemented
meta.language.model (3)3 Implemented3 Implemented
forbidden_pathsImplementedImplemented
inherited_prohibitionsImplementedImplemented
virtual_dispatchImplementedImplemented
meta.language.types (19)19 Implemented19 Implemented
argument_arityImplementedImplemented
declaration_proseImplementedImplemented
enum_variantsImplementedImplemented
field_proseImplementedImplemented
generic_parametersImplementedImplemented
member_commasImplementedImplemented
name_resolutionImplementedImplemented
opaque_representationImplementedImplemented
preludeImplementedImplemented
qualified_namesImplementedImplemented
recursive_valuesImplementedImplemented
struct_fieldsImplementedImplemented
tuplesImplementedImplemented
type_expressionsImplementedImplemented
unique_fieldsImplementedImplemented
unique_parametersImplementedImplemented
unique_variantsImplementedImplemented
unknown_namesImplementedImplemented
variant_proseImplementedImplemented
meta.reviews (27)27 Implemented27 Implemented
claim_textImplementedImplemented
complete_test_setImplementedImplemented
decisionsImplementedImplemented
fragment_associationsImplementedImplemented
fragment_formatImplementedImplemented
fragment_freshnessImplementedImplemented
gateImplementedImplemented
input_formatImplementedImplemented
input_fragmentsImplementedImplemented
output_formatImplementedImplemented
preparationImplementedImplemented
record_requiredImplementedImplemented
recorded_readsImplementedImplemented
recordingImplementedImplemented
review_delegationImplementedImplemented
review_diagnosticsImplementedImplemented
review_instructionsImplementedImplemented
review_scopeImplementedImplemented
selector_claimImplementedImplemented
selector_line_rangeImplementedImplemented
selector_testImplementedImplemented
selector_whole_fileImplementedImplemented
source_representationImplementedImplemented
stalenessImplementedImplemented
summary_formatImplementedImplemented
test_sourceImplementedImplemented
validation_layoutImplementedImplemented
meta.validation (3)3 TODO3 TODO
claim_specific_evidenceTODOTODO
independent_inspectionTODOTODO
review_packetsTODOTODO