Disposable Local SQLite Engine Strategy
Purpose
This page evaluates local-only SQLite engine options for a future disposable SQL dry-run path without changing the current no-execution posture.
Current decision: keep skip-if-unavailable as the safest fallback; prefer sqlite-cli detection later only if sqlite3 is already installed locally; do not add a dependency, target D1, or activate migrations.
Current Dry-Run Result
Result
SKIPPED_SQL_ENGINE_UNAVAILABLE
SKIPPED_SQL_ENGINE_UNAVAILABLEValidator
passed
passedD1 Target
none
noneWrangler Usage
none
noneTables Created
none
noneSafety prechecks passed, but SQL table creation was not verified because no disposable local SQLite engine was available.
Why An Engine Strategy Is Needed
The previous disposable dry-run path proved the safety prechecks, but not the SQL itself. A local engine strategy is needed before any future table-creation verification can happen, and it must stay outside D1, wrangler, app runtime, package scripts, active migrations, write endpoints, and CRUD.
Candidate Engine Options
| Option | Status | Risk | Requirements | Recommendation |
|---|---|---|---|---|
| Local sqlite3 CLI | strategy-only | low-if-already-installed | sqlite3 CLI must already exist on the local machine; no npm dependency may be added; execution must remain manual and flag-gated; target must remain disposable and local | preferred next executable option only if sqlite3 is already installed locally |
| Node built-in SQLite capability | strategy-only | medium-runtime-compatibility | current Node runtime must support a stable local SQLite interface; must not become an Astro or app runtime dependency; must remain local-only and disposable; must not be required for build or normal tests | possible later only after runtime support is confirmed and isolated |
| Dev-only SQLite package | strategy-only | higher-requires-approval | explicit approval required before adding any package; dependency must be dev-only; must not ship into app runtime path; must not create production or preview database targets | defer until sqlite-cli detection is evaluated and explicit approval exists |
| Skip if engine unavailable | strategy-only | lowest-current-risk | keep current safe fallback; report SKIPPED_SQL_ENGINE_UNAVAILABLE clearly; do not attempt D1, wrangler, package install, or network fallback; leave activation blocked until successful local verification exists | current safest behavior until a local engine strategy is approved |
Recommended Path
- Keep SKIPPED_SQL_ENGINE_UNAVAILABLE as the safe fallback.
- Add optional detection for local sqlite3 CLI only if it is already available.
- Do not install dependencies yet.
- Do not add npm scripts that execute SQL.
- Continue requiring the manual --local-disposable-only flag.
- Keep all execution local and disposable.
What Must Not Change
- dependency installation
- SQL execution in this phase
- D1 targeting
- wrangler usage
- active migrations
- database writes
- role-set runtime storage
- user assignment
- identity storage
- live submissions
- attendance tracking
- participation tracking
- participation analytics
- scoring, ranking, or compliance metrics
- package scripts that execute SQL
- production or preview database targeting
- CRUD UI
Approval Gates Before Execution
- engine detection design reviewed
- sqlite3 CLI detection limited to local PATH or explicit local path
- no dependency installation confirmed
- no package SQL script confirmed
- no D1 or wrangler fallback confirmed
- manual flag remains required
- disposable target cleanup remains required
- tests cover missing-engine safe skip
- tests cover available-engine local-only path before any activation
- staff/privacy approval remains required before migration activation
What Remains Blocked
No dependency installation, SQL execution, D1 target, wrangler path, active migration, table creation, runtime database query, package SQL script, write endpoint, CRUD UI, role-set runtime storage, user assignment, identity storage, submissions, staff decisions, tracking, analytics, scoring, billing, lead capture, or sensitive storage is active.
Recommended Next Phase
Phase 7.14 - SQLite CLI Detection for Disposable Local Dry-Run
Boundaries: future phase only; local CLI detection only; no dependency installation; no D1; no wrangler; no active migrations; no production or preview targeting; no CRUD.
future-only