meta.anchors.point_excerpts

A point reference has no << suffix. Its initial excerpt contains the marker line and the next five source lines, truncated at end-of-file. A See more… action opens the surrounding source at that location; the five-line preview does not claim to delimit the implementation.

// {anchor}`meta.language.calls.declared`
check_declared_call(caller, callee)?;

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

Implementation

Implemented crates/sage-meta/src/evidence.rs:157–162

sage_meta::evidence · lib:sage_meta

#![allow(unused)]
fn main() {
        // {anchor}`meta.anchors.point_excerpts`
        let end_line = if region {
            line
        } else {
            (line + 5).min(lines.count())
        };

}

See more source ↗

Tests and review

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

Implemented sage_meta::point_excerpts_include_five_following_lines_and_truncate_at_eof

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.anchors.point_excerpts)]
fn point_excerpts_include_five_following_lines_and_truncate_at_eof() {
    let source = "// {anchor}`example.point`\r\n// one\r\n// two\r\n// three\r\n// four\r\n// five\r\n// excluded\r\n// {anchor}`example.eof`\r\n// last";
    let rust = index(source);
    assert!(rust.diagnostics.is_empty());
    let point = &rust.implementations["example.point"][0];
    assert_eq!((point.line, point.end_line), (1, 6));
    assert!(!point.region);
    assert_eq!(
        point.excerpt,
        "// {anchor}`example.point`\r\n// one\r\n// two\r\n// three\r\n// four\r\n// five\r\n"
    );
    assert_eq!(&source[point.span.start..point.span.end], point.excerpt);
    let eof = &rust.implementations["example.eof"][0];
    assert_eq!((eof.line, eof.end_line), (8, 9));
    assert_eq!(eof.excerpt, "// {anchor}`example.eof`\r\n// last");
    assert_eq!(&source[eof.span.start..eof.span.end], eof.excerpt);
    let final_line = index("// {anchor}`example.last`\n");
    assert_eq!(final_line.implementations["example.last"][0].end_line, 1);
}
}

See more source ↗

TODO sage_meta::todo::point_excerpts_and_surrounding_source

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

#![allow(unused)]
fn main() {
#[test]
    #[sage::test(meta.anchors.point_excerpts)]
    fn point_excerpts_and_surrounding_source() {
        // TODO: Verify marker plus five lines, EOF truncation, and See more.
    }
}

See more source ↗

Review: Accepted · /root/final_quality.

Fresh reassessment of meta.anchors.point_excerpts using the current complete claim, associated evidence indexing implementation and whole-file helpers, one ordinary test and one explicit TODO. Captured the test index helper, generated evidence/source-link renderer and browser full-source route/focus code. No source edits, build or tests executed.

Point detection and extent: marker accepts an empty suffix as a point and << as a region; other suffixes do not become points. For a point, index_source sets end_line to min(marker line + 5, physical line count). Lines derives byte starts from newlines, excludes a fictitious empty line after a terminal newline, and ends each selected line at the next real line start or EOF. The stored span therefore contains the complete marker line and five following source lines, retaining original line endings and truncating only at EOF. The excerpt is copied from that span. A point remains region=false; it is a preview and does not infer implementation extent from syntax.

Surrounding source: the captured anchor-page renderer displays that excerpt and a separate See more source link encoding file/start/end into the explorer route. The browser source route renders all lines in the source snapshot, highlights the selected range and marks its first line for scrolling. show scrolls that focus into view. Consequently the preview is not treated as the full implementation and surrounding source remains accessible. This is source inspection of the navigation implementation, not a completed browser action test.

Ordinary test: point_excerpts_include_five_following_lines_and_truncate_at_eof indexes a CRLF source with a marker, five lines and a sixth excluded line, asserting exact 1..6 metadata, region=false, exact CRLF excerpt and equality to its source span. A second near-EOF marker asserts 8..9 metadata and exact truncation without a final newline; a marker-only terminal-newline case asserts end_line remains 1. The helper calls the real correspondence indexer on a Rust source. These are meaningful boundary and preservation assertions.

Explicit TODO: point_excerpts_and_surrounding_source has no assertions and still defers the broader preview/navigation verification. Its marker-plus-five/EOF portion now has the ordinary coverage above, but an interactive See more test remains absent here. Completing the TODO requires opening the generated route and verifying full surrounding source plus the focused original location; source inspection alone is not execution evidence. Preserve that deferral rather than claiming full browser coverage. No concrete new defect or requested edit found.

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