Skip to content

DS4 Context Engine 0.5.3

Latest

Choose a tag to compare

@Alucard24 Alucard24 released this 06 Oct 10:57
· 1 commit to main since this release

DS4 Context Engine 0.5.3

Changes

  • Integrate PR #2 (squash commit d2519f3) and follow-up b8614d0.
  • Add context.supplementalPlacement with unchanged default latest-user, opt-in stable-prefix for all supplements after leading system/developer messages, and opt-in hybrid for pin/memory/project at that prefix with retrieval immediately before the newest native user request.
  • Map native pin indices, classifications, privacy reasons and supplemental provenance through the same actual planned positions across both insertion points. Ignore source-less supplements without shifting indices.
  • Isolate synthetic supplements as independent atomic groups so they cannot absorb a following native assistant/tool prefix, misattribute its provenance or incorrectly consume its budget. Native tool call/result binding and validation remain enforced.
  • Preserve native no-user behavior and fail-open fallback, without retaining synthetic supplements in fallback.
  • Add regressions for leading roles, two-point mapping, selected/excluded provenance, changing retrieval, no-user inputs, budget fallback, native tool-batch retention and incomplete/orphan selected exchanges. Config tests round-trip all three modes, reject invalid values and cover the default-shape loader requirement. The golden default is latest-user.
  • Document the trade-offs and limitations in the planner contract and ADR 075.

Configuration

Save context.supplementalPlacement through Pi's configuration interface or in ds4-context.json:

{
  "context": {
    "supplementalPlacement": "hybrid"
  }
}

stable-prefix remains available for installations with unchanged supplements, including the author's local-engine comparison. Existing configurations without this field retain latest-user. Fully restart Pi after upgrading to load the matching engine/core artifacts and saved settings.

Scope and limitations

Stable placement removes one source of prefix divergence; it does not guarantee cache hits or a byte-for-byte request prefix. Memory/project selection, changing blocks, sliding tails, compaction, request options and provider serialization may invalidate the following suffix. The PR author's Strata measurements were not reproduced during this review. No provider calls or source-history rewrites are introduced. Privacy, budgets, schema and default BPE/auto-tuning behavior remain unchanged.

The separate real long-conversation DS4/Pi BPE/auto-tuning objective is not established by these synthetic checks. No new provider budget was requested or used.

Validation

The pre-version-change source at b8614d0 passed the acquired local checks and the observed GitHub CI matrix (Node 22.19.0 and 24.x). Synthetic regressions reproduced supplement absorption before the group-isolation fix and passed afterward.

npm ci completed on supported Node 22.23.1 with the synchronized 0.5.3 manifests, constants and lockfile. The dev-inclusive installation audit reported six advisories (three moderate and three high); no dependency changes were made.

On final coordinated 0.5.3 source after the required verification-policy reload:

  • Acquired node-typecheck, node-test and git-diff-check passed after installation.
  • npm run quality:compare completed successfully.
  • npm run schema:context-persistence passed: 1,266 bytes / 317 estimated tokens.
  • npm run pack:check verified a clean consumer: core 275 files, reference adapter 7 files, Pi extension 139 files.
  • All three npm pack --dry-run --json inventories contained no private-state paths.
  • npm audit --omit=dev reported zero production vulnerabilities.
  • Release-source CI passed on Node 22.19.0 and 24.x, including 112 files / 894 tests and package-consumer checks.

Local installation and package/registry checks used Node 22.23.1. Windows and live-engine cache savings were not verified locally. Publication-record edits are documentation-only; source results are reused because code, tests, dependencies and configuration remain unchanged.

Publication and registry verification

Published manually to npm on 2026-10-06 by alucard_24, in dependency order:

  1. ds4-context-core@0.5.3
  2. ds4-context-reference-adapter@0.5.3
  3. ds4-context-engine@0.5.3

All three publication commands succeeded. Two initial fresh-cache registry checks returned ETARGET for core, and an intermediate dist-tag read still reported latest: 0.5.2 for the reference adapter. After waiting, a new fresh-cache npm run registry:check -- 0.5.3 verified all three exact public artifacts on Node 22.23.1. Subsequent npm dist-tag ls reads confirmed latest: 0.5.3 for every package. These observations do not guarantee immediate consistency at every client or cache.

The annotated v0.5.3 tag points to release-preparation commit 212dc43 and was pushed only after registry verification. GitHub Release v0.5.3 is public and stable. CI remains validation-only, with no publishing credentials or publishing steps.