Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .opencode_web_yolo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ write_default_config() {
# export OPENCODE_WEB_RESTART_POLICY=unless-stopped
# export OPENCODE_WEB_RUN_DETACHED=1
# export OPENCODE_WEB_AUTO_PULL=0
# export OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS=300
# export OPENCODE_WEB_YOLO_IMAGE=opencode_web_yolo:latest
# export OPENCODE_WEB_CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/opencode
# export OPENCODE_WEB_DATA_DIR=${XDG_DATA_HOME:-$HOME/.local/share}/opencode
Expand Down Expand Up @@ -616,6 +617,7 @@ show_health() {
printf '%s\n' " restart_policy=${OPENCODE_WEB_RESTART_POLICY}"
printf '%s\n' " run_detached=${OPENCODE_WEB_RUN_DETACHED}"
printf '%s\n' " auto_pull=${OPENCODE_WEB_AUTO_PULL}"
printf '%s\n' " startup_vacuum_term_timeout_seconds=${OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}"
printf '%s\n' " build_pull=${OPENCODE_WEB_BUILD_PULL}"
printf '%s\n' " build_playwright=${OPENCODE_WEB_BUILD_PLAYWRIGHT}"
printf '%s\n' " build_wrangler=${OPENCODE_WEB_BUILD_WRANGLER}"
Expand Down Expand Up @@ -1045,6 +1047,7 @@ main() {
OPENCODE_WEB_SKIP_UPDATE_CHECK="$(normalize_bool "${OPENCODE_WEB_SKIP_UPDATE_CHECK}")"
OPENCODE_WEB_SKIP_VERSION_CHECK="$(normalize_bool "${OPENCODE_WEB_SKIP_VERSION_CHECK}")"
OPENCODE_WEB_RETENTION_DRY_RUN="$(normalize_bool "${OPENCODE_WEB_RETENTION_DRY_RUN}")"
validate_positive_integer OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS "${OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}"
validate_retention_days
if [ "$OPENCODE_WEB_RETENTION_DAYS" != "0" ]; then
validate_positive_integer OPENCODE_WEB_RETENTION_POLL_SECONDS "${OPENCODE_WEB_RETENTION_POLL_SECONDS}"
Expand Down Expand Up @@ -1114,6 +1117,7 @@ main() {
-e "OPENCODE_WEB_RETENTION_POLL_SECONDS=${OPENCODE_WEB_RETENTION_POLL_SECONDS}"
-e "OPENCODE_WEB_RETENTION_FETCH_TIMEOUT_MS=${OPENCODE_WEB_RETENTION_FETCH_TIMEOUT_MS}"
-e "OPENCODE_WEB_RETENTION_VERIFY_TIMEOUT_MS=${OPENCODE_WEB_RETENTION_VERIFY_TIMEOUT_MS}"
-e "OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS=${OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}"
-e "HOME=${runtime_home}"
-e "XDG_CONFIG_HOME=${runtime_xdg_config}"
-e "XDG_DATA_HOME=${runtime_xdg_data}"
Expand Down Expand Up @@ -1219,6 +1223,7 @@ main() {
printf '%s\n' "restart_policy=${OPENCODE_WEB_RESTART_POLICY}"
printf '%s\n' "run_detached=${OPENCODE_WEB_RUN_DETACHED}"
printf '%s\n' "auto_pull=${OPENCODE_WEB_AUTO_PULL}"
printf '%s\n' "startup_vacuum_term_timeout_seconds=${OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}"
printf '%s\n' "build_pull=${OPENCODE_WEB_BUILD_PULL}"
printf '%s\n' "build_playwright=${OPENCODE_WEB_BUILD_PLAYWRIGHT}"
printf '%s\n' "build_wrangler=${OPENCODE_WEB_BUILD_WRANGLER}"
Expand Down
3 changes: 3 additions & 0 deletions .opencode_web_yolo_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ _opencode_web_retention_dry_run_env="${OPENCODE_WEB_RETENTION_DRY_RUN-}"
: "${OPENCODE_WEB_RUN_DETACHED:=1}"
: "${OPENCODE_WEB_DRY_RUN:=0}"
: "${OPENCODE_WEB_VERBOSE:=0}"
if [ "${OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS+x}" != x ]; then
OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS=300
fi
: "${OPENCODE_WEB_YOLO_REPO:=laurenceputra/opencode_web_yolo}"
: "${OPENCODE_WEB_YOLO_BRANCH:=main}"
: "${OPENCODE_SERVER_USERNAME:=opencode}"
Expand Down
20 changes: 17 additions & 3 deletions .opencode_web_yolo_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${OPENCODE_WEB_YOLO_HOME}/.config}"
XDG_DATA_HOME="${XDG_DATA_HOME:-${OPENCODE_WEB_YOLO_HOME}/.local/share}"
XDG_STATE_HOME="${XDG_STATE_HOME:-${XDG_DATA_HOME}/opencode/state}"
OPENCODE_WEB_RETENTION_DAYS="${OPENCODE_WEB_RETENTION_DAYS-0}"
OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS="${OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS-300}"
STARTUP_VACUUM_BUSY_TIMEOUT_MS=5000
STARTUP_VACUUM_TERM_TIMEOUT_SECONDS=300
STARTUP_VACUUM_KILL_AFTER_SECONDS=5

case "$OPENCODE_WEB_RETENTION_DAYS" in
Expand All @@ -25,6 +25,20 @@ while [ "${OPENCODE_WEB_RETENTION_DAYS#0}" != "$OPENCODE_WEB_RETENTION_DAYS" ];
done
OPENCODE_WEB_RETENTION_DAYS="${OPENCODE_WEB_RETENTION_DAYS:-0}"

case "$OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS" in
''|0*|*[!0-9]*)
printf '%s\n' "[opencode_web_yolo] ERROR: OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS must be a positive integer." >&2
exit 1
;;
esac
if [ "${#OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}" -gt 10 ] || {
[ "${#OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}" -eq 10 ] &&
(( OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS > 2147483647 ))
}; then
printf '%s\n' "[opencode_web_yolo] ERROR: OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS is outside the supported positive integer range." >&2
exit 1
fi

if [ -z "${OPENCODE_SERVER_PASSWORD:-}" ]; then
printf '%s\n' "[opencode_web_yolo] ERROR: OPENCODE_SERVER_PASSWORD must be set and non-empty." >&2
exit 1
Expand Down Expand Up @@ -88,15 +102,15 @@ if [ -f "${opencode_database}" ]; then
printf '%s\n' "[opencode_web_yolo] VACUUM: compacting OpenCode database at ${opencode_database}."
if gosu "${runtime_user}" timeout \
--kill-after="${STARTUP_VACUUM_KILL_AFTER_SECONDS}" \
"${STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}" \
"${OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}" \
sqlite3 \
-cmd ".timeout ${STARTUP_VACUUM_BUSY_TIMEOUT_MS}" \
"${opencode_database}" 'VACUUM;'; then
:
else
vacuum_status=$?
if [ "$vacuum_status" -eq 124 ] || [ "$vacuum_status" -eq 137 ]; then
printf '%s\n' "[opencode_web_yolo] WARNING: startup VACUUM timed out after the ${STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}-second TERM deadline (KILL escalation after ${STARTUP_VACUUM_KILL_AFTER_SECONDS} additional seconds); continuing startup." >&2
printf '%s\n' "[opencode_web_yolo] WARNING: startup VACUUM timed out after the ${OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS}-second TERM deadline (KILL escalation after ${STARTUP_VACUUM_KILL_AFTER_SECONDS} additional seconds); continuing startup." >&2
else
printf '%s\n' "[opencode_web_yolo] WARNING: startup VACUUM failed for ${opencode_database}; continuing startup." >&2
fi
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project are documented here.

## [0.5.0] - 2026-09-20

- Added persistent `OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS` configuration, defaulting to 300 seconds, with bounded positive-integer validation in the wrapper and entrypoint, Docker propagation, and health/dry-run visibility. SQLite's 5000 ms busy timeout and fixed 5-second KILL escalation remain unchanged.

## [0.4.0] - 2026-09-20

- Made the runtime release the owner of the fixed `node:22-slim` base image and `opencode-ai` package, with Node 22 build assertions and image metadata validation.
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Defaults:
- Launch mode: background (`-d`)
- Pull behavior: pull-on-start enabled
- Session retention: disabled by default (`OPENCODE_WEB_RETENTION_DAYS=0`)
- Startup VACUUM TERM timeout: `300` seconds (KILL escalation remains fixed at 5 seconds)

## Authentication Requirement

Expand Down Expand Up @@ -116,6 +117,7 @@ Operator-facing settings:
| `OPENCODE_WEB_RESTART_POLICY` | `unless-stopped` | Docker restart policy applied to the container. |
| `OPENCODE_WEB_RUN_DETACHED` | `1` | Launch mode default. Use `1` for background mode or `0` for attached runs unless overridden by flags. |
| `OPENCODE_WEB_AUTO_PULL` | `1` | Persistent pull-on-start setting. Set to `0` in `~/.opencode_web_yolo/config` to disable ordinary automatic pulls; compatibility rebuilds still force Docker `--pull`. |
| `OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS` | `300` | Persistent positive integer timeout for startup SQLite VACUUM's GNU `timeout` TERM deadline; values above `2147483647` are rejected. The SQLite busy timeout remains 5000 ms and KILL escalation remains fixed at 5 seconds. |
| `OPENCODE_WEB_YOLO_REPO` | `laurenceputra/opencode_web_yolo` | GitHub repo used for wrapper self-update checks and bootstrap downloads. |
| `OPENCODE_WEB_YOLO_BRANCH` | `main` | Branch used with `OPENCODE_WEB_YOLO_REPO` for update checks and bootstrap downloads. |
| `OPENCODE_WEB_SKIP_UPDATE_CHECK` | `0` | Set to `1` to skip the wrapper's remote `VERSION` check and self-update flow. |
Expand Down Expand Up @@ -164,11 +166,14 @@ The wrapper also pins runtime env (`HOME`, `XDG_CONFIG_HOME`, `XDG_DATA_HOME`, `

On every container startup, after the mapped-user ownership and XDG setup, the entrypoint checks
`$XDG_DATA_HOME/opencode/opencode.db`. If that database exists, it runs `VACUUM;` with `sqlite3` as
the mapped runtime user, waiting up to 5000 ms for a lock. GNU `timeout` sends TERM after 300
seconds and sends KILL 5 seconds later if VACUUM is still running. A missing database is skipped
the mapped runtime user, waiting up to 5000 ms for a lock. GNU `timeout` sends TERM after the
configured `OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS` deadline (300 seconds by default)
and sends KILL 5 seconds later if VACUUM is still running. A missing database is skipped
without creating one. Vacuum can add startup latency and temporarily require additional disk space
while SQLite rewrites the database. If it cannot vacuum because of a lock, permissions, corruption,
disk space, timeout, or another error, startup prints a warning and continues.
disk space, or another non-timeout error, startup prints a concise warning and continues. Timeout-
expiry warnings include the effective TERM deadline. `health` and `--dry-run` show the effective TERM
timeout, and the wrapper passes it into Docker.

Startup VACUUM is separate from weekly retention. The retention worker remains an authenticated
OpenCode API worker: it does not use raw SQL or manually modify SQLite WAL, SHM, or journal
Expand Down
4 changes: 2 additions & 2 deletions TECHNICAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Entrypoint behavior:
- avoids recursive ownership operations across read-only mount boundaries.
- installs passwordless sudo policy for mapped user.
- executes command via `gosu`.
- after ownership and HOME/XDG setup, checks `${XDG_DATA_HOME}/opencode/opencode.db`; when present, runs `VACUUM;` through `sqlite3` via `gosu` as the mapped user with a 5000 ms busy timeout. GNU `timeout` sends TERM after 300 seconds and KILL 5 seconds later if the command remains alive. Missing databases are skipped without creation. Vacuum failures or timeout expiry warn to stderr and do not block either direct or retention-supervised OpenCode launch. This startup maintenance is separate from retention, whose worker never uses raw SQL or mutates SQLite WAL/SHM files.
- after ownership and HOME/XDG setup, checks `${XDG_DATA_HOME}/opencode/opencode.db`; when present, runs `VACUUM;` through `sqlite3` via `gosu` as the mapped user with a 5000 ms busy timeout. `OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS` is a persistent positive integer bounded to `2147483647`, defaults to 300, and controls GNU `timeout`'s TERM deadline; KILL escalation remains fixed at 5 seconds. Missing databases are skipped without creation. Ordinary vacuum failures warn concisely, while timeout-expiry warnings include the effective TERM deadline; neither blocks direct or retention-supervised OpenCode launch. This startup maintenance is separate from retention, whose worker never uses raw SQL or mutates SQLite WAL/SHM files.
- when retention is enabled, starts OpenCode, waits for authenticated `/global/health`, and supervises a mapped-user scheduler; TERM/INT are forwarded and the app exit status is returned.
- Docker starts `tini -s -g` so orphaned descendants are reaped and TERM/INT are forwarded to the child process group. The supervisor preserves the received signal when forwarding it to the app.
- does not inject unsupported OpenCode CLI flags for instruction loading.
Expand Down Expand Up @@ -211,5 +211,5 @@ Tests and CI assert:
- retention configuration, marker path, API schedule, and dry-run state.
- retention API compatibility, active-session skipping, serial deletion, marker retry semantics, and supervisor signal/exit behavior.
- Docker image build and runtime binary presence (`gh`, `git`, `ssh`, `sqlite3`), including a successful `opencode serve --help` check.
- startup VACUUM behavior for existing and missing databases, custom XDG data paths, mapped-user invocation, SQLite timeout plus TERM/KILL escalation, warning-only failures, and continued application execution.
- startup VACUUM behavior for existing and missing databases, custom XDG data paths, mapped-user invocation, the configurable bounded TERM timeout plus fixed 5-second KILL escalation, warning-only failures, and continued application execution.
- `VERSION` semver format and runtime-file/version drift guard.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.0
0.5.0
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Use this matrix when authoring tests under `tests/`.
- Persistence assertions verify state files are written to mounted host path, not only any in-container path.
- Docs contract check ensures Apache stream endpoints include `/event` and `/global/event`, and excludes stale `/session/event`.
- Health/diagnostics command reports key prerequisites and failures clearly.
- Startup VACUUM tests cover existing and missing databases, custom XDG data paths, mapped-user execution, the 5000 ms SQLite busy timeout, TERM at 300 seconds with KILL escalation 5 seconds later, warning-and-continue failures, and no manual WAL/SHM/journal sidecar mutation.
- Startup VACUUM tests cover existing and missing databases, custom XDG data paths, mapped-user execution, the 5000 ms SQLite busy timeout, the configurable positive `OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS` TERM deadline bounded to `2147483647` (default 300) with fixed KILL escalation 5 seconds later, concise ordinary-failure warnings, timeout-expiry warnings containing the effective TERM deadline, and no manual WAL/SHM/journal sidecar mutation.
- Retention accepts both flag forms, honors config/flag precedence, rejects invalid values, and propagates dry-run state.
- Retention tests cover cutoff/pagination/root filtering, active-session skips, serial deletion, API incompatibility/failure, marker success/failure/retry, and scheduler signal/exit behavior.
- Retention tests cover complete cross-directory hierarchy mapping, active descendants/unknown IDs, stale root refreshes, status changes before deletion, DELETE-true-but-still-present direct-GET verification, request timeout, supported-version gating, future markers, invalid poll intervals, exact query/cursor use, and malformed responses.
Expand Down
2 changes: 1 addition & 1 deletion skills/opencode-web-runtime/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Enforce these contracts on every runtime change:
4. Emit identical run args for normal run and dry-run previews.
5. Keep diagnostics independent of container startup.
6. In entrypoint, map UID/GID, ensure writable runtime dirs, avoid recursive chown on read-only mounts, then exec via `gosu`.
7. After ownership and HOME/XDG exports, inspect `${XDG_DATA_HOME}/opencode/opencode.db`. If present, run startup `VACUUM;` via `sqlite3` and `gosu` as the mapped user with a 5000 ms busy timeout; GNU `timeout` sends TERM after 300 seconds and KILL 5 seconds later if needed. Skip missing databases without creating them and warn/continue on failures or timeout expiry. This is separate from retention's no-raw-SQL worker guarantee.
7. After ownership and HOME/XDG exports, inspect `${XDG_DATA_HOME}/opencode/opencode.db`. If present, run startup `VACUUM;` via `sqlite3` and `gosu` as the mapped user with a 5000 ms busy timeout; the persistent `OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS` setting defaults to 300, is a positive integer bounded to `2147483647`, and controls GNU `timeout`'s TERM deadline. KILL escalation remains fixed at 5 seconds. Skip missing databases without creating them; ordinary failures warn concisely, while timeout-expiry warnings include the effective TERM deadline. All failures warn/continue without blocking launch. This is separate from retention's no-raw-SQL worker guarantee.

# Retention lifecycle

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Use this checklist for runtime changes in `.opencode_web_yolo.sh`, `.opencode_we
- Avoid recursive ownership operations on paths that can contain read-only mounts.
- Use `gosu` handoff for final command execution.
- Run `opencode serve` with configured host and port.
- Provide `sqlite3` and Debian coreutils `timeout` in the image and, after mapped-user ownership plus HOME/XDG exports, best-effort VACUUM an existing `${XDG_DATA_HOME}/opencode/opencode.db` as the mapped user via `gosu` with a 5000 ms busy timeout. GNU `timeout` must send TERM after 300 seconds and KILL 5 seconds later if needed. Missing databases must not be created; failures or timeout expiry warn and do not block direct or retention-supervised launch.
- Provide `sqlite3` and Debian coreutils `timeout` in the image and, after mapped-user ownership plus HOME/XDG exports, best-effort VACUUM an existing `${XDG_DATA_HOME}/opencode/opencode.db` as the mapped user via `gosu` with a 5000 ms busy timeout. The persistent `OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS` setting defaults to 300, must be a positive integer bounded to `2147483647`, and controls GNU `timeout`'s TERM deadline; KILL escalation stays fixed at 5 seconds. Missing databases must not be created; ordinary failures warn concisely, while timeout-expiry warnings include the effective TERM deadline. Failures do not block direct or retention-supervised launch.
- Preserve provider/auth state across restart by mounting host OpenCode data directory.
- Keep Playwright opt-in: `OPENCODE_WEB_BUILD_PLAYWRIGHT=1` in the persistent config is durable, while `--playwright` is one-shot.
- Retention is opt-in with non-negative `OPENCODE_WEB_RETENTION_DAYS`; its scheduler starts only after authenticated health, runs as the mapped user, and persists a success marker under `XDG_STATE_HOME`.
Expand Down
18 changes: 18 additions & 0 deletions tests/test_dry_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ assert_contains "$output" "container_name=opencode_web_yolo"
assert_contains "$output" "restart_policy=unless-stopped"
assert_contains "$output" "run_detached=1"
assert_contains "$output" "auto_pull=1"
assert_contains "$output" "startup_vacuum_term_timeout_seconds=300"
assert_contains "$output" "build_pull=1"
assert_contains "$output" "build_playwright=0"
assert_contains "$output" "opencode_config_dir=${HOME}/.config/opencode"
Expand All @@ -50,6 +51,7 @@ assert_contains "$output" "-e HOME=/home/opencode"
assert_contains "$output" "-e XDG_CONFIG_HOME=/home/opencode/.config"
assert_contains "$output" "-e XDG_DATA_HOME=/home/opencode/.local/share"
assert_contains "$output" "-e XDG_STATE_HOME=/home/opencode/.local/share/opencode/state"
assert_contains "$output" "-e OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS=300"
assert_contains "$output" ".config/opencode"
assert_contains "$output" ".local/share/opencode"
assert_contains "$output" "--model local"
Expand All @@ -68,6 +70,22 @@ for truthy_value in true yes on; do
done
unset OPENCODE_WEB_BUILD_PLAYWRIGHT

for invalid_timeout in '' 0 01 2147483648 invalid; do
set +e
invalid_output="$(OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS="$invalid_timeout" "${ROOT_DIR}/.opencode_web_yolo.sh" --dry-run 2>&1)"
invalid_status=$?
set -e
assert_equals 1 "$invalid_status"
assert_contains "$invalid_output" "OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS"
done

custom_output="$(OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS=42 "${ROOT_DIR}/.opencode_web_yolo.sh" --dry-run 2>&1)"
assert_contains "$custom_output" "startup_vacuum_term_timeout_seconds=42"
assert_contains "$custom_output" "-e OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS=42"

max_timeout_output="$(OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS=2147483647 "${ROOT_DIR}/.opencode_web_yolo.sh" --dry-run 2>&1)"
assert_contains "$max_timeout_output" "startup_vacuum_term_timeout_seconds=2147483647"

mkdir -p "${HOME}/.opencode_web_yolo"
printf '%s\n' 'export OPENCODE_WEB_BUILD_PLAYWRIGHT=true' >"${HOME}/.opencode_web_yolo/config"
output_durable="$("${ROOT_DIR}/.opencode_web_yolo.sh" --dry-run 2>&1)"
Expand Down
1 change: 1 addition & 0 deletions tests/test_health.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ assert_contains "$output" "container_name=opencode_web_yolo"
assert_contains "$output" "restart_policy=unless-stopped"
assert_contains "$output" "run_detached=1"
assert_contains "$output" "auto_pull=1"
assert_contains "$output" "startup_vacuum_term_timeout_seconds=300"
assert_contains "$output" "build_pull=0"
assert_contains "$output" "build_playwright=0"
assert_contains "$output" "build_wrangler=0"
Expand Down
Loading
Loading