ci/woodpecker/push/woodpecker Pipeline was successful
Replace the retired rc.2 Analysis v2/Trace v2/Execution Events v1 stack with the
single current contract family:
- Analysis v3 (ADR-0069 public boundary): one check --emit artifact carries the
exact source, Markdown AST, heading scopes (heading_span + complete span),
anchors, state-bearing references, calls, resources and diagnostics; the old
revision-3 shape is rejected with a rebuild hint.
- Observation v1: one run/call --output jsonl stream (+ atomic
--observation-file snapshot) decoded by one decoder and projected into the
reader/SSE/export layers; stale/malformed/truncated/incomplete never render
as success.
- CLI Tool revision 1: requires {api_revision:1, analysis:3, observation:1},
product range >=3.0.0-rc.3,<4.0.0, only MARQDO_BIN and
MARQDO_API_REVISION are consumed.
- Remove compatibility branches, retired flags/env vars and duplicate decoders;
re-record Analysis v3 and Observation v1 fixtures; rewrite contract,
integration and security tests (173 passing locally).
- Add check-no-legacy/check-docs/check-observation gates, rc.4 pins in the
CI pipelines, 0.3.0 Tool bundle and evidence manifest support.
See issues #4, #5 and #6; acceptance baseline is CLI source
452e9a32bd9e40dba427d4180691c58bab74449e, archive
9c3f166b5e5b8840d39d10019074e4e1c42432fc23e26c69670e64fdcf4e15d8.
65 lines
1.8 KiB
Bash
Executable File
65 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Prove a frozen marqdo release binary is byte-identical before and after a
|
|
# command sequence (issue #4/#5 release evidence).
|
|
#
|
|
# Usage:
|
|
# scripts/verify-frozen-cli.sh /abs/path/marqdo [-- EXPECTED_SHA256] -- CMD [ARGS...]
|
|
# EXPECTED_SHA256=<hex> scripts/verify-frozen-cli.sh /abs/path/marqdo -- CMD [ARGS...]
|
|
# scripts/verify-frozen-cli.sh /abs/path/marqdo # version/SHA report only
|
|
#
|
|
# The script never rebuilds or modifies the CLI. It records the version, the
|
|
# SHA-256 before/after, and exits non-zero if the SHA changes or if an expected
|
|
# SHA (argument or EXPECTED_SHA256 env) does not match.
|
|
set -euo pipefail
|
|
|
|
core="${1:-}"
|
|
if [[ -z "$core" ]]; then
|
|
echo "usage: $0 /abs/path/marqdo [-- EXPECTED_SHA256] -- CMD [ARGS...]" >&2
|
|
exit 2
|
|
fi
|
|
shift
|
|
|
|
expected="${EXPECTED_SHA256:-}"
|
|
if [[ "${1:-}" == "--" && ( "${2:-}" =~ ^[0-9a-f]{64}$ ) ]]; then
|
|
expected="$2"
|
|
shift 2
|
|
fi
|
|
if [[ "${1:-}" == "--" ]]; then
|
|
shift
|
|
fi
|
|
|
|
if [[ ! -x "$core" ]]; then
|
|
echo "error: frozen CLI is not executable: $core" >&2
|
|
exit 2
|
|
fi
|
|
|
|
sha_before="$(sha256sum "$core" | cut -d' ' -f1)"
|
|
|
|
if [[ -n "$expected" && "$expected" != "$sha_before" ]]; then
|
|
echo "error: frozen CLI SHA-256 mismatch" >&2
|
|
echo " expected: $expected" >&2
|
|
echo " actual: $sha_before" >&2
|
|
exit 1
|
|
fi
|
|
|
|
version_line="$("$core" --version)"
|
|
command_status=0
|
|
if [[ $# -gt 0 ]]; then
|
|
"$@" || command_status=$?
|
|
fi
|
|
|
|
sha_after="$(sha256sum "$core" | cut -d' ' -f1)"
|
|
if [[ "$sha_before" != "$sha_after" ]]; then
|
|
echo "error: frozen CLI binary changed during the command" >&2
|
|
echo " before: $sha_before" >&2
|
|
echo " after: $sha_after" >&2
|
|
exit 1
|
|
fi
|
|
|
|
printf 'verify-frozen-cli: PASS\n'
|
|
printf ' path: %s\n' "$core"
|
|
printf ' version: %s\n' "$version_line"
|
|
printf ' sha256: %s (unchanged)\n' "$sha_before"
|
|
|
|
exit "$command_status"
|