| 1 | #!/usr/bin/env bash |
| 2 | set -euo pipefail |
| 3 | |
| 4 | REPORT_FILE="${GARCARD_SPRINT08_REPORT_FILE:-${PWD}/target/sprint-08-parity-evidence.md}" |
| 5 | RUN_INTERACTIVE="${GARCARD_SPRINT08_RUN_INTERACTIVE:-0}" |
| 6 | ACTION_ID="${GARCARD_SPRINT08_ACTION_ID:-com.mesonbuild.install.run}" |
| 7 | SPRINT07_BASELINE_BACKEND="${GARCARD_SPRINT08_SPRINT07_BASELINE_BACKEND:-stub}" |
| 8 | |
| 9 | mkdir -p "$(dirname "${REPORT_FILE}")" |
| 10 | |
| 11 | timestamp() { |
| 12 | date -u +"%Y-%m-%dT%H:%M:%SZ" |
| 13 | } |
| 14 | |
| 15 | append_section() { |
| 16 | local heading="$1" |
| 17 | { |
| 18 | echo |
| 19 | echo "## ${heading}" |
| 20 | echo |
| 21 | } >>"${REPORT_FILE}" |
| 22 | } |
| 23 | |
| 24 | { |
| 25 | echo "# Sprint 08 Parity Evidence" |
| 26 | echo |
| 27 | echo "- generated_at: $(timestamp)" |
| 28 | echo "- host: $(hostname)" |
| 29 | echo "- action_id: ${ACTION_ID}" |
| 30 | echo |
| 31 | } >"${REPORT_FILE}" |
| 32 | |
| 33 | append_section "Workspace Tests" |
| 34 | cargo test --workspace | tee -a "${REPORT_FILE}" |
| 35 | |
| 36 | append_section "Sprint 04 Reliability Baseline" |
| 37 | ./examples/validate-sprint-04.sh | tee -a "${REPORT_FILE}" |
| 38 | |
| 39 | append_section "Sprint 07 Lifecycle Baseline (Non-Interactive)" |
| 40 | GARCARD_SPRINT07_BACKEND="${SPRINT07_BASELINE_BACKEND}" \ |
| 41 | GARCARD_SPRINT07_RUN_PKCHECK=0 \ |
| 42 | ./examples/validate-sprint-07.sh | tee -a "${REPORT_FILE}" |
| 43 | |
| 44 | if [[ "${RUN_INTERACTIVE}" == "1" ]]; then |
| 45 | append_section "Sprint 07 Lifecycle Interactive Loop" |
| 46 | if command -v pkcheck >/dev/null 2>&1; then |
| 47 | GARCARD_SPRINT07_RUN_PKCHECK=1 \ |
| 48 | GARCARD_SPRINT07_ACTION_ID="${ACTION_ID}" \ |
| 49 | ./examples/validate-sprint-07.sh | tee -a "${REPORT_FILE}" |
| 50 | else |
| 51 | echo "pkcheck not found; interactive loop skipped" | tee -a "${REPORT_FILE}" |
| 52 | fi |
| 53 | else |
| 54 | append_section "Interactive Loop Status" |
| 55 | echo "Skipped interactive parity loop (set GARCARD_SPRINT08_RUN_INTERACTIVE=1 to enable)." \ |
| 56 | | tee -a "${REPORT_FILE}" |
| 57 | fi |
| 58 | |
| 59 | append_section "Next Manual Matrix Steps" |
| 60 | { |
| 61 | echo "1. Open examples/sprint-08-parity-matrix.md." |
| 62 | echo "2. Record PASS/FAIL and attach evidence pointers from this report." |
| 63 | echo "3. Add daemon log references for success/failure/cancel/timeout and retention coverage." |
| 64 | } | tee -a "${REPORT_FILE}" |
| 65 | |
| 66 | echo "Sprint 08 parity baseline complete." |
| 67 | echo "Evidence report: ${REPORT_FILE}" |