# DS4 Context Engine 0.3.0

Status: promoted 2026-09-04 from beta.3; printed under the npm `latest` dist-tag.

This is the first stable release of the 0.3 line. It carries exactly the beta.3 candidate: no canonical record format, SQLite schema, runtime contract, retention limit, privacy policy, compaction validation, or fallback semantics changed during promotion.

## Promoted from

- [`0.3.0-beta.3.md`](0.3.0-beta.3.md) is the exact promoted candidate; beta.3 itself fixed Windows storage-maintenance flush handling on top of beta.2.

## Promotion evidence

The promotion criteria in [`../DOGFOODING_0.3.0_BETA.md`](../DOGFOODING_0.3.0_BETA.md) are satisfied as follows:

- Full mode matrix with synthetic data on 2026-09-03: TUI, RPC (with and without responding UI bridge), print, JSON stream, no-session, canonical append audit, branch switch, restart, projection rebuild, two concurrent client leases, untrusted RPC, isolated offline maintenance with local TTY confirmation, and online retention convergence. Evidence: `/tmp/ds4-beta-dogfood/evidence/`.
- Configured remote provider (real): the RPC/branch/untrusted matrix ran against `openai-codex` / `gpt-5.4-mini` with real authentication on 2026-09-03; the disposable database records 21 `openai-codex` / `gpt-5.4-mini` context manifests with provider-reported usage. The same matrix covered accepted, cancelled, and provider-policy-denied persistence writes.
- Additional real-provider TUI soak on 2026-09-04 against `deepseek` / `deepseek-v4-flash-vision-exp` (Pi 0.85.0): normal model call with provider-reported usage, `/context status`, `/context storage`, and a session pin persisted with scope `session`, status `active`, and a canonical source entry. Evidence: `/tmp/ds4-real-dogfood/evidence/` and the disposable database at `/tmp/ds4-real-agent/ds4-context/context.db` (3 real manifests, pin `b5828a50-689b-4c59-8a90-241eca30217c`).
- Verified local provider: explicitly recorded as unavailable — no local provider (Ollama/LM Studio or equivalent) is configured in the environment; the runbook allows the missing run to remain recorded rather than inferred.
- Live maintenance authorization: completed 2026-09-03 (2.42 GiB → 377 MiB, `quick_check=ok`, FK `0`, manifests 1,630 → 128); the fixed backup `context.db.precompact.bak` (including `-shm`/`-wal` residues) was removed 2026-09-04 after a post-removal read-only inspection confirmed `quick_check=ok`, FK `0`, 128 manifests, and `Maintenance recommended: no`.

## Safety and compatibility

Unchanged from beta.3: Pi JSONL remains canonical and append-only; SQLite remains disposable and rebuildable; physical maintenance remains explicit, offline, local-TTY-only, and unavailable to model-callable tools; every `context_persistence` write still requires a fresh positive local UI decision.

Compatibility surface:

- SQLite schema: `15`;
- configuration: `ds4-context-config-v1`;
- runtime adapter: `runtime-adapter-v1`;
- persistence tool: `ds4-context-persistence-tool-v1`;
- persistence result: `ds4-context-persistence-result-v1`;
- Pi: `0.84.3` (validated; 0.85.0 additionally exercised by the 2026-09-04 TUI soak);
- Node.js: `>=22.19.0`.

## Package/version policy

The coordinated version is `0.3.0` for:

```text
ds4-context-core
ds4-context-reference-adapter
ds4-context-engine
```

Both adapters depend exactly on `ds4-context-core@0.3.0`. Publication used npm's default `latest` tag for all three packages: `latest` now resolves to `0.3.0` (previously `0.2.0`), `beta` remains `0.3.0-beta.3`, `alpha` remains `0.3.0-alpha.5`, and `rc` remains `0.2.0-rc.1`. GitHub Actions remains validation-only with OIDC and package-write permissions denied.

## Candidate validation

Local candidate verification on Node.js `26.5.1`:

- `npm run check`: 69 files and 341 tests passed on the promoted tree.
- `npm run quality:compare`: candidate quality versus the frozen baseline passed.
- `npm run schema:context-persistence`: within the 1,500 / 320 absolute and relative limits.
- `npm run pack:check` and `npm pack --dry-run --json` for all three packages passed with no forbidden local/session/storage paths.
- `git diff --check` passed; the only pre-existing untracked path is `.serena/`, which is excluded from commits and package inventories.
- Version, exact core dependencies, package-lock entries, extension constant, and reference-adapter constant are synchronized to `0.3.0`.

Exact registry verification and the annotated tag are recorded below.

## Registry evidence

Exact post-publication verification passed for all three `0.3.0` packages on 2026-09-04. The clean registry consumer verified exact adapter/core dependencies, public core exports, compiled reference-adapter conformance, packaged quality corpus, packaged Pi extension startup, and the installed `ds4-context-storage` CLI declaration, shim, and usage probe.

Published package shasums:

```text
ds4-context-core:              7e3c6407996f263db3f6159e5de8b30de6dfabe8
ds4-context-reference-adapter: ce133b184b6dbb7ed2a7337d639dca13337d7df1
ds4-context-engine:            6d265de2a8e6c904482ab0ff89acbadbde862854
```

For all three packages, npm `latest` now resolves to `0.3.0`, `beta` remains `0.3.0-beta.3`, `alpha` remains `0.3.0-alpha.5`, and `rc` remains `0.2.0-rc.1`.

Annotated tag `v0.3.0` targets `608a6238325ed8627dc16c0c32ad10697977e0e0`. The GitHub release is published at <https://github.com/Alucard24/ds4-context-engine/releases/tag/v0.3.0>.

## Documentation

- [`../STORAGE_MAINTENANCE.md`](../STORAGE_MAINTENANCE.md)
- [`../STORAGE.md`](../STORAGE.md)
- [`../COMPACTION.md`](../COMPACTION.md)
- [`../RELEASING.md`](../RELEASING.md)
- [`0.3.0-beta.3.md`](0.3.0-beta.3.md)
