meta.language.methods.prose

Every method body begins with a triple-quoted description, followed by its envelope or abstract; declaration. The description is retained as prose; method-like text within it adds no dependency permissions.

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

Implementation

Implemented crates/sage-meta/src/parser.rs:474–479

sage_meta::parser · lib:sage_meta

#![allow(unused)]
fn main() {
        // {anchor}`meta.language.methods.prose`
        let description = self.prose()?;
        // {anchor}`meta.language.envelopes.leaf`
        let envelope = if self.eat("abstract") {
            self.expect(";")?;
            None

}

See more source ↗

Tests and review

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

Implemented sage_meta::method_prose_is_required_first_and_does_not_grant_calls

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.language.methods.prose)]
fn method_prose_is_required_first_and_does_not_grant_calls() {
    let document = valid(
        r#"class Item { """Item."""
            fn work() -> u32 {
                """invokes $missing::Other::run(); { prose is not an envelope }"""
                envelope {}
            }
        }"#,
    );
    assert_eq!(
        class(&document, "Item").methods[0].description,
        "invokes $missing::Other::run(); { prose is not an envelope }"
    );
    assert!(
        ContractModel::new(&[document]).unwrap().operations()["demo::Item::work"]
            .invokes
            .is_empty()
    );
    for body in ["envelope {}", "abstract;", r#"envelope {} """Too late.""""#] {
        let source = format!(
            r#"crate demo {{ """Demo.""" }} abstract class Item {{ """Item."""
            fn work() -> u32 {{ {body} }} }}"#
        );
        assert!(
            sage_meta::parse("demo/crate.sage", &source).is_err(),
            "{body}"
        );
    }
}
}

See more source ↗

Review: Accepted · Codex /root/anchor_203.

Reviewed complete claim, the sole ordinary parser implementation association and sole ordinary associated test; no TODO/N/A entries or deferred prerequisites exist. Independently verified exact byte equality of current parser.rs and envelopes.rs against historical implementation_sources/test_sources. Historical approval is baseline context, not execution evidence. Current parser lexes each triple-quoted description into one Prose token, preserves its interior text, and Parser::method requires prose immediately after the opening brace before accepting envelope or abstract;. The shared method path covers fn/query and overrides; closing-brace enforcement rejects later extra prose. Prose cannot generate effects because only the subsequently parsed envelope constructs effect entries. The complete associated method_prose_is_required_first_and_does_not_grant_calls test asserts exact retention of dependency-looking text, successful model construction and an empty invokes permission vector; missing description before both envelope and abstract, and description after envelope, all must fail parsing. These visible assertions detect omitted/order-relaxed prose parsing and treating prose calls as dependencies. Captured parse/valid/class fixture helpers verify that the asserted method is selected from the actual parsed document. Captured ContractModel accessors and resolver show the asserted permission vector comes from explicit envelope effects rather than prose. The prior rationale remains sufficient against current inputs, with mandatory ordering, retention and nonpermission semantics all accounted for. Source assessment only: personally ran review start/read and byte-comparison commands, and recorded this report; no behavioral tests or broad builds were run by this reviewer. Coordinator-reported 321 passing sage-meta tests and root cargo build are separate execution evidence. No edits requested.

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