Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

requirements.test-coverage.guidance.artifacts

Requirements index · View definition

evidence Valid

Requirement

Habeas’s bundled agent instructions MUST tell agents that coverage artifacts under cite requirements.test-coverage.storage, including profiles, reports, and captured source snapshots, are disposable build output and MUST NOT be staged or committed to Git.

Rationale

Obligation. requirements.test-coverage.guidance.artifacts has one testable obligation. The bundled agent instructions must tell agents that coverage artifacts are disposable build output. The text names profiles, reports and captured source snapshots under the Cargo target directory, as defined by requirements.test-coverage.storage. It also requires that agents be told not to stage or commit them to Git. This is a documentation-content requirement, so the right test checks the shipped text.

Test. tests/authoring_cli.rs#fn[bundled_skills_default_to_process_coverage_and_keep_artifacts_disposable] is marked {test} for this requirement. It reads the real bundled skill text, collapsed for line wrapping, through bundled_skill. The assets/skills/*/SKILL.md files are included at compile time with include_str!, as is the approved-implementation SOP.

Mapping.

  • Every skill that covers coverage. For habeas, habeas-evidence and habeas-bootstrap-requirements, the test asserts the text contains “disposable”, “Cargo target directory” and a case-insensitive “never stage or commit”. These are the skills that mention habeas coverage. I confirmed this with a search of assets.
  • The habeas skill, the home of the topic. The test asserts “Profiles, reports, and captured source” and “target/habeas/coverage/”. The actual sentence in assets/skills/habeas/SKILL.md#section[Habeas]/section[Testing%20and%20coverage%20artifacts] reads “Profiles, reports, and captured source under the Cargo target directory … are disposable build artifacts. Never stage or commit them to Git.” So the enumerated artifact kinds, the disposability statement and the do-not-commit instruction are all asserted.
  • The other two skills. They are checked for the same phrases and for the exact referral. habeas-evidence and habeas-bootstrap-requirements say “…never stage or commit disposable coverage artifacts in the Cargo target directory.” They also say to follow the habeas skill’s “Testing and coverage artifacts” section, and the test asserts that referral phrase.
  • The approved-implementation SOP. The test asserts the full sentence “profiles, reports, and source snapshots under the Cargo target directory are disposable build output: never stage or commit them to Git”. This covers the other bundled agent instruction.

Possible weakness. The phrase checks in the three skills are independent substring checks, not tied into one sentence. The test would pass if the “never stage or commit” phrase were moved elsewhere in the same skill. That is a hypothetical rewording risk, not a missing obligation. The test checks the phrases the requirement needs, and the SOP and the other two skills assert the exact sentence. No separate boundary, failure case or mode is named by the requirement.

Other points.

  • The cited requirements.test-coverage.storage text (the target/habeas/coverage/ location) is checked through the target/habeas/coverage/ assertion on the home skill.
  • No {fixme} acknowledgments exist or are needed.
  • Obligations about storage behavior itself belong to requirements.test-coverage.storage, not this subject.

I found no gap.

Inputs

Tests

Input 3: outline tests/authoring_cli.rs fn[bundled_skills_default_to_process_coverage_and_keep_artifacts_disposable]
// {test}`requirements.test-coverage.guidance`
// {test}`requirements.test-coverage.guidance.doctests`
// {test}`requirements.test-coverage.guidance.artifacts`
#[test]
fn bundled_skills_default_to_process_coverage_and_keep_artifacts_disposable() {
    for name in ["habeas", "habeas-evidence", "habeas-bootstrap-requirements"] {
        let text = bundled_skill(name)
            .split_whitespace()
            .collect::<Vec<_>>()
            .join(" ");
        for required in [
            "`habeas coverage`",
            "`cargo nextest`",
            "focused runs",
            "`cargo test --doc --workspace`",
            "disposable",
            "Cargo target directory",
        ] {
            assert!(text.contains(required), "{name} omits {required}");
        }
        assert!(
            text.contains("by default") || text.contains("default to"),
            "{name}"
        );
        assert!(
            text.to_lowercase().contains("never stage or commit"),
            "{name}"
        );
        if name != "habeas" {
            assert!(text.contains("Follow the habeas skill's \"Testing and coverage artifacts\""));
        }
    }
    let home = bundled_skill("habeas");
    assert_text(
        "default coverage directive",
        &collapse(&home),
        &[
            "Use `habeas coverage` by default for every Rust unit and integration test run, including focused runs (`habeas coverage -- -E 'test(name)'`)",
            "The workflow uses `cargo nextest` for parallel process runs and retains independent process coverage",
            "Run doctests separately with `cargo test --doc --workspace`",
        ],
    );
    for name in ["habeas-evidence", "habeas-bootstrap-requirements"] {
        assert_text(
            name,
            &collapse(&bundled_skill(name)),
            &[
                "Follow the habeas skill's \"Testing and coverage artifacts\": default to `habeas coverage` for unit, integration and focused runs through `cargo nextest`",
                "run doctests separately with `cargo test --doc --workspace`",
            ],
        );
    }
    assert_text(
        "approved implementation SOP",
        &collapse(include_str!("../agent-sops/approved-implementation.sop.md")),
        &[
            "Use `cargo habeas coverage -- <nextest arguments>` for every Rust unit and integration test run, including focused or filtered runs",
            "It executes parallel processes through `cargo nextest` and retains coverage for each process",
            "Run doctests separately with `cargo test --doc --workspace`",
            "profiles, reports, and source snapshots under the Cargo target directory are disposable build output: never stage or commit them to Git",
        ],
    );
    for required in [
        "Profiles, reports, and captured source",
        "cargo install cargo-nextest --locked",
        "rustup component add llvm-tools-preview",
        "target/habeas/coverage/",
    ] {
        assert!(home.contains(required), "coverage home omits {required}");
    }
}

Referenced definitions

Input 2: requirements selection requirements.test-coverage.storage
:::{req} storage
Coverage runs MUST be stored as disposable build artifacts under
`habeas/coverage/` in the project's Cargo target directory
(`target/habeas/coverage/` with default Cargo settings), retaining earlier runs
until those artifacts are removed. Each run record MUST identify the run,
capture time, command, and test selection, and, when available, the source
revision and whether the source had uncommitted changes.
:::

Other sources

Input 1: requirements selection requirements.test-coverage.guidance.artifacts
:::{req} guidance.artifacts
Habeas's bundled agent instructions MUST tell agents that coverage artifacts
under {cite}`requirements.test-coverage.storage`, including profiles, reports,
and captured source snapshots, are disposable build output and MUST NOT be
staged or committed to Git.
:::