forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent-continuity-gauntlet.sh
More file actions
executable file
·65 lines (62 loc) · 3.65 KB
/
Copy pathagent-continuity-gauntlet.sh
File metadata and controls
executable file
·65 lines (62 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
# Agent continuity gauntlet — standing INV-6 smoke test for the desktop agent refactor.
#
# LIVE suites (this script) cover bridge/LLM continuity on a named bundle.
# HERMETIC INV-6 write-path rules (stage/promote single-writer, floating snapshot
# alias, open-by-id hydrate, viewport SoT) live in Swift unit tests gated by
# agent-logic-harness.sh + gauntlet --self-check. See AGENTS.md →
# "Live gauntlet vs hermetic INV-6 coverage".
#
# Drives a named omi-* bundle through:
# 0. (non-prod) clear kernel main_chat turns to avoid stale model-visible history
# 1. typed main-chat turn
# 2. PTT hub turn that must blind-recall the typed marker, then persist a PTT marker
# 3. a second PTT turn that must blind-recall the first PTT marker
# 4. typed follow-up that must see the PTT turn
# 4a. exact #9515 PTT request → one child → successful get_memories;
# continue that same child session and require get_memories to succeed again
# 4b. background agent spawn (spawn_agent)
# 5. status query about that spawned agent
# 7. floating pill spawn → cross-surface blind recall (PTT + typed)
# R. optional resilience suite: startup/bad-state bridge + R3 race + R4 subagent
#
# Repeated runs on one bundle pollute model-visible history even though R8 per-run
# nonces protect harness assertions. Step 0 clears kernel turns via the real bridge.
#
# Evidence bundle (timestamped under desktop/macos/.harness/agent-continuity-gauntlet/):
# per-step user/assistant text, QueryTracer excerpts, runtime sqlite path+hash,
# owner-scoped run/tool-ledger inspections, zero-legacy/JSONL scan, app log
# excerpt, automation snapshots, optional agent-swift screenshot.
#
# Prerequisites (full E2E):
# - macOS with a running named test bundle, e.g.:
# cd desktop/macos && OMI_APP_NAME=omi-gauntlet OMI_SKIP_TUNNEL=1 ./run.sh
# - Signed-in session (./run.sh seeds auth; or omi-auth-seed.sh … "/Applications/omi-gauntlet.app")
# - LLM / realtime credentials available (BYOK or Omi account quota)
# - Optional: brew install beastoin/tap/agent-swift (screenshots; gauntlet still runs without it)
#
# Usage:
# cd desktop/macos && ./scripts/agent-continuity-gauntlet.sh
# ./scripts/agent-continuity-gauntlet.sh --self-check # validate hooks only
# ./scripts/agent-continuity-gauntlet.sh --suite prompts # fast typed-only prompt probes (P1-P4, including live public-web)
# ./scripts/agent-continuity-gauntlet.sh --suite continuity # steps 1-3 only (includes PTT)
# ./scripts/agent-continuity-gauntlet.sh --suite agents # exact voice-memory authority + agent probes
# ./scripts/agent-continuity-gauntlet.sh --suite evidence # real speech + visual evidence journeys
# ./scripts/agent-continuity-gauntlet.sh --suite resilience # startup/resilience probes (R1-R4)
# ./scripts/agent-continuity-gauntlet.sh --suite all # core + prompt + resilience probes
# OMI_AUTOMATION_PORT=47778 ./scripts/agent-continuity-gauntlet.sh --bundle-id com.omi.omi-gauntlet
# ./scripts/agent-continuity-gauntlet.sh --turn-timeout-ms 240000
#
# Release-candidate manual QA: run --suite resilience first for startup edges,
# then --suite all for the full canonical continuity + resilience pass.
#
# Also run via:
# ./scripts/agent-logic-harness.sh --with-gauntlet
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
DESKTOP_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
if [[ "$(uname -s)" != "Darwin" ]]; then
echo "agent-continuity-gauntlet: full E2E requires macOS; running self-check only." >&2
exec python3 "$SCRIPT_DIR/agent-continuity-gauntlet-lib.py" --self-check
fi
exec python3 "$SCRIPT_DIR/agent-continuity-gauntlet-lib.py" "$@"