feat: migrate View 0.3.0 to marqdo 3.0.0-rc.4 contracts
ci/woodpecker/push/woodpecker Pipeline was successful
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.
This commit is contained in:
1 parent
7b34199c96
commit
340ecb035f
108 files changed
+13928
-6461
No files matched your search
@@ -2,6 +2,10 @@
|
||||
# Install the built bundle with a frozen marqdo CLI into an isolated tool home,
|
||||
# then prove the command is served by this program (not by the Core).
|
||||
#
|
||||
# The frozen CLI is the current Tool revision 1 baseline: it injects
|
||||
# MARQDO_API_REVISION=1 and MARQDO_BIN only, with no legacy
|
||||
# MARQDO_PROTOCOL_* negotiation variables.
|
||||
#
|
||||
# Usage: MARQDO_BIN=/abs/path/marqdo scripts/install-smoke.sh [tool.json]
|
||||
set -euo pipefail
|
||||
|
||||
@@ -16,6 +20,19 @@ if [[ ! -x "$MARQDO_BIN" ]]; then
|
||||
fi
|
||||
before="$(sha256sum "$MARQDO_BIN" | cut -d' ' -f1)"
|
||||
|
||||
# The packaged manifest must declare the current exact contracts.
|
||||
python3 - "$manifest" <<'PY'
|
||||
import json
|
||||
import sys
|
||||
|
||||
tool = json.load(open(sys.argv[1]))
|
||||
assert tool["schema"] == "marqdo.cli-tool", tool
|
||||
assert tool["schema_version"] == 1, tool
|
||||
assert "compatibility" not in tool, "retired compatibility field present"
|
||||
assert tool["requires"] == {"api_revision": 1, "analysis": 3, "observation": 1}, tool["requires"]
|
||||
print("manifest: PASS (revision 1 requires api_revision=1 analysis=3 observation=1)")
|
||||
PY
|
||||
|
||||
mkdir -p "$repo_root/dist"
|
||||
tool_home="$(mktemp -d "$repo_root/dist/smoke-tool-home.XXXXXX")"
|
||||
cleanup() {
|
||||
@@ -25,7 +42,7 @@ trap cleanup EXIT
|
||||
|
||||
export MARQDO_TOOL_HOME="$tool_home"
|
||||
"$MARQDO_BIN" tool install "$manifest" >/dev/null
|
||||
"$MARQDO_BIN" tool list | grep -q 'view'
|
||||
"$MARQDO_BIN" tool list | grep -q '^view '
|
||||
help="$("$MARQDO_BIN" view --help)"
|
||||
grep -q 'marqdo-view' <<<"$help"
|
||||
grep -q 'export' <<<"$help"
|
||||
@@ -33,10 +50,39 @@ grep -q 'verify' <<<"$help"
|
||||
version="$("$MARQDO_BIN" view --version)"
|
||||
grep -q 'marqdo-view' <<<"$version"
|
||||
|
||||
# Prove the current dispatch environment contract: the CLI injects
|
||||
# MARQDO_API_REVISION=1 (and MARQDO_BIN), never the retired negotiation vars.
|
||||
probe_dir="$tool_home/probe"
|
||||
mkdir -p "$probe_dir/bin"
|
||||
cat >"$probe_dir/bin/api-probe" <<'PROBE'
|
||||
#!/usr/bin/env bash
|
||||
printf 'MARQDO_API_REVISION=%s\n' "${MARQDO_API_REVISION:-<unset>}"
|
||||
printf 'MARQDO_BIN=%s\n' "${MARQDO_BIN:-<unset>}"
|
||||
printf 'retired=%s\n' "${MARQDO_PROTOCOL_ANALYSIS:-}${MARQDO_PROTOCOL_TRACE:-}${MARQDO_TOOL_PROTOCOL:-}"
|
||||
PROBE
|
||||
chmod 755 "$probe_dir/bin/api-probe"
|
||||
cat >"$probe_dir/tool.json" <<'PROBE_JSON'
|
||||
{
|
||||
"schema": "marqdo.cli-tool",
|
||||
"schema_version": 1,
|
||||
"name": "api-probe",
|
||||
"version": "0.0.1",
|
||||
"command": "api-probe",
|
||||
"entrypoint": "bin/api-probe",
|
||||
"requires": {"api_revision": 1}
|
||||
}
|
||||
PROBE_JSON
|
||||
"$MARQDO_BIN" tool install "$probe_dir/tool.json" >/dev/null
|
||||
probe="$("$MARQDO_BIN" api-probe)"
|
||||
grep -qx 'MARQDO_API_REVISION=1' <<<"$probe"
|
||||
grep -q '^MARQDO_BIN=/' <<<"$probe"
|
||||
grep -qx 'retired=' <<<"$probe"
|
||||
"$MARQDO_BIN" tool remove api-probe >/dev/null
|
||||
|
||||
after="$(sha256sum "$MARQDO_BIN" | cut -d' ' -f1)"
|
||||
if [[ "$before" != "$after" ]]; then
|
||||
echo "error: frozen core binary changed during install smoke test" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "install-smoke: PASS (core sha256 $before unchanged, tool home $tool_home)"
|
||||
echo "install-smoke: PASS (view installed/dispatched, api_revision 1 injected, core sha256 $before unchanged, tool home $tool_home)"
|
||||
Reference in new issue
Block a user