meta.reviews.output_format

The output contains only the reviewer, report, and requested edits:

struct ValidationOutput {
    reviewer: String,
    report: String,
    requested_edits: Vec<String>,
}

reviewer is a nonblank reviewer identity. report is a nonblank, complete, claim-specific explanation accounting for every requirement, implementation evidence, and test adequacy. It distinguishes source inspection from commands actually executed. The report is the agent’s supplied explanation, not a recording of internal reasoning. Each requested edit is a concrete, nonblank change needed before revalidation.

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

Implementation

Implemented crates/sage-meta/src/review.rs:93–98

sage_meta::review · lib:sage_meta

#![allow(unused)]
fn main() {
// {anchor}`meta.reviews.output_format`
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ValidationOutput {
    pub reviewer: String,
    pub report: String,

}

See more source ↗

Tests and review

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

Implemented sage_meta::completed_corrupt_records_and_invalid_layout_cannot_pass

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.reviews.gate)]
#[sage::test(meta.reviews.validation_layout)]
#[sage::test(meta.reviews.output_format)]
#[sage::test(meta.reviews.review_diagnostics)]
fn completed_corrupt_records_and_invalid_layout_cannot_pass() {
    for fault in [
        "malformed",
        "blank reviewer",
        "blank report",
        "blank edit",
        "extra field",
        "missing summary",
        "missing input",
        "missing output",
        "non-directory",
    ] {
        let fixture = Fixture::new();
        fixture.approve();
        let directory = fixture.0.join("validations/demo.rule");
        match fault {
            "malformed" => fixture.write("validations/demo.rule/output.json", "{"),
            "missing summary" => std::fs::remove_file(directory.join("summary.json")).unwrap(),
            "missing input" => std::fs::remove_file(directory.join("input.json")).unwrap(),
            "missing output" => std::fs::remove_file(directory.join("output.json")).unwrap(),
            "non-directory" => {
                fixture.write("validations/unexpected", "not a validation directory")
            }
            _ => {
                let mut output = serde_json::to_value(Fixture::report()).unwrap();
                match fault {
                    "blank reviewer" => output["reviewer"] = " ".into(),
                    "blank report" => output["report"] = "\n".into(),
                    "blank edit" => output["requested_edits"] = serde_json::json!([""]),
                    _ => output["outcome"] = true.into(),
                }
                fixture.write(
                    "validations/demo.rule/output.json",
                    &serde_json::to_string(&output).unwrap(),
                );
            }
        }
        assert!(!sage_meta::check(&fixture.0).is_valid(), "{fault}");
        let output = fixture.run(&["check"]);
        assert!(!output.status.success(), "{fault}");
        let error = String::from_utf8_lossy(&output.stderr);
        let anchor = if fault == "non-directory" {
            "unexpected"
        } else {
            "demo.rule"
        };
        assert!(error.contains(anchor), "{error}");
        assert!(error.contains("invalid validation"), "{error}");
        assert!(error.contains("sage-review-checklist/SKILL.md"), "{error}");
        let reason = match fault {
            "malformed" => "EOF",
            "blank reviewer" | "blank report" => "nonblank reviewer and report",
            "blank edit" => "nonblank strings",
            "extra field" => "unknown field",
            "missing summary" | "missing input" | "missing output" => "No such file",
            "non-directory" => "not a real directory",
            _ => unreachable!(),
        };
        assert!(error.contains(reason), "{fault}: {error}");
    }
}
}

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 ↗

Review: Accepted · anchor_094 fresh final review.

Reviewed the complete output_format claim, its associated review.rs implementation and both ordinary associated tests. No TODO/N/A evidence is present. Captured the review fixture helpers and reviewer checklist as dependencies.

Structural format: ValidationOutput contains exactly reviewer:String, report:String and requested_edits:Vec<String>, derives serialization/deserialization and denies unknown fields. There are no defaults permitting omitted required fields and no decision/outcome field. output_error uses trim only for validation, rejecting empty/whitespace-only reviewer or report and any empty/whitespace-only requested edit. record checks this before completion and writes the supplied output; load_saved deserializes and rechecks completed reports, so editing saved JSON cannot bypass the constraints. Neither path manufactures a reviewer report from source or records hidden reasoning; the report is the caller-supplied explanatory string, preserved by serialization.

Semantic obligations: a reviewer identity must identify the reviewer, the explanation must account for every claim requirement, implementation evidence and test adequacy, it must distinguish source inspection from executed commands, and edits must name concrete changes before revalidation. These obligations cannot be proven from string types or length. They are stated in the source's review prompt and captured checklist, which requires complete claim-specific evidence assessment, clear TODO/N/A rationale, and reporting actual execution separately. The implementation enforces the format/nonblank boundary while the independent review process supplies the explanation and judges completeness. This assessment does not mistake arbitrary nonblank prose for demonstrated technical adequacy.

invalid_reports_and_stale_inputs_never_complete_an_active_review directly submits blank reviewer, empty report and newline-only edit strings and asserts recording fails without publishing output. After restarting against current source, it submits a concrete requested edit, asserts load_saved preserves the exact output and inspects output.json: exactly three fields and no decision or outcome. The gate remaining invalid for requested edits is consistent with reporting needed work rather than changing the output format. Its source-staleness and active-review checks supply lifecycle context, not a substitute for the format assertions.

completed_corrupt_records_and_invalid_layout_cannot_pass modifies completed records to malformed JSON, whitespace-only reviewer/report, empty edits and an extra outcome field. For each relevant format case it asserts both library invalidity and CLI failure, identifies the anchor/invalid-validation diagnostic and checks a specific underlying reason (parse failure, nonblank requirement or unknown field). The same test includes missing files and nondirectory layout cases, which demonstrate unusable completed records do not accidentally bypass output validation. The captured fixture helper creates real isolated records with a supplied reviewer/report and production start/record/check calls; concrete assertions remain visible in the tests.

The tests cover exact output shape, round-trip preservation, rejected malformed/extra fields and nonblank enforcement at both recording and later checking. Human/agent report adequacy remains the explicitly documented review responsibility rather than an unsupported automated claim. No source changes, reproduced defects or additional edits were needed. This pass executed review start/read/record and source inspection only, with no behavioral suite rerun; centrally run tests are coordinator context and not independent execution by this reviewer. Dependency capture is complete for the 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