open-design/.github
lefarcen 2ed93e9c5d
ci: reuse cached docker image and persist pnpm store for agent sandbox (#3074)
* ci: skip docker pull when agent sandbox image is already cached

The agent PR exploration script ran an unconditional `docker pull
"$image"` before `docker run`. Under `set -e`, a transient registry
timeout (the self-hosted runner's network to docker.io is unreliable)
aborts the whole run even when the base image (node:24-bookworm) is
already cached locally — which is what happened on run 26490782540.

Skip the pull entirely when the image is already present, and only pull
when it is missing. This avoids both the failure and the wasted pull
timeout on every run, and keeps a run's base image stable. Refreshing
the cached image is a separate, explicit operation on the runner.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci: persist agent sandbox pnpm store across runs

The pnpm store was placed under $RUNNER_TEMP, which the Actions runner
wipes per job, so every agent exploration re-downloaded all dependencies
from the npm registry — slow, and as fragile as the runner's docker.io
access (the same network class that already broke the docker pull).

Move the store to a persistent host path ($HOME/.cache/agent-pr-explore/
pnpm-store, overridable via OD_SANDBOX_PNPM_STORE) so a warm,
content-addressed store is reused across runs. `rm -rf "$root"` no longer
touches it since it lives outside the per-run root.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 12:49:26 +08:00
..
actions fix(ci): narrow workflow scope and reuse setup steps (#2708) 2026-05-22 18:58:53 +08:00
ISSUE_TEMPLATE docs: point 0.8.0 preview contributors at main (#1846) 2026-05-15 22:37:04 +08:00
screenshots feat(ui): add copy to clipboard functionality for user messages with … (#1669) 2026-05-14 20:19:20 +08:00
scripts ci: reuse cached docker image and persist pnpm store for agent sandbox (#3074) 2026-05-27 12:49:26 +08:00
workflows ci: make agent PR exploration trusted checkout lightweight (#3071) 2026-05-27 04:18:19 +00:00
actionlint.yaml Add sandboxed agent PR exploration (#2604) 2026-05-26 07:52:42 +00:00
pull_request_template.md docs(pr): require user-perspective description and surface area (#1520) 2026-05-13 15:28:05 +08:00