# DS4 Context Engine 0.3.3

Status: published 2026-09-04 as stable, printed under the npm `latest` dist-tag, tagged `v0.3.3`.

This release adds a configurable transport retry policy for compaction summary requests on top of the 0.3.2 stable candidate. It carries forward 0.3.2 without changing canonical records, SQLite schema, runtime contracts, retention limits, privacy policy, compaction validation, or fallback semantics.

## Added since 0.3.2

- **Configurable compaction transport retry policy, mirroring Pi's assistant retry settings**:
  - `compaction.transport.maxAttempts` (default `3`) and `compaction.transport.baseDelayMs` (default `2000` ms), with exponential backoff doubling per attempt, capped at 60 s per wait, and abort-aware: replay stops promptly when the request is cancelled;
  - policy defaults mirror Pi (`retry.maxRetries` 3, `retry.baseDelayMs` 2000, exponential backoff);
  - validated at config load: `maxAttempts` in `1..10`, `baseDelayMs` in `0..60000` ms; invalid values are rejected before use;
  - `summary-generator` exposes `effectiveTransportPolicy` and `transportRetryDelayMs`, uses the configured `maxAttempts` in retry loops and diagnostics;
  - `compaction-coordinator` threads `config.compaction.transport` through the summary request path;
  - machine-readable catalog fields in `config-catalog.ts`, so the new keys are visible to `/context config view`;
  - tests: unit coverage for policy defaults, backoff sequence, abort awareness, attempt counting, usage aggregation, and config validation; integration retry tests run with `baseDelayMs: 1` plus a new configurable-`maxAttempts` case; the frozen 0.2-line compatibility golden was updated to include the new transport defaults;
  - `docs/COMPACTION.md`: new retry-policy section and revised bounds paragraph.
- Coordinated package versions moved to `0.3.3`.

There are no functional storage-format or provider-path changes relative to 0.3.2.

## Safety and compatibility

Unchanged from 0.3.2: 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 remains unchanged:

- SQLite schema: `15`;
- configuration: `ds4-context-config-v1` (new keys added: `compaction.transport.maxAttempts`, `compaction.transport.baseDelayMs`);
- runtime adapter: `runtime-adapter-v1`;
- persistence tool: `ds4-context-persistence-tool-v1`;
- persistence result: `ds4-context-persistence-result-v1`;
- Pi: `0.84.3`;
- Node.js: `>=22.19.0`.

## Package/version policy

The coordinated version is `0.3.3` for:

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

Both adapters depend exactly on `ds4-context-core@0.3.3`. Publication uses npm's default `latest` tag for all three packages: `latest` now resolves to `0.3.3` (previously `0.3.2`), `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`: 72 files and 376 tests passed (including the new transport-policy unit coverage, the configurable-`maxAttempts` integration case, and the updated golden freeze).
- `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 latency:check` against the frozen baseline passed (`regressionRatio` `1.040189`, maximum `1.1`).
- `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.3`.

Validation-only CI is recorded below with the release commit. Exact registry verification and the annotated tag are recorded after execution.

## Validation-only CI

Release commit `5d636cc` (chore(release): prepare 0.3.3); CI run `33921584110` on Node `22.19.0` and `24.x`. The first Node 22.19.0 attempt hit a one-off `upgrade-rebuild` migration test timeout (5 s default) on the shared runner; the exact same test passes locally and on the re-run, and the rerun completed `success` on both Node versions.

## Registry verification and tag

Published manually in dependency order with npm's default `latest` tag after `npm whoami` confirmed `alucard_24`:

- `ds4-context-core@0.3.3`; shasum `5db4c81a9c6a8861bf6612d499abec7fb576e411`;
- `ds4-context-reference-adapter@0.3.3`; shasum `7a251de9735968776d21ed16a2e10786ea2bc2ef`;
- `ds4-context-engine@0.3.3`; shasum `cb107f9e28d89e860b3b05118f374a9c9969b58c`.

`npm run registry:check -- 0.3.3` passed: fresh-install exact core/adapters, public core/KV exports, compiled reference conformance, packaged quality corpus, installed `ds4-context-storage` CLI shim probe, and published Pi extension startup through isolated offline RPC state. The first check attempt hit a stale npm cache ETARGET for `ds4-context-engine@0.3.3`; a direct registry query confirmed all three artifacts and dist-tags, and the retry passed.

npm dist-tags for all three packages: `latest=0.3.3`, `beta=0.3.0-beta.3`, `alpha=0.3.0-alpha.5`, `rc=0.2.0-rc.1`.

Annotated tag `v0.3.3` was pushed and the GitHub Release was created:

https://github.com/Alucard24/ds4-context-engine/releases/tag/v0.3.3
