meta.reviews.record_required

For every anchor requiring re-evaluation, cargo meta check and the shared Cargo validation test must fail until the assigned review subagent successfully runs cargo meta review record for that review. Starting a review, capturing inputs, reading additional context, or drafting a report cannot satisfy the gate. An interrupted, abandoned, or failed review remains failing; an older report cannot stand in for the unfinished review.

Recording is necessary but not sufficient: the recorded report must be complete, request no edits, and still match current inputs. Recording a report that requests edits, or changing inputs after recording, leaves the gate failing. Every required anchor must meet these conditions independently.

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

Implementation

Implemented crates/sage-meta/src/check.rs:436–441

sage_meta::check · lib:sage_meta

#![allow(unused)]
fn main() {
// {anchor}`meta.reviews.record_required`
// {anchor}`meta.reviews.decisions`
// {anchor}`meta.reviews.review_diagnostics`
fn check_reviews(
    report: &mut CheckReport,
    spec: &SpecIndex,

}

See more source ↗

Implemented crates/sage-meta/src/review.rs:675–680

sage_meta::review · lib:sage_meta

#![allow(unused)]
fn main() {
// {anchor}`meta.reviews.record_required`
// {anchor}`meta.reviews.review_diagnostics`
pub fn validate(
    workspace: &Path,
    current: &BTreeMap<String, ReviewInput>,
    checklist: &ReviewChecklist,

}

See more source ↗

Implemented crates/sage-meta/src/main.rs:139–144

sage_meta · bin:sage-meta

#![allow(unused)]
fn main() {
// {anchor}`meta.reviews.record_required`
// {anchor}`meta.reviews.review_diagnostics`
fn check(args: &[std::ffi::OsString]) -> Result<(), Box<dyn std::error::Error>> {
    let mut json = false;
    let mut root = None;
    for argument in args {

}

See more source ↗

Tests and review

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

Implemented sage_meta::diagnostics_identify_missing_unfinished_stale_and_requested_edit_reviews

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.reviews.gate)]
#[sage::test(meta.reviews.review_diagnostics)]
#[sage::test(meta.reviews.record_required)]
fn diagnostics_identify_missing_unfinished_stale_and_requested_edit_reviews() {
    let fixture = Fixture::new();
    for state in ["missing", "unfinished", "stale", "requested edits"] {
        match state {
            "unfinished" => {
                fixture.start();
            }
            "stale" => {
                fixture.approve();
                fixture.write(
                    "src/behavior.rs",
                    "// {anchor}`demo.rule`\npub fn result() -> u32 { 5 }\n",
                );
            }
            "requested edits" => {
                fixture.start();
                let mut output = Fixture::report();
                output
                    .requested_edits
                    .push("Fix the implementation.".into());
                review::record(&fixture.0, "demo.rule", &output).unwrap();
            }
            _ => {}
        }
        let output = fixture.run(&["check"]);
        assert!(!output.status.success(), "{state}");
        let stderr = String::from_utf8_lossy(&output.stderr);
        assert!(stderr.contains("demo.rule"), "{stderr}");
        assert!(
            stderr.contains("sage-review-checklist/SKILL.md"),
            "{stderr}"
        );
        if matches!(state, "missing" | "unfinished") {
            assert!(stderr.contains(state), "{stderr}");
        }
        if state == "stale" {
            assert!(stderr.contains("src/behavior.rs"), "{stderr}");
        }
        if state == "requested edits" {
            assert!(stderr.contains("edit"), "{stderr}");
        }
    }
}
}

See more source ↗

Implemented sage_meta::incomplete_output_publication_never_satisfies_the_gate

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.reviews.recording)]
#[sage::test(meta.reviews.record_required)]
#[sage::test(meta.reviews.gate)]
fn incomplete_output_publication_never_satisfies_the_gate() {
    let fixture = Fixture::new();
    fixture.start();
    // An output written before the summary records completion is incomplete.
    fixture.write(
        "validations/demo.rule/output.json",
        &serde_json::to_string(&Fixture::report()).unwrap(),
    );
    assert!(!sage_meta::check(&fixture.0).is_valid());
    fixture.approve();
    std::fs::remove_file(fixture.0.join("validations/demo.rule/output.json")).unwrap();
    assert!(!sage_meta::check(&fixture.0).is_valid());
    fixture.start();
    fixture.write("validations/demo.rule/output.json", "{bad json");
    assert!(!sage_meta::check(&fixture.0).is_valid());
}
}

See more source ↗

Implemented sage_meta::interrupted_start_publication_states_cannot_reuse_an_old_approval

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.reviews.preparation)]
#[sage::test(meta.reviews.record_required)]
fn interrupted_start_publication_states_cannot_reuse_an_old_approval() {
    let fixture = Fixture::new();
    fixture.approve();
    let directory = fixture.0.join("validations/demo.rule");
    let input = fixture.input();
    // Start removes the old directory before creating any part of the new record.
    std::fs::remove_dir_all(&directory).unwrap();
    assert!(!sage_meta::check(&fixture.0).is_valid());
    assert!(!fixture.run(&["check"]).status.success());
    std::fs::create_dir(&directory).unwrap();
    assert!(!sage_meta::check(&fixture.0).is_valid());
    assert!(!fixture.run(&["check"]).status.success());
    std::fs::write(
        directory.join("input.json"),
        serde_json::to_vec(&input).unwrap(),
    )
    .unwrap();
    assert!(!sage_meta::check(&fixture.0).is_valid());
    assert!(!fixture.run(&["check"]).status.success());
    assert!(!directory.join("output.json").exists());
    // A successful restart also stays failing until a fresh report is recorded.
    fixture.start();
    assert!(!sage_meta::check(&fixture.0).is_valid());
    assert!(!fixture.run(&["check"]).status.success());
    review::record(&fixture.0, "demo.rule", &Fixture::report()).unwrap();
    assert!(sage_meta::check(&fixture.0).is_valid());
}
}

See more source ↗

Implemented sage_meta::invalid_reports_and_stale_inputs_never_complete_an_active_review

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.reviews.recording)]
#[sage::test(meta.reviews.output_format)]
#[sage::test(meta.reviews.decisions)]
#[sage::test(meta.reviews.input_fragments)]
#[sage::test(meta.reviews.fragment_freshness)]
#[sage::test(meta.reviews.record_required)]
#[sage::test(meta.reviews.staleness)]
fn invalid_reports_and_stale_inputs_never_complete_an_active_review() {
    let fixture = Fixture::new();
    assert!(review::record(&fixture.0, "demo.rule", &Fixture::report()).is_err());
    fixture.start();
    for field in ["reviewer", "report", "edit"] {
        let mut output = Fixture::report();
        match field {
            "reviewer" => output.reviewer = "  ".into(),
            "report" => output.report.clear(),
            _ => output.requested_edits = vec!["\n".into()],
        }
        assert!(review::record(&fixture.0, "demo.rule", &output).is_err());
        assert!(!fixture.0.join("validations/demo.rule/output.json").exists());
    }
    let before = std::fs::read(fixture.0.join("validations/demo.rule/input.json")).unwrap();
    fixture.write(
        "src/behavior.rs",
        "// {anchor}`demo.rule`\npub fn result() -> u32 { 5 }\n",
    );
    assert!(review::record(&fixture.0, "demo.rule", &Fixture::report()).is_err());
    assert_eq!(
        before,
        std::fs::read(fixture.0.join("validations/demo.rule/input.json")).unwrap()
    );
    assert!(!sage_meta::check(&fixture.0).is_valid());
    fixture.start();
    let mut output = Fixture::report();
    output.requested_edits =
        vec!["Return four and add an assertion against the implementation.".into()];
    review::record(&fixture.0, "demo.rule", &output).unwrap();
    assert_eq!(
        review::load_saved(&fixture.0.join("validations"))
            .unwrap()
            .reviews[0]
            .output
            .as_ref(),
        Some(&output)
    );
    assert!(!sage_meta::check(&fixture.0).is_valid());
    let json: serde_json::Value = serde_json::from_slice(
        &std::fs::read(fixture.0.join("validations/demo.rule/output.json")).unwrap(),
    )
    .unwrap();
    assert_eq!(json.as_object().unwrap().len(), 3);
    assert!(json.get("decision").is_none());
    assert!(json.get("outcome").is_none());
}
}

See more source ↗

Implemented sage_meta::restarting_one_anchor_leaves_other_anchor_record_unchanged

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.reviews.preparation)]
#[sage::test(meta.reviews.recording)]
#[sage::test(meta.reviews.record_required)]
fn restarting_one_anchor_leaves_other_anchor_record_unchanged() {
    let fixture = Fixture::new();
    fixture.write(
        "md/design/README.md",
        &format!("{CLAIM}\n{{anchor}}`demo.other`\nAnother claim.\n"),
    );
    fixture.write("src/behavior.rs", "// {anchor}`demo.rule`\npub fn result() -> u32 { 4 }\n// {anchor}`demo.other`\npub fn other() -> u32 { 4 }\n");
    fixture.write(
        "src/tests.rs",
        &format!("{TEST}\n#[test] #[sage::test(demo.other)] fn other() {{ assert_eq!(4, 4); }}"),
    );
    fixture.approve();
    review::start(&fixture.0, "demo.other", vec![]).unwrap();
    review::record(&fixture.0, "demo.other", &Fixture::report()).unwrap();
    assert!(sage_meta::check(&fixture.0).is_valid());
    let before: Vec<_> = ["summary.json", "input.json", "output.json"]
        .map(|file| std::fs::read(fixture.0.join("validations/demo.other").join(file)).unwrap())
        .into();
    fixture.start();
    assert!(!sage_meta::check(&fixture.0).is_valid());
    review::record(&fixture.0, "demo.rule", &Fixture::report()).unwrap();
    for (file, bytes) in ["summary.json", "input.json", "output.json"]
        .into_iter()
        .zip(before)
    {
        assert_eq!(
            bytes,
            std::fs::read(fixture.0.join("validations/demo.other").join(file)).unwrap()
        );
    }
    assert!(sage_meta::check(&fixture.0).is_valid());
}
}

See more source ↗

Implemented sage_meta::start_invalidates_previous_success_and_record_is_required

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.reviews.validation_layout)]
#[sage::test(meta.reviews.summary_format)]
#[sage::test(meta.reviews.preparation)]
#[sage::test(meta.reviews.record_required)]
#[sage::test(meta.reviews.recorded_reads)]
#[sage::test(meta.reviews.recording)]
#[sage::test(meta.reviews.decisions)]
fn start_invalidates_previous_success_and_record_is_required() {
    let fixture = Fixture::new();
    assert!(!sage_meta::check(&fixture.0).is_valid());
    fixture.approve();
    assert!(sage_meta::check(&fixture.0).is_valid());
    let input = fixture.start();
    assert_eq!(fixture.input(), input);
    let summary = fixture.summary();
    assert_eq!(summary["anchor"], "demo.rule");
    assert!(summary["started_at_unix_seconds"].as_u64().unwrap() > 0);
    assert!(summary["recorded_at_unix_seconds"].is_null());
    assert_eq!(summary["schema_version"], review::SCHEMA_VERSION);
    assert_eq!(summary["policy_version"], review::POLICY_VERSION);
    assert!(summary.get("input_sha256").is_none());
    assert!(!fixture.0.join("validations/demo.rule/output.json").exists());
    assert!(!sage_meta::check(&fixture.0).is_valid());
    let saved = review::load_saved(&fixture.0.join("validations")).unwrap();
    assert_eq!(saved.reviews.len(), 1);
    assert!(saved.reviews[0].output.is_none());
    fixture.write("helper.txt", "context\n");
    review::capture_read(&fixture.0, "demo.rule", "helper.txt", Selector::WholeFile).unwrap();
    assert!(!sage_meta::check(&fixture.0).is_valid());
    let bytes = std::fs::read(fixture.0.join("validations/demo.rule/input.json")).unwrap();
    review::record(&fixture.0, "demo.rule", &Fixture::report()).unwrap();
    assert_eq!(
        bytes,
        std::fs::read(fixture.0.join("validations/demo.rule/input.json")).unwrap()
    );
    assert!(
        fixture.summary()["recorded_at_unix_seconds"]
            .as_u64()
            .unwrap()
            >= summary["started_at_unix_seconds"].as_u64().unwrap()
    );
    assert!(sage_meta::check(&fixture.0).is_valid());
    assert!(review::record(&fixture.0, "demo.rule", &Fixture::report()).is_err());
    assert!(
        review::capture_read(&fixture.0, "demo.rule", "helper.txt", Selector::WholeFile).is_err()
    );
}
}

See more source ↗

Review: Accepted · anchor_094 fresh final review.

Reviewed the complete record_required claim, all three ordinary implementation files (review.rs, check.rs, main.rs) and all six ordinary associated tests. No TODO/N/A entries exist. Captured fixture helpers, the shared workspace validation test and the review checklist as dependencies.

Implementation: start removes an existing anchor validation directory before publishing new input or summary, then writes a summary with no recorded timestamp and no output. capture_read only appends source fragments; it never supplies completed output or updates completion time. record requires an active review, validates output, rebuilds current inventory and rejects input_errors before writing output and then completion metadata. load_saved only treats output as completed when the summary records completion; missing/invalid files remain issues or an unfinished record. review::validate iterates every current anchor independently and reports missing/unfinished outputs, invalid output, requested edits and stale inputs. acceptable likewise requires present valid output, empty requested_edits and current matching context. Thus starting, reading and drafting do not substitute for record, and a prior completed report is not reused after a successful restart.

The necessary-but-not-sufficient qualification is enforced: a report with concrete requested edits can be recorded but cannot pass validation; a later source/association/fragment change invalidates a previously completed report. Both main::check and the shared Cargo validation test call the library check/ensure_valid path, whose review stage is mandatory for overall success. The captured checklist assigns recording to the review subagent and prohibits a coordinator draft from substituting for that completed review. Process ownership and semantic report completeness are reviewer workflow obligations, not authentication or natural-language completeness guarantees implemented by the record file format.

start_invalidates_previous_success_and_record_is_required asserts an accepted fixture becomes invalid on restart, output disappears, saved output is None and completion timestamp is null. Capturing an additional file leaves it invalid; only record restores validity, preserving exact input bytes and setting completion time. It also rejects rerecording or adding context after completion. interrupted_start_publication_states_cannot_reuse_an_old_approval simulates interruption after old directory removal, after new directory creation and after input-only publication. Both library and CLI remain failing at each point; a successful restart also stays failing until record. These tests directly address interrupted/abandoned state without assuming the command always reaches its last write.

incomplete_output_publication_never_satisfies_the_gate checks that a drafted output without completion metadata, a missing output after completion and malformed output cannot pass. invalid_reports_and_stale_inputs_never_complete_an_active_review rejects recording before start, invalid report fields and changed input, asserts failed recording leaves no output and preserves saved input, then records a report requesting concrete edits and verifies the gate still fails. diagnostics_identify_missing_unfinished_stale_and_requested_edit_reviews checks CLI failure and anchored guidance for all four states, including source changes after approval. restarting_one_anchor_leaves_other_anchor_record_unchanged uses two accepted anchors, restarts one and observes overall failure despite the other's success, then records the restarted anchor and verifies success plus byte-for-byte preservation of the other record. This establishes independent conditions per anchor rather than a global approval shortcut.

The fixture helpers create real isolated model/source/claim inventories and invoke production review/check paths. The captured workspace test calls sage_meta::check(root).ensure_valid(), confirming Cargo uses the same required review state as the CLI. All state transitions and relevant failure outcomes have concrete assertions in associated tests. No further edits or unresolved behavior concerns were found.

This pass executed review start/read/record and source inspection only. No behavioral suites were rerun, and central test execution is not claimed as this reviewer's work. No source modifications. Dependency capture is complete for this assessment. 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