Configure startup VACUUM timeout - #23
Conversation
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The change modifies the container entrypoint startup path—a non-negotiable product contract area treated as a first-class regression class—and the author could not run shellcheck or a Docker build, so container-image behavior warrants final human verification.
Review effort: Balanced
Findings: None
What changed in this PR
This PR makes the startup SQLite VACUUM GNU timeout TERM deadline configurable via a new persistent OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDS setting (default 300s), replacing the previously hardcoded 300-second constant. It fits into the runtime/entrypoint contract by validating the value (positive integer bounded to INT_MAX), propagating it through Docker into the container, and surfacing it in health/--dry-run output, while keeping the SQLite 5000 ms busy timeout and fixed 5-second KILL escalation unchanged.
Changes:
- Adds the new persistent setting with bounded positive-integer validation in both the wrapper (
validate_positive_integer) and the entrypoint, plus a config default and Docker-epropagation. - Surfaces the effective value in
healthand--dry-runoutput and uses it in the entrypoint'stimeoutinvocation and timeout-warning message. - Updates runtime contracts (TECHNICAL.md, skills, references), operator docs (README), release metadata (VERSION
0.5.0, CHANGELOG), and deterministic tests.
| File | Description |
|---|---|
.opencode_web_yolo.sh |
Validates, echoes (health/dry-run), and propagates the new timeout env var into Docker. |
.opencode_web_yolo_entrypoint.sh |
Reads/validates the configurable TERM timeout and uses it in timeout and the timeout warning. |
.opencode_web_yolo_config.sh |
Defaults the setting to 300 only when unset (preserves empty for rejection). |
VERSION |
Bumps to 0.5.0. |
CHANGELOG.md |
Documents the 0.5.0 change. |
README.md |
Documents the new operator setting and updated VACUUM behavior. |
TECHNICAL.md |
Updates entrypoint/test contract wording for the configurable timeout. |
skills/opencode-web-runtime/SKILL.md |
Updates runtime contract #7 for the new setting. |
skills/opencode-web-runtime/references/runtime-checklist.md |
Updates the VACUUM checklist item. |
skills/opencode-web-quality-docs/references/test-acceptance-matrix.md |
Updates the startup VACUUM test acceptance criteria. |
tests/test_startup_vacuum.sh |
Adds custom-timeout, timeout-warning, and invalid-value coverage. |
tests/test_runtime_defaults.sh |
Asserts config default comment and dry-run propagation. |
tests/test_health.sh |
Asserts the health output shows the default timeout. |
tests/test_dry_run.sh |
Asserts default/custom/max/invalid dry-run behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
OPENCODE_WEB_STARTUP_VACUUM_TERM_TIMEOUT_SECONDSconfiguration with a 300-second defaultValidation
bash tests/run.shbash -non touched shell scriptsgit diff --checkNotes