Repository navigation
Description
Part of quickstart#235. Depends on the patterns provenance schema (GSA-TTS/agentic-coding-patterns#273); pin PATTERNS_KIT_REF to that merged commit.
Scope
- Provenance read/write — after a successful
acq_backend_ensure_kits_applied(both backends), record in-sandbox provenance (patterns repo + fullPATTERNS_KIT_REFSHA + bundle version + kit names + timestamp + backend), in a backend-neutral location that does not collide with user project files. Write only after success (partial/failed apply must not claim currency). sbx and msb each get a concrete path (documented). - Staleness detection in
acq run— compare installed provenance vs the local checkout'sPATTERNS_KIT_REF:- current → nothing;
- stale (older SHA) or legacy/unknown (no provenance) → offer a safe in-place refresh;
- interactive only, default No, EOF=decline, and non-interactive
acq runnever blocks (skip or one concise advisory, then continue). A declined update must not prevent launch.
- Explicit commands —
acq kit check [SANDBOX](no mutation) andacq kit update SANDBOX [--yes](updates to the local pinned bundle).--yesonly on the explicit command. - Opt-out —
ACQ_UPDATE_CHECK=0env +acq run --no-update-check. Keep the interface small (one env + one flag). - Whole-bundle reconcile — reapply the built-in bundle (usai/playbook/zscaler/git-ssh-sign) using each backend's existing idempotent path; sbx grows a stale-refresh path (today it only injects absent kits); msb already re-applies idempotently. After a usai refresh, ensure the startup global-merge runs so the new model catalog reaches the config; state (sessions/secrets/unrelated config/project overrides) preserved. If a backend can't safely update in place: explain, preserve the sandbox, give a manual recovery path, never auto-delete.
Security/trust (consensus conditions)
Preserve full 40-char SHA pinning; local checkout is source of truth (never patterns main); validate refs; no eval; quote shell values; bounded timeouts; treat kit metadata as untrusted; never print secrets; preserve backend abstraction (no sbx logic in common.sh); fail-open.
Tests (stub-style)
Provenance: current/older/missing-legacy/malformed; written-only-after-success; idempotent repeats. Detection+prompt: accept/decline/default-No/EOF-decline/non-interactive-never-prompts/declined-doesn't-block; --yes only on explicit command. Backend: sbx in-place refresh; msb idempotent reapply; failure preserves state; no auto-delete; deterministic bundle order; extra user kits not marked built-in. OpenCode: refreshed catalog reaches staged config; global merge preserves unrelated + project-local keys; convergent; parseable; no secret leak.
Docs + ADR
Update QUICKSTART/BACKEND_GUIDE (what acq checks, disable, manual check, explicit update, declined behavior, legacy sandboxes, backend limits, recovery, SHA-trust preserved). New ADR (context; local checkout as source of truth vs mutable main; provenance; interactive vs non-interactive; failure/fail-open; security; rollback; limitations).
Co-authored-by: OpenCode Agent [email protected]
Activity
feat(acq): detect stale sandboxes + acq kit check|update (#236)
feat(acq): detect stale sandboxes + acq kit check|update (#236)
fix(acq): export ACQ_UPDATE_CHECK so shellcheck 0.9 sees its cross-fi…
test(acq): fix SC2034 in the ACQ_UPDATE_CHECK opt-out test
docs(acq): strip in-development PR/issue references from #236 work (r…
feat(acq): detect stale sandboxes + acq kit check|update (#236) (#241)
wz-gsa commentedon Aug 4, 2026
Resolved by #241 (merged). That PR implemented the PR2 scope in full: host-side kit-bundle provenance,
acq_provenance_status(current/stale/unknown by exact-ref mismatch vs the localPATTERNS_KIT_REF), theacq runstale-sandbox refresh offer (interactive, default No, never blocks), theACQ_UPDATE_CHECK=0/--no-update-checkopt-out, andacq kit check/acq kit update [--yes], plus ADR-0016 and tests. Closing as done.(Left open only because #241's body said "Implements quickstart#236" rather than a GitHub auto-close keyword.)
Remaining epic #235 children: #237 (deferred checkout-behind advisory) and #240 (live sbx duplicate-kit-add validation) stay open.