DecisionBoundALPHA 0.13.0a2 · RESEARCHConcept demo

Database integrity, backups and offline recovery

DecisionBound's local runtime stores durable event receipts, project identity, approved decisions, and workflow metadata in SQLite. The database is private user data. Even when no API secrets are stored in SQLite, tasks and event metadata may be confidential. Backup files require the same access restrictions as the original database.

Operational guarantees (v0.13 alpha)

First: inspect your existing local state

dbound state check
dbound state check --full

For an explicit offline file:

dbound state check --database /private/backups/decisionbound-state.db --full

An invalid/corrupt/unsupported database produces a nonzero exit status. Do not respond by deleting the database or enabling automatic reinitialization.

Take a consistent, private snapshot

mkdir -p "$HOME/private-dbound-backups"
chmod 700 "$HOME/private-dbound-backups" # POSIX; use your Windows account's protected folder on Windows

dbound state backup --output "$HOME/private-dbound-backups/state-2026-11-14.db"

The command prints JSON with the location, SHA-256, bytes and schema version, not database contents. Store the digest in your private backup records. Reusing the same output path is intentionally refused. Keep backup files outside any Git repository, restrict filesystem access, and encrypt them before transferring to external storage. Backup files may contain proprietary task descriptions or project metadata.

Recover after an incident

Stop any live dbound serve processes before manually switching the active database. The release only provides a safe recovery-to-new-file command:

dbound state restore \
  --backup "$HOME/private-dbound-backups/state-2026-11-14.db" \
  --destination "$HOME/private-dbound-backups/recovered-for-inspection.db"

dbound state check --database "$HOME/private-dbound-backups/recovered-for-inspection.db" --full

For v1 → v2 upgrades, use the explicit schema-upgrade procedure to create a verified new database. Only after independent review and stopping existing processes may an operator activate recovered or upgraded state. There is no automatic in-place replacement command in this alpha: mixing a replacement file with an active WAL runtime or competing processes could lose committed work. Restoration does not rewrite audit history, declare task completion, or bypass approvals.

Failure model and limitations

Scenario Expected behavior What remains out of scope
Backup while SQLite writers are active A consistent point-in-time committed snapshot Distributed snapshot across other services or files
Existing destination or symlink target Refuse overwrite Arbitrary hostile kernel or same-user filesystem adversary
Corrupt source, mismatched schema Fail without publishing a new backup Forensic recovery of corrupted databases
Process failure before publication Old state untouched; incomplete temp may remain after sudden power loss Automatic debris cleanup after OS crash
Disk-full or I/O error Stop; report error and preserve source Guaranteed power-loss durability on every filesystem
Read-only recovery operation New file, no modification to active database Hot failover, auto-migration, or remote-device sync

Scale boundaries: local SQLite is a valid per-device default, not a multi-tenant distributed database. The platform still requires explicit consistency models, authentication, tenant isolation, observability, and independently tested PostgreSQL service architecture before remote fleet use. These commands do not establish those properties.

Tests and operating evidence

Host certification · Security boundaries · Python API reference

Bounded local write/backup stress probe

To measure event persistence, event-order preservation and online backup integrity under concurrent local threads:

PYTHONPATH=src python scripts/stress_local_state.py --writers 8 --events-per-writer 250 --backups 4

The script uses a disposable directory, emits aggregate elapsed time and empirical p95/p99 write durations, and fails if event counts, ordering or snapshots are inconsistent. Its metrics are observations for the host that ran the test, not claims about thousands of distributed installations, cloud latency, or production throughput. Do not extrapolate the results across operating systems or machines without executing the actual hosted-runner matrix and collecting repeated measurements.