meta.reviews.review_instructions

Review inputs preserve the exact verification prompt and any additional coordinator instructions supplied to the reviewer. These instructions are part of the recorded context even when they do not originate in a source file.

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

Implementation

Implemented crates/sage-meta/src/review.rs:518–523

sage_meta::review · lib:sage_meta

#![allow(unused)]
fn main() {
// {anchor}`meta.reviews.review_instructions`
pub fn start(
    workspace: &Path,
    anchor: &str,
    instructions: Vec<String>,
) -> Result<ReviewInput, Box<dyn Error>> {

}

See more source ↗

Implemented crates/sage-meta/src/main.rs:103–108

sage_meta · bin:sage-meta

#![allow(unused)]
fn main() {
// {anchor}`meta.reviews.review_instructions`
fn review(args: &[std::ffi::OsString]) -> Result<(), Box<dyn std::error::Error>> {
    use sage_meta::review::{self, Selector, ValidationOutput};
    let args = args
        .iter()
        .map(|arg| arg.to_str().ok_or("arguments must be UTF-8"))

}

See more source ↗

Tests and review

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

Implemented sage_meta::cli_start_and_record_roundtrip_exact_saved_input

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.review_instructions)]
fn cli_start_and_record_roundtrip_exact_saved_input() {
    let fixture = Fixture::new();
    fixture.write(
        "instructions.txt",
        "Inspect the edge cases.\nPreserve these instructions.",
    );
    let output = fixture.run(&[
        "review",
        "start",
        "demo.rule",
        "--instructions",
        "instructions.txt",
    ]);
    assert!(
        output.status.success(),
        "{}",
        String::from_utf8_lossy(&output.stderr)
    );
    let input: ReviewInput = serde_json::from_slice(&output.stdout).unwrap();
    assert_eq!(input, fixture.input());
    assert_eq!(
        input.coordinator_instructions,
        ["Inspect the edge cases.\nPreserve these instructions."]
    );
    fixture.write(
        "report.json",
        &serde_json::to_string(&Fixture::report()).unwrap(),
    );
    let output = fixture.run(&["review", "record", "demo.rule", "report.json"]);
    assert!(
        output.status.success(),
        "{}",
        String::from_utf8_lossy(&output.stderr)
    );
    assert!(fixture.run(&["check"]).status.success());
    assert!(
        !fixture
            .run(&["review", "record", "demo.rule"])
            .status
            .success()
    );
}
}

See more source ↗

Implemented sage_meta::initial_context_preserves_instructions_and_exact_uniform_fragments

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

#![allow(unused)]
fn main() {
#[test]
#[sage::test(meta.reviews.input_format)]
#[sage::test(meta.reviews.input_fragments)]
#[sage::test(meta.reviews.fragment_format)]
#[sage::test(meta.reviews.review_instructions)]
#[sage::test(meta.reviews.review_scope)]
#[sage::test(meta.reviews.source_representation)]
#[sage::test(meta.reviews.preparation)]
fn initial_context_preserves_instructions_and_exact_uniform_fragments() {
    let fixture = Fixture::new();
    let instructions = vec![
        "Check all scenarios.\nKeep this newline.".into(),
        "Account for TODO rationale.".into(),
    ];
    let input = review::start(&fixture.0, "demo.rule", instructions.clone()).unwrap();
    assert_eq!(input.coordinator_instructions, instructions);
    assert_eq!(input.prompt, review::PROMPT);
    assert_eq!(input, fixture.input());
    let claim = input
        .fragments
        .iter()
        .find(|f| matches!(&f.selector, Selector::Claim { anchor_id } if anchor_id == "demo.rule"))
        .unwrap();
    assert_eq!(claim.path, "md/design/README.md");
    assert_eq!(claim.contents.join("\n"), "The result is four.");
    let implementation = input
        .fragments
        .iter()
        .find(|f| f.path == "src/behavior.rs" && matches!(f.selector, Selector::WholeFile))
        .unwrap();
    assert_eq!(
        implementation.contents.join("\n"),
        std::fs::read_to_string(fixture.0.join("src/behavior.rs")).unwrap()
    );
    let test = input
        .fragments
        .iter()
        .find(|f| matches!(f.selector, Selector::Test { .. }))
        .unwrap();
    assert_eq!(test.path, "src/tests.rs");
    assert_eq!(test.contents.join("\n"), TEST);
    assert!(
        !input
            .fragments
            .iter()
            .any(|f| f.path == "src/tests.rs" && matches!(f.selector, Selector::WholeFile))
    );
    assert_eq!(input.implementations.len(), 1);
    assert_eq!(input.implementations[0].file, "src/behavior.rs");
    assert_eq!(input.implementations[0].status, TestStatus::Ordinary);
    assert_eq!(input.tests.len(), 1);
}
}

See more source ↗

Review: Accepted · Codex /root/anchor_094.

Fresh complete followup assessment of meta.reviews.review_instructions. Saved and read prior inputs/report before start; recaptured the fixture and full review-design dependencies and compared all fragments. The only change is a placeholder_status association comment before test inventory construction in review.rs. The full claim, main.rs, both annotated tests, fixture helpers and design context are unchanged. No instruction handling behavior changed.

The complete claim requires exact preservation of the verification prompt and all additional coordinator instructions as recorded context, including instructions which do not originate in a source file. Both ordinary implementation associations remain sufficient. inventory constructs ReviewInput.prompt directly from PROMPT. review::start accepts owned Vec<String>, assigns it directly to coordinator_instructions, serializes the complete input to input.json and returns that input; there is no trimming, reordering or source-file requirement. The CLI review handler reads an optional instructions file with read_to_string and forwards its unchanged contents as one vector element, while no-instruction startup passes an empty vector. The output shown to the reviewer serializes the same returned input. capture_read appends fragments without replacing these context fields; recording consumes the saved input and writes output/summary rather than rewriting the context. The new status marker does not intersect these paths.

Both associated tests were read fully. initial_context_preserves_instructions_and_exact_uniform_fragments supplies two runtime strings directly, including an embedded newline, asserts exact instruction-vector equality and order, exact prompt equality with PROMPT, and equality between returned and deserialized persisted input. This exercises the non-source instruction case and detects normalization, loss or reordering. Its source-fragment assertions show context coexists with actual captured source. cli_start_and_record_roundtrip_exact_saved_input writes multiline instructions, invokes the actual executable with --instructions, requires successful startup and exact stdout/persisted-input equality, and asserts the precise instruction string including newline. It then records a report, requires success/check acceptance and rejects malformed record invocation. The captured Fixture helper constructs actual files and invokes the real executable; its input helper deserializes input.json, so equality is not tautological. There are no TODO/N/A implementation or test entries and no deferred requirement.

The comment-only delta was checked against the full prior assessment and all current claim aspects; no other relied-on inputs changed. This is source assessment with fresh start/read/record, not claimed test execution. No source edits or test-suite reruns were performed, and no requested edits remain.

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