meta.language.model.inherited_prohibitions

An overriding implementation inherits the prohibitions of the base method.

Prohibitions record design intent even when the permitted graph already excludes the target. Adding a permitted edge must still fail validation if it creates a forbidden path.

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

Implementation

Implemented crates/sage-meta/src/validate.rs:582–587

sage_meta::validate · lib:sage_meta

A base method's prohibition also constrains each overriding implementation.

#![allow(unused)]
fn main() {
            // {anchor}`meta.language.model.inherited_prohibitions`
            // A base method's prohibition also constrains each overriding implementation.
            let (owner, name) = start.rsplit_once("::").unwrap();
            let implementations: BTreeSet<_> = self
                .classes
                .keys()

}

See more source ↗

Tests and review

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

Implemented sage_meta::inherited_prohibitions_constrain_overrides

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.language.model.inherited_prohibitions)]
fn inherited_prohibitions_constrain_overrides() {
    let errors = check(
        r#"
        class Base { """Contract."""
            fn run() -> crate::Value { """No bodies.""" envelope { forbid transitive crate::Body::read; } }
        }
        class Child extends crate::Base { """Implementation."""
            override fn run() -> crate::Value { """Bad override.""" envelope { invokes crate::Body::read(); } }
        }
        class Body { """Body.""" fn read() -> crate::Value { """Read.""" envelope {} } }
    "#,
    );
    assert!(
        errors
            .iter()
            .any(|e| e.message.contains("demo::Child::run -> demo::Body::read"))
    );
}
}

See more source ↗

Review: Accepted · Codex /root/anchor_205.

Reassessed the complete claim, single ordinary implementation association and complete single ordinary test set. Model::check records forbidden targets independently of permitted graph edges, expands each prohibition to descendant implementations using ancestors and nearest method selection, and traverses permitted edges from those implementations to reject a forbidden reachable target. This preserves the base restriction even when its own permitted envelope has no route, and applies through inheritance rather than requiring an override to repeat the prohibition. The annotated inherited_prohibitions_constrain_overrides fixture has a base prohibition with no invokes edge and a Child override adding the forbidden Body::read edge; its visible assertion requires the Child::run -> Body::read diagnostic. It would fail if override inheritance were omitted or prohibitions without existing base reachability were discarded. The captured check helper parses the fixture and invokes validate directly. All relevant implementation helpers are in the captured validate.rs file. No TODO/N/A entries or deferred prerequisites exist. Independently verified exact byte equality of current validate.rs and language.rs with the supplied historical snapshots; the prior rationale remains sufficient against current claim and evidence. This is source inspection, not a new behavioral execution: I ran review start/read and baseline comparison, and record for this report; no tests or builds. The coordinator's reported 321 passing functional tests and root build are separate execution evidence.

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