# DS4 Context Engine 0.2.0-rc.1

Status: **released under the npm `rc` dist-tag**.

This release candidate freezes and hardens the 0.2 feature set delivered across the alpha and beta builds. It adds no new default-on provider behavior.

## Included since 0.1.2

- deterministic metadata-only context-quality metrics and comparison corpus;
- structural project chunks and richer symbol relations;
- opt-in local or explicitly consented remote hybrid semantic retrieval;
- opt-in cross-session project memory replay from canonical Pi JSONL;
- learned ranking with `off`, shadow, promotion-gated active, and static fallback modes;
- `runtime-adapter-v1`, a reusable conformance kit, and the callback/JSONL reference adapter;
- opt-in exact local prefix/KV reuse for adapters with a host-owned volatile runtime port;
- shared-SQLite WAL/write coordination and renewable fenced project-index leases.

## RC hardening

- exact schema-v10 (0.1) to schema-v15 upgrade coverage;
- full 0.2 configuration/database/adapter compatibility golden;
- 1,201-message repeated-planning coverage for hard limits, canonical integrity, and bounded derived retention;
- local/remote provider-switch, calibration, privacy, continuation, and cache invalidation coverage;
- same-host feature-disabled p95 comparison against exact `ds4-context-core@0.1.2`;
- exact-version registry-consumer verification for all three published packages;
- documented release gates, limitations, and forward-only database rollback.

## Compatibility

- Node.js `>=22.19.0`;
- Pi `0.84.3`;
- package versions and adapter-to-core dependencies must match exactly;
- configuration contract `ds4-context-config-v1`;
- SQLite projection schema `15`;
- runtime adapter contract `runtime-adapter-v1`.

Existing 0.1 configuration remains valid. Semantic retrieval, cross-session memory, quality sampling, learned ranking, and local KV reuse remain disabled by default. Pi JSONL and live project files remain canonical; SQLite, embeddings, ranking models, artifacts, and runtime KV state remain local/disposable.

## Upgrade and rollback

Opening a 0.1 database applies forward migrations 11–15. No canonical history is rewritten. A 0.1 binary cannot open the newer derived schema; rollback requires stopping all users of the shared database, retaining canonical JSONL/project files, and letting 0.1 create a fresh database or use a different `storage.databasePath`. Never alter migration checksums or delete reference-adapter canonical JSONL.

See [`../RELEASE_READINESS_0.2.0.md`](../RELEASE_READINESS_0.2.0.md) for the gate matrix and exact validation commands.
