mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-13 07:12:00 +01:00
fix: fail closed on unusable Codex auth during sandbox auth merge
When reusing a Codex sandbox, the workspace-restore step now performs an auth-merge check before adopting the sandbox's auth.json. The merge fails closed when: - host or sandbox Codex auth is unusable (missing token or account) - the subscription payload shapes differ between host and sandbox - subscription account identities do not match Additional hardening: node absence on PATH during the embedded decision script now exits non-zero instead of silently falling through. Co-change comments link parseAuth (the embedded script) to hasUsableAuthPayload (codex-home.ts) so a future auth-format change cannot silently diverge between the two implementations. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
commit
98df214917
3422 files changed
+1614966
No files matched your search
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
# Verify the Docker image builds successfully.
|
||||
# Skips gracefully when docker/podman is not available.
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
# Detect container runtime
|
||||
if command -v docker >/dev/null 2>&1; then
|
||||
RUNTIME=docker
|
||||
elif command -v podman >/dev/null 2>&1; then
|
||||
RUNTIME=podman
|
||||
else
|
||||
echo "SKIP: neither docker nor podman found — skipping build test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Verify the daemon is reachable (docker may be installed but not running)
|
||||
if ! "$RUNTIME" info >/dev/null 2>&1; then
|
||||
echo "SKIP: $RUNTIME is installed but not running — skipping build test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
IMAGE_TAG="paperclip-build-test:$$"
|
||||
trap '"$RUNTIME" rmi "$IMAGE_TAG" >/dev/null 2>&1 || true' EXIT
|
||||
|
||||
echo "==> Testing Docker build with $RUNTIME"
|
||||
"$RUNTIME" build \
|
||||
-f "$REPO_ROOT/Dockerfile" \
|
||||
-t "$IMAGE_TAG" \
|
||||
--target production \
|
||||
"$REPO_ROOT"
|
||||
|
||||
echo "==> Verifying key binaries in image"
|
||||
"$RUNTIME" run --rm "$IMAGE_TAG" sh -c '
|
||||
set -e
|
||||
node --version
|
||||
git --version
|
||||
gh --version
|
||||
rg --version
|
||||
python3 --version
|
||||
curl --version | head -1
|
||||
claude --version 2>/dev/null || echo "claude CLI not found (OK in minimal builds)"
|
||||
'
|
||||
|
||||
echo "PASS: Docker build test succeeded"
|
||||
Reference in new issue
Block a user