Skip to content

v0.4.12 — Deterministic compaction-summary structure

Choose a tag to compare

@Alucard24 Alucard24 released this 01 Oct 17:37
· 18 commits to main since this release

Release 0.4.12 — Deterministic compaction-summary structure

Coordinated packages: ds4-context-core, ds4-context-reference-adapter, and ds4-context-engine 0.4.12.

Changes

  • DS4 now normalizes the twelve required summary sections before validation, on every segment, aggregate and direct update: recognizable headings are canonicalized, duplicate bodies are concatenated in encounter order, and the contract order is restored. Missing or empty semantic sections receive an explicit reporting-omission marker (- Not reported in the generated summary; absence of facts is not established.) instead of failing the whole graph, so a repairable Markdown omission no longer discards an otherwise usable compaction.
  • Unknown headings and unsectioned text are retained as quoted notes in Current State; they are never promoted into decisions, constraints or completion claims. A whole-output Markdown fence is unwrapped. Files Read and Files Modified are always regenerated from Pi's sanitized file-operation inventory, including when their headings are missing or duplicated, and Markdown-unsafe known-file evidence still fails closed without leaking the path.
  • Exact-value quote retraction now runs whenever unsupported spans are present, independently of other validation errors, and only when the summary fell back to fail-closed. Both repairs are reported as warning codes with counter-only messages: summary-structure-normalized and summary-sections-not-reported. No generated heading, path or body text appears in the diagnostics, and no additional provider repair request is issued.
  • Adds the new core export normalizeSummaryStructure, verified by the engine↔core compatibility guard, plus synthetic regressions for all twelve sections (missing, empty, duplicated, reordered), heading-level/case/emphasis normalization, every JavaScript line terminator and heading whitespace form, unknown headings and free-form output, whole-output fences, canonical file inventories, unsafe evidence, empty responses, tool-call responses, idempotence, all 4,096 omission subsets, and segment, aggregate and direct-update coordinator paths. Each combined-failure regression reproduces the reported missing-section, unsupported-exact-value error on the prior implementation.

Implementation commit: bcc0a02. Decision: ADR 072 (supersedes ADR 069's structural-fallback policy).

Scope and limitations

The problem was reproduced locally from code and tests; the reported live failure is not confirmed to have recurred after this patch, and no live session, database or session JSONL was inspected. Normalization preserves what the model reported: it cannot recover facts that were never reported, and the omission marker states that absence is not established. Unrecognized section titles remain notes rather than being guessed into a semantic category.

The strict validator and its error severities, the eight-bullet bound, the 25% removal limit, output-limit handling, transport retry policy, graph atomicity, JSONL authority and persistence schemas are unchanged. Empty responses, tool-call responses, unsafe file evidence, incomplete transport, output limits, aborts and storage failures still fall back to Pi. No provider repair request is added. The summary contract version, default tokenizer, opt-in BPE/auto-tuning, privacy enforcement and provider-facing defaults are unchanged. Core and the reference adapter receive only the coordinated version bump.

No live-provider, real-compaction or Windows-host confirmation is claimed, and the separate real-context BPE/auto-tuning objective remains open.

Validation

On the final 0.4.12 source, version and dependency state, using Node 26.5.1 / npm 11.17.0:

  • npm ci completed successfully.
  • npm run check completed successfully: workspace builds, strict TypeScript typecheck and the full Vitest suite, 104 files / 789 tests, including compatibility, privacy and integration tests. During development the new regressions were confirmed to fail on the unpatched implementation before passing with it. git diff --check was clean. The repository verification policy gate was unavailable in this session because the coordinated version bump invalidated its acquired fingerprint; the same commands were executed directly instead, and the gate can only be re-armed by the user's own reload.
  • npm run quality:compare: candidate quality 0.9875 versus baseline 0.808156 on the packaged synthetic corpus, the same deterministic deltas as 0.4.11.
  • npm run schema:context-persistence: passed: true, 1,266 bytes / 317 estimated tokens, within the 320-token relative gate.
  • npm run pack:check: verified core 251 files, reference adapter 7 files and engine 122 files in a clean consumer, including packaged exports, reference conformance and isolated offline Pi RPC.
  • npm audit --omit=dev: no production findings. npm ci reports 5 development-inclusive audit findings (3 moderate, 2 high); the lockfile diff changes only coordinated versions and exact internal dependencies, not third-party package versions. These warnings are not hidden or fixed by this patch.

No live-provider, live-session or Windows-host confirmation is claimed.

Publication and registry verification

  • Published manually to npm in dependency order: ds4-context-core@0.4.12 → ds4-context-reference-adapter@0.4.12 → ds4-context-engine@0.4.12, all public with latest. Registry dist-tags.latest reached 0.4.12 for all three packages after propagation.
  • npm run registry:check -- 0.4.12 first reported ETARGET for the core dependency and then E404 for the engine until propagation completed, as in previous releases; with a fresh temporary npm cache it then passed: “Verified all DS4 registry packages at exact version 0.4.12.” This covers exact internal dependencies, core/public exports, reference conformance, the packaged quality corpus, the storage CLI shim and isolated offline Pi RPC.
  • Annotated tag v0.4.12 points to release-preparation commit ebc9fd0957e1bbcfae9a9302b16bd4821dd1d202 and was pushed after successful registry verification.
  • GitHub Release: https://github.com/Alucard24/ds4-context-engine/releases/tag/v0.4.12.
  • CI remains validation-only; no publishing credentials, provider calls or session data were added.