Repository navigation
DS4 0.5.2
DS4 Context Engine 0.5.2
Changes
- Fix rebase tool validation to use the exact compaction-aware Pi context serialized into the checkpoint. Reuse that captured context for validation, privacy classification and handoff construction.
- Preserve incomplete tool exchanges already excluded by Pi compaction in the unchanged canonical archive without transferring them into the handoff or blocking rebase.
- Keep active incomplete calls/results blocked before journal or target creation, including results whose matching call exists only in archived history.
- Add content-free
toolExchangeDiagnosticswithactiveIssueCountandhistoricalIssueCount. No tool IDs, arguments, results or message bodies are returned by these diagnostics. - Add six synthetic regressions covering archived calls/results, active calls/results, compaction-crossing result binding and repeated IDs. Archived cases verify successful activation, unchanged source bytes and absence of archived tool payloads from the checkpoint.
- Clarify ADR 074 and the history/rebase contract. Correct the guide's stale enabled-default description; runtime defaults are unchanged.
Scope and limitations
The shared atomic validator and archive/header/hash/ancestry/lineage/memory checks remain unchanged. There is no source rewrite, tool-result fabrication, validation bypass, schema migration, budget increase or extra provider request. Rebase remains unavailable if the transferred active context really contains incomplete tool exchanges. This patch does not repair source history damaged by another extension or change FTS rebuild costs.
Windows-host execution and live BPE/auto-tuning verification are not established by these synthetic checks.
Validation
Before the fix, the new regression file reproduced four failures, including archived exchanges incorrectly blocking rebase and an active orphan result incorrectly accepted when its call existed only in archived history. After the fix, acquired node-typecheck, node-test and git-diff-check passed on the source change.
On final coordinated 0.5.2 source after the required policy reload:
npm cicompleted on supported Node 22.23.1.jev_verify allpassednode-typecheck,node-testandgit-diff-checkafter installation.npm run pack:checkpassed in a clean consumer: core 275 files, reference adapter 7 files, Pi extension 137 files.npm run quality:comparecompleted successfully.npm run schema:context-persistencepassed: 1,266 bytes / 317 estimated tokens.npm audit --omit=devreported zero production vulnerabilities. The dev-inclusive installation audit reported five vulnerabilities: three moderate and two high.
Package/consumer checks used Node 22.23.1. Windows and the additional Node CI matrix were not executed locally. Publication-record edits are documentation-only; source results are reused only while code, tests, dependencies and configuration remain unchanged.
Publication and registry verification
Published manually to npm on 2026-10-05 by alucard_24, in dependency order:
ds4-context-core@0.5.2ds4-context-reference-adapter@0.5.2ds4-context-engine@0.5.2
All publication commands succeeded. Initial fresh-cache registry checks returned ETARGET for core while metadata was not yet consistent across the three packages. A subsequent fresh-cache npm run registry:check -- 0.5.2 verified all three exact artifacts on Node 22.23.1. npm dist-tag ls confirmed latest: 0.5.2 for every package.
The annotated v0.5.2 tag was created at release-preparation commit e1b3a43 and pushed after registry verification. GitHub Release v0.5.2 was created from that verified tag. CI remains validation-only with no publishing credentials.