meta.book.browser_rust_source

Readers can reveal or hide a Rust source pane without leaving the selected Sage entity. The pane follows selection and uses indexed Rust correspondences, showing the file, line numbers, and highlighted declaration with surrounding source. Multiple mapped sites are individually selectable. Missing source is reported explicitly. Module markers, macro-input sites, and cfg conditions remain distinguishable from a confirmed active executable implementation. The pane identifies its contents as a source snapshot; navigating to code does not establish that the code executed or satisfied a specification rule.

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

Implementation

TODO crates/sage-meta/tests/spec_plan.rs:171–178

sage_meta::todo · test:spec_plan

TODO: Exercise show/hide, navigation, multiple sites, missing source, declaration ranges, cfg conditions, markers, and snapshot labels.

#![allow(unused)]
fn main() {
    // {anchor}`meta.book.browser_rust_source`<<
    #[test]
    #[sage::test(meta.book.browser_rust_source)]
    fn browser_source_pane_preserves_context_and_provenance() {
        // TODO: Exercise show/hide, navigation, multiple sites, missing source,
        // declaration ranges, cfg conditions, markers, and snapshot labels.
    }
    // >>

}

See more source ↗

Tests and review

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

TODO sage_meta::todo::browser_source_pane_preserves_context_and_provenance

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

#![allow(unused)]
fn main() {
#[test]
    #[sage::test(meta.book.browser_rust_source)]
    fn browser_source_pane_preserves_context_and_provenance() {
        // TODO: Exercise show/hide, navigation, multiple sites, missing source,
        // declaration ranges, cfg conditions, markers, and snapshot labels.
    }
}

See more source ↗

Review: Accepted · anchor_094 fresh final review.

Reviewed the entire browser_rust_source claim and both registered entries. The only associated implementation is the explicit region surrounding todo::browser_source_pane_preserves_context_and_provenance in spec_plan.rs; the only associated test is that same assertion-free function. Both are TODO, with an explanation naming show/hide, navigation, multiple sites, missing source, declaration ranges, cfg, markers and snapshot labels. It is not executable behavioral proof and does not establish completed implementation. No ordinary or N/A evidence is registered.

To assess the deferral against current work, captured and inspected browser.rs, web/browser.js, web/index.html and the first 135 lines of browser.test.cjs. Existing foundations are substantial: browser.rs source_data imports indexed correspondence locations and source files into serialized snapshot data, and render embeds data with the HTML/JS assets. The template provides an initially hidden pane and show/close buttons beside the selected-entity content. JS toggleSource alters pane visibility and aria-expanded without changing the selected route; show clears a prior explicit source choice and refreshes an open pane on navigation. sourceOwner resolves item/method/module/crate and anchor selection, with members showing their owner. renderSourcePane uses the target map, flattens multiple correspondence locations into selectable options and refreshes the chosen site. It reports no available mapping and absent source files separately, shows path/line, renders surrounding full-file source with line numbers, marks line..end_line and scrolls to the declaration. Module markers explicitly disclaim executable coverage; macro-input locations say expanded Rust is absent; cfg conditions are explicitly not evaluated. Snapshot text states when the HTML captured source. These are source-inspected foundations, not a promotion of the registered TODO to complete implementation or evidence that a browser interaction occurred.

Every claim aspect remains in scope of the TODO: preserving selection through reveal/hide; following selection; indexed correspondences; file/numbered surrounding code and declaration highlighting; independent site choice; missing-source feedback; module/macro/cfg provenance versus confirmed execution; source snapshot labeling and avoiding inference that navigation proves execution or a satisfied rule. The deferred validation requires a browser/DOM interaction harness operating on generated indexed snapshots, with multiple sites and module/macro/cfg cases plus missing source and exact line ranges. Such a harness must check route retention and updates, rendered visibility and selection, as well as provenance messages; source-string assertions alone cannot establish that behavior.

The captured JS tests provide useful unregistered partial evidence: they assert actual indexed annotation locations, enum declaration text, data-definition markers, method source ownership, module/macro labels, choosing a second fixture definition and escaped unevaluated cfg text. They also test raw source-route highlighting and escaping, which is distinct from exercising the pane UI. They consume an exported artifact and call pure render functions; they do not drive the DOM toggle/navigation lifecycle or fully assert every missing-source and provenance scenario. Accordingly they are not substituted for the associated TODO, and no complete test coverage or runtime acceptance is claimed. Existing partial source code is captured as contextual dependency rather than relabeled as a completed associated implementation.

No source changes or behavioral reproduction were needed. This review executed only review start/read/record and source inspection; centrally run suites were not rerun and no test execution is claimed here. Dependency capture is complete for this assessment. The explicit implementation-and-test TODO fairly preserves unfinished end-to-end work, with the prerequisite and remaining scenarios explained above. 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