feat: reachability and consumer profiles (SAND-WP-0011)

Add reachability enrichment (tunnel metadata, ops-bridge pointer),
secret_refs boundary resolution, profile.agent-dev and profile.build,
CLI reachability show, API endpoint, consumer smoke scripts, and tests.
This commit is contained in:
2026-06-24 12:54:27 +02:00
parent 7cabf77fb6
commit 1f87be4c6b
20 changed files with 522 additions and 34 deletions

20
scripts/smoke-agent-dev.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Smoke profile.agent-dev — requires SANDBOXER_HOST or defaults via placement.
set -euo pipefail
if [[ -z "${SANDBOXER_HOST:-}" ]]; then
echo "SANDBOXER_HOST not set — using profile placement fallback" >&2
fi
REPO="${SMOKE_REPO:-$(pwd)}"
echo "Smoke: profile.agent-dev repo=$REPO"
STATUS=$(sandboxer create \
--profile profile.agent-dev \
--input "repo=$REPO" \
--actor agt \
--project glas-harness)
ID=$(echo "$STATUS" | python3 -c "import sys,json; print(json.load(sys.stdin)['sandbox_id'])")
echo "Created: $ID"
sandboxer reachability show "$ID"
sandboxer destroy "$ID"
echo "OK: agent-dev smoke"

23
scripts/smoke-build-profile.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Smoke profile.build — requires VM tunnel and optional build-registry-token secret.
set -euo pipefail
if [[ -z "${SANDBOXER_SECRET_BUILD_REGISTRY_TOKEN:-}" ]]; then
echo "SANDBOXER_SECRET_BUILD_REGISTRY_TOKEN not set — skipping live smoke" >&2
exit 0
fi
VM="${SMOKE_VM:-haskell-build}"
TUNNEL_PORT="${SANDBOXER_VM_TUNNEL_PORT:-12222}"
echo "Smoke: profile.build vm=$VM tunnel=$TUNNEL_PORT"
STATUS=$(sandboxer create \
--profile profile.build \
--input "vm=$VM" \
--input "tunnel_port=$TUNNEL_PORT" \
--actor agt \
--project snuggle-inventor)
ID=$(echo "$STATUS" | python3 -c "import sys,json; print(json.load(sys.stdin)['sandbox_id'])")
echo "Created: $ID"
sandboxer reachability show "$ID"
sandboxer destroy "$ID"
echo "OK: build profile smoke"