mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
8061085c89
AO now performs intent snapshots, subject manifests, strict evidence verification, atomic verdict storage, and orphan inspection through the Go binary. The command handler keeps verification separate from presentation so it meets the existing complexity limit. These operations preserve the existing evidence formats, require explicit protected storage where applicable, and run outside a checkout without Python. The unchanged Python implementation remains a developer oracle; agents still provide semantic judgment. Codex and Claude skills now default to a fresh reviewer from the author’s model family. Callers can explicitly request cross-model review or pin its model. Reviewer adapters use a finite caller timeout or remaining deadline instead of a fixed ten-minute default, while retaining output limits and abnormal-termination cleanup. Validation: Go build, vet, tests and race/shuffle tests; 1,334 shell tests; aggregate runner; regeneration check; 72 full-mode gates. Independent checks exercised 84 storage-boundary rejections and 21 evidence operations with an empty PATH. Both canonical and generated RPI reference suites pass all 48 tests after updating the migrated oracle import without weakening assertions. Change-sensitive checks explicitly compare the final committed candidate with the original PR base. Linux, Windows, installer, security, and required summary checks are green.
32 lines
1.6 KiB
Bash
Executable File
32 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# check-verdict-contract-corpus.sh — cross-language verdict.v2 contract gate.
|
|
#
|
|
# Runs the shared golden corpus (tests/fixtures/verdict-contract/cases/)
|
|
# through all three implementations of the contract:
|
|
# 1. the JSON schema (schemas/verdict.v2.schema.json, via python jsonschema);
|
|
# 2. the developer-only Python reference writer/validator (skills/validate/tests/validate.py);
|
|
# 3. the Go evidence reader (cli/internal/verdictcheck).
|
|
# A case any implementation judges differently from the corpus expectation is
|
|
# a contract fork and fails this check.
|
|
#
|
|
# FAIL-CLOSED: a PASS from this gate must prove all THREE legs actually ran —
|
|
# the JSON schema, the Python validator, and the Go reader. A missing tool is a
|
|
# hard failure, never a silent skip that still prints PASS. (Previously a
|
|
# missing python3 exited 0 and a missing go printed WARN+PASS, so a green here
|
|
# could mean "nothing checked".)
|
|
# shellcheck disable=SC1007
|
|
. "$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/lib/preamble.sh"
|
|
|
|
# require_cmd (from preamble.sh) prints a clear error and exits non-zero when the
|
|
# command is absent — turning each absent leg into a fail-closed error.
|
|
require_cmd python3
|
|
require_cmd go
|
|
|
|
# CONTRACT_CORPUS_REQUIRE_SCHEMA=1 makes the Python harness fail (not skip) when
|
|
# jsonschema is unavailable, so the schema leg is proven to have run too.
|
|
CONTRACT_CORPUS_REQUIRE_SCHEMA=1 python3 "$REPO_ROOT/skills/validate/tests/check_contract_corpus.py"
|
|
|
|
(cd "$REPO_ROOT/cli" && go test ./internal/verdictcheck ./internal/evidence -run TestGoldenCorpus -count=1)
|
|
|
|
echo "check-verdict-contract-corpus: PASS (schema + python + go all ran)"
|