Files
openclaw/scripts/mantis/telegram-visible-collect-proof.sh
Ayaan Zaidi b41d5293b2 refactor(mantis): give Codex open-ended Telegram proof control (#128197)
* refactor(mantis): replace Telegram proof compiler with frozen visible replay

* refactor(mantis): let Codex own Telegram proof scenarios

* fix(mantis): isolate proof publication

* fix(mantis): bind baseline cache to revision

* chore(mantis): remove stale scenario-designer wording

* fix(mantis): align readable worktrees with trusted proof

* fix(mantis): register proof collector tooling

* refactor(mantis): keep collector functions private

* fix(mantis): publish agent-selected Telegram proof

* fix(mantis): trim proof media to final turn

* fix(mantis): fence lanes before evidence collection

* fix(mantis): verify lane termination before unlock
2026-08-24 11:47:26 +05:30

29 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
output_root="$GITHUB_WORKSPACE/$MANTIS_OUTPUT_DIR"
trusted_root="${RUNNER_TEMP}/mantis-trusted-evidence-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
test ! -e "$trusted_root"
install -d -m 0700 "$trusted_root"
install -m 0400 "$output_root/agent-evidence.json" "$trusted_root/agent-evidence.json"
runner_user="$(id -un)"
runner_group="$(id -gn)"
for lane in baseline candidate; do
sudo install -m 0400 -o "$runner_user" -g "$runner_group" \
"$SESSION_ROOT/${lane}.json" "$trusted_root/${lane}.json"
done
evidence="$trusted_root/evidence"
node scripts/mantis/telegram-visible-proof.mjs collect \
--agent-manifest "$trusted_root/agent-evidence.json" \
--baseline-facts "$trusted_root/baseline.json" \
--baseline-sha "$BASELINE_SHA" \
--candidate-facts "$trusted_root/candidate.json" \
--candidate-sha "$CANDIDATE_SHA" \
--published-root "$SESSION_ROOT/published" \
--output-dir "$evidence"
node scripts/mantis/publish-pr-evidence.mjs \
--manifest "$evidence/mantis-evidence.json" --validate-only true
comparison_status="$(jq -er '.comparison.outcome | select(. == "pass" or . == "fail" or . == "blocked")' "$evidence/mantis-evidence.json")"
echo "comparison_status=$comparison_status" >> "$GITHUB_OUTPUT"
echo "output_dir=$evidence" >> "$GITHUB_OUTPUT"