Define the implementation blueprint for the sparkctl rust-validate subcommand. This subcommand executes local crate quality checks and outputs formatted validation status results.
- Command:
sparkctl rust-validate - Actions Wrapped:
cargo fmt --all --checkcargo checkcargo testcargo clippy -- -D warnings
- Output: Outputs a clear block stating pass/fail status for each test runner step.
- Exit Code: Exits with status
0if all checks pass, and a non-zero code if any subcommand fails.
- No Git Access: The command must not run any git command or perform git operations.
- No Network Usage: Work must occur 100% offline.
- No File Mutations: The command must verify configurations but not modify source code files.
- No Directory Escapes: Do not scan folders outside the sandbox directory.
- No Compliance Claims: No claims regarding EU AI Act or official SPARK schemas compatibility.
- No Raw Payload Dumps: Ensure logs do not print original payload fields (applicant, recommendation, notes).
- Execution Directory: The tool must execute local cargo commands within the
agy7rustworkspace directory root path. - Diagnostics Formatting: Output must show a clean list of checked subcommands with status indicator tags (e.g.
[FMT] PASS,[TEST] FAIL).
- Validation runs local cargo subcommands only via std::process::Command.
- Environment variables or randomized system inputs must not affect check calculations.
Before completion, verification must confirm:
cargo fmt --all --check
cargo check
cargo test
cargo clippy -- -D warnings
sparkctl doctor
sparkctl rust-validateStop implementation and return blocked if:
- Cargo command execution requires external registry updates or internet connections.
- Validation checks require accessing remote credentials or secrets.
PHASE: Phase 4C sparkctl rust-validate implementation
STATUS: success | blocked
COMMANDS_RUN:
- ...
FILES_CHANGED:
- ...
RUST_VALIDATE_OUTPUT:
- ...
VALIDATION:
- ...
RISKS:
- ...
NEXT:
- Phase 4C audit/snapshot only after approval
- No blocking risks found in the validated scope.