meta.anchors.anchor_pages

Every specification anchor has a stable page identifying the rule and showing its definition, context, implementation entries, and tests/evidence. The page includes Rust excerpts and access to surrounding source, and exposes each entry’s placeholder status and explanation. Multiple sites remain individually inspectable rather than being reduced to a single coverage badge.

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

Implementation

Implemented crates/sage-meta/src/book/anchors.rs:127–132

sage_meta::book::anchors · bin:sage-meta

#![allow(unused)]
fn main() {
    // {anchor}`meta.anchors.anchor_pages`
    // {anchor}`meta.anchors.context_navigation`
    // {anchor}`meta.anchors.evidence_status`
    // {anchor}`meta.anchors.placeholder_status`
    fn page(&self, name: &str, url: &str) -> String {
        let mut text = format!(

}

See more source ↗

Tests and review

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

Implemented sage_meta::generated_anchor_pages_join_namespaces_claims_implementations_tests_and_reviews

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.book.index_namespace_pages)]
#[sage::test(meta.book.index_rows)]
#[sage::test(meta.book.index_groups)]
#[sage::test(meta.book.index_status)]
#[sage::test(meta.anchors.anchor_pages)]
#[sage::test(meta.anchors.context_navigation)]
fn generated_anchor_pages_join_namespaces_claims_implementations_tests_and_reviews() {
    let fixture = Fixture::new("manual");
    fixture.doc("SUMMARY.md", "# Summary\n\n- [Design](design/README.md)\n  - [Crates](design/crates/README.md)\n  - [Meta](design/meta.md)\n  - [Anchors](design/anchor/README.md)\n  - [Handwritten](design/handwritten.md)\n");
    let definitions = "# Meta\n\n{anchor}`foo`\nThe **parent rule** with `code`.\n\n{anchor}`foo.bar`\nThe child rule.\n\n{anchor}`other.leaf`\nA rule in a sibling branch.\n";
    fixture.doc("design/meta.md", definitions);
    fixture.doc("design/anchor/README.md", "# Anchors\n");
    let source = std::fs::read_to_string(fixture.root.join("src/lib.rs")).unwrap();
    fixture.write(
        "src/lib.rs",
        &format!(
            "{source}\n{}",
            r#"
// {anchor}`meta.foo`
fn implementation() {}
#[test]
#[sage::test(meta.foo)]
fn behavior() { assert_eq!(2 + 2, 4); }
mod todo {
    // {anchor}`meta.foo`
    // TODO: Additional implementation and edge case.
    #[test]
    #[sage::test(meta.foo)]
    fn remaining() {}
}
mod not_applicable {
    // {anchor}`meta.foo.bar`<<
    // N/A: This requirement describes an editorial convention.
    #[test]
    #[sage::test(meta.foo.bar)]
    fn editorial() {}
    // >>

    // {anchor}`meta.other.leaf`
    // N/A: This sibling rule is also editorial.
    #[test]
    #[sage::test(meta.other.leaf)]
    fn sibling_editorial() {}
}
"#
        ),
    );
    for anchor in ["meta.foo", "meta.foo.bar", "meta.other.leaf"] {
        sage_meta::review::start(&fixture.root, anchor, vec![]).unwrap();
        if anchor != "meta.other.leaf" {
            sage_meta::review::record(
                &fixture.root,
                anchor,
                &sage_meta::review::ValidationOutput {
                    reviewer: "fixture".into(),
                    report: "Explicit placeholder status reviewed.\n\nLiteral <p> & report detail."
                        .into(),
                    requested_edits: if anchor == "meta.foo.bar" {
                        vec!["Clarify the editorial explanation.".into()]
                    } else {
                        vec![]
                    },
                },
            )
            .unwrap();
        }
    }
    let mut input = fixture.input("items");
    let children = input[1]["items"][0]["Chapter"]["sub_items"]
        .as_array_mut()
        .unwrap();
    children.push(json!({"Chapter":{"name":"Meta","content":definitions,"path":"design/meta.md","source_path":"design/meta.md","number":[2,3],"parent_names":["Design"],"sub_items":[]}}));
    children.push(json!({"Chapter":{"name":"Anchors","content":"# Anchors\n","path":"design/anchor/README.md","source_path":"design/anchor/README.md","number":[2,4],"parent_names":["Design"],"sub_items":[]}}));
    let output = fixture.run(&input);
    assert!(
        output.status.success(),
        "{}",
        String::from_utf8_lossy(&output.stderr)
    );
    let book: Value = serde_json::from_slice(&output.stdout).unwrap();
    let entries = chapters(book["items"].as_array().unwrap());
    let overview = entries["design/anchor/README.md"]["content"]
        .as_str()
        .unwrap();
    assert!(overview.contains("data-group=\"meta\""));
    assert!(overview.contains("data-group=\"meta.foo\""));
    assert!(overview.contains("3 anchors"));
    assert!(overview.contains("1 Implemented"));
    assert!(overview.contains("1 TODO"));
    assert!(overview.contains("2 N/A"));
    assert!(overview.contains("aria-controls=\"anchor-text-meta-foo\""));
    assert!(overview.contains("<strong>parent rule</strong>"));
    let page = entries["design/anchor/meta/foo.md"]["content"]
        .as_str()
        .unwrap();
    assert!(page.contains(
        "Explicit placeholder status reviewed.<br><br>Literal &lt;p&gt; &amp; report detail."
    ));
    assert!(!page.contains("<p>Explicit placeholder status reviewed.\n"));
    let table_rows = |content: &str| {
        content
            .split("data-anchor=\"")
            .skip(1)
            .map(|tail| tail.split('"').next().unwrap().to_owned())
            .collect::<Vec<_>>()
    };
    assert_eq!(
        table_rows(overview),
        ["meta.foo", "meta.foo.bar", "meta.other.leaf"]
    );
    for prefix in ["meta", "meta/foo", "meta/other"] {
        assert!(entries.contains_key(format!("design/anchor/{prefix}.md").as_str()));
    }
    assert_eq!(
        table_rows(
            entries["design/anchor/meta.md"]["content"]
                .as_str()
                .unwrap()
        ),
        ["meta.foo", "meta.foo.bar", "meta.other.leaf"]
    );
    assert_eq!(
        table_rows(
            entries["design/anchor/meta/other.md"]["content"]
                .as_str()
                .unwrap()
        ),
        ["meta.other.leaf"]
    );
    assert!(entries.contains_key("design/anchor/meta/other/leaf.md"));
    let leaf = entries["design/anchor/meta/foo.md"];
    assert_eq!(
        leaf["sub_items"].as_array().unwrap().len(),
        1,
        "a rule can also be a namespace"
    );
    assert!(
        leaf["source_path"].is_null(),
        "generated views have no canonical source"
    );
    let content = leaf["content"].as_str().unwrap();
    assert_eq!(table_rows(content), ["meta.foo", "meta.foo.bar"]);
    assert!(content.contains("../../meta.html#meta.foo"));
    assert!(content.contains("fn implementation()"));
    assert!(content.contains("fn behavior() { assert_eq!(2 + 2, 4); }"));
    assert!(content.contains("See more source"));
    assert!(content.contains("Review: <strong>Accepted</strong>"));
    assert!(content.contains("Additional implementation and edge case."));
    let child = entries["design/anchor/meta/foo/bar.md"]["content"]
        .as_str()
        .unwrap();
    assert!(child.contains("N/A: This requirement describes an editorial convention."));
    assert!(child.contains("Review: <strong>Changes requested</strong>"));
    assert!(child.contains("Clarify the editorial explanation."));
    let unfinished = entries["design/anchor/meta/other/leaf.md"]["content"]
        .as_str()
        .unwrap();
    assert!(unfinished.contains("Review: <strong>Unfinished</strong>"));
    assert!(content.contains("data-status=\"TODO\""));
    assert!(child.contains("data-status=\"N/A\""));
    let definition = entries["design/meta.md"]["content"].as_str().unwrap();
    assert!(definition.contains("href=\"anchor/meta/foo.html\""));
    let inventory = sage_meta::spec::SpecIndex::load_workspace(&fixture.root).unwrap();
    assert_eq!(
        inventory.anchors.len(),
        3,
        "rendered copies never become definitions"
    );
}
}

See more source ↗

TODO sage_meta::todo::canonical_anchor_pages

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

#![allow(unused)]
fn main() {
#[test]
    #[sage::test(meta.anchors.anchor_pages)]
    fn canonical_anchor_pages() {
        // TODO: Verify stable pages with definitions, all implementation/test
        // sites, their excerpts, individual statuses, and explanations.
    }
}

See more source ↗

Review: Accepted · Codex /root/anchor_094.

Fresh complete followup review of anchor_pages. Saved/read prior report and inputs, then started fresh and recaptured all dependencies. Every initial fragment is unchanged: claim, whole anchors.rs implementation, ordinary integration test and TODO test. Three helper ranges are unchanged in both position and content. The anchor_url helper moved from spec.rs 575-579 to 576-580 due to a preceding association comment; I located the current function and verified its newly captured contents exactly equal the prior intended helper. No helper behavior or page behavior changed. This corrects the positional capture without blindly refreshing unrelated content.

The full claim requires stable rule pages, definition/context, implementation and test evidence, Rust excerpts and surrounding-source access, per-entry placeholder status/explanation and individual inspectability of multiple sites. The ordinary page implementation and its captured whole-file helpers generate pages from the canonical anchor/evidence inventory; namespace children include rules that also have descendants, and anchor_url derives a stable route from the dotted name. Generated pages have no canonical source copy. page displays the full name, definition, source filename, canonical context and breadcrumbs. It emits one section per implementation and indexed test rather than collapsing sites into aggregate badges. Implementations retain module/target/location/cfg/excerpt/status/reason; test fragments are selected by file/crate/target/Rust identity and display the complete function with contained explanation comments and status/cfg. Both receive surrounding-source explorer links. The captured escape/URL helpers keep content literal and route payloads encoded. Missing associations are labeled as validation errors; review state and report are separate from source evidence and imply no run. Namespace aggregates supplement these individual sections.

The complete ordinary generated_anchor_pages_join_namespaces_claims_implementations_tests_and_reviews test uses a real temporary workspace and preprocess executable. It supplies an ordinary and TODO site for one rule and N/A child/sibling sites. Assertions check generated rule/namespace paths, parent-rule-with-child structure, null canonical source, context links, implementation/test excerpts, surrounding-source link, individual TODO/N/A reasons and status attributes, accepted/changes-requested/unfinished reviews, requested-edit text and escaped multiline report. It also requires exactly three canonical definitions after rendering. The recaptured Fixture creates real files and invokes production preprocessing, and chapters rejects duplicate paths. This provides meaningful representative multi-site evidence, not a badge-only assertion.

The sole TODO canonical_anchor_pages remains explicit test deferral, with no behavioral assertions. Its comprehensive stable-page/all-sites/excerpts/status/reason matrix is not silently completed by the representative integration test. Retiring it requires assertions enumerating all sites/statuses plus stability and destination/excerpt navigation cases; browser interaction is not established by the current Rust test. It is a coverage prerequisite, not an assertion that the current page implementation is absent. No N/A entries exist for this anchor.

All full-claim aspects remain accounted for by the current source/assertions or visible TODO after verifying the actual range shift and unchanged content against the prior complete assessment. No source edits, build, browser or test runs occurred; this review used start/read/record and source inspection. 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