ds4-context-engine 0.3.0-alpha.5 → 0.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -10
- package/docs/ADR/058-bounded-manifest-storage.md +31 -0
- package/docs/ADR/README.md +1 -0
- package/docs/ARCHITECTURE.md +9 -5
- package/docs/COMPACTION.md +3 -3
- package/docs/CONTEXT_MANIFEST.md +10 -1
- package/docs/CONTEXT_PERSISTENCE_TOOL.md +2 -2
- package/docs/DOGFOODING_0.3.0_ALPHA.md +34 -9
- package/docs/DOGFOODING_0.3.0_BETA.md +331 -0
- package/docs/RELEASE_READINESS_0.2.0.md +1 -1
- package/docs/RELEASING.md +5 -5
- package/docs/STORAGE.md +16 -2
- package/docs/STORAGE_MAINTENANCE.md +121 -0
- package/docs/releases/0.3.0-alpha.5.md +5 -3
- package/docs/releases/0.3.0-beta.1.md +81 -0
- package/package.json +6 -2
- package/scripts/ds4-context-storage.mjs +148 -0
- package/src/extension/commands.ts +79 -2
- package/src/extension/runtime.ts +81 -24
- package/src/pi-adapter/compaction-coordinator.ts +12 -0
- package/src/pi-adapter/summary-generator.ts +120 -34
- package/src/pi-adapter/version.ts +1 -1
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# Dogfooding DS4 0.3.0 Beta
|
|
2
|
+
|
|
3
|
+
This runbook validates the published `ds4-context-engine@0.3.0-beta.1` package through sustained real Pi use. It complements automated tests and release smoke checks; it does not replace them.
|
|
4
|
+
|
|
5
|
+
The primary target is the model-callable `context_persistence` surface. Pi JSONL must remain canonical and append-only, SQLite must remain rebuildable, and no model-callable write may occur without a fresh positive local UI decision.
|
|
6
|
+
|
|
7
|
+
## Safety and scope
|
|
8
|
+
|
|
9
|
+
- Use the exact prerelease version, not the mutable `beta` dist-tag.
|
|
10
|
+
- Use a disposable trusted project and a dedicated session directory.
|
|
11
|
+
- Use synthetic, non-secret Pin/Memory content. Local TUI dialogs and JSON event streams may display current tool arguments.
|
|
12
|
+
- Published alpha.1 had a retry limitation: copying `[omitted-by-ds4-egress-policy]` from sanitized history could present a confirmation for the literal marker. Alpha.2 and later reserve that output-only marker and must reject it as `egress-placeholder` before runtime access, confirmation, canonical append, or derived-policy update.
|
|
13
|
+
- Alpha.3 and later keep exact-value summary validation strict. An unrepaired failure may expose only its stage, issue code, repair category, and counts; disputed exact text must not appear in diagnostics.
|
|
14
|
+
- Alpha.4 distinguishes unsupported and missing action parameters without echoing rejected fields or values. Routine successful compaction lifecycle events require `diagnostics.logLevel=debug`; actionable fallback warnings remain visible.
|
|
15
|
+
- Alpha.5 partitions an oversized compaction source into bounded atomic segments and recursively aggregates validated child summaries. An indivisible message or tool exchange still fails closed to Pi default compaction, and provider failures expose only a metadata category.
|
|
16
|
+
- Do not use `--no-session` except for the explicit fail-closed test. Without a persistent Pi JSONL destination, both reads and writes return `runtime-unavailable`.
|
|
17
|
+
- Do not retry `committed_projection_pending` or `indeterminate`. Inspect state with a read, `/context health`, or `/context rebuild-index` first.
|
|
18
|
+
- Use `/context` only for local inspection and recovery. Mutations under test must go through `context_persistence` so the confirmation and provider-egress boundaries are exercised.
|
|
19
|
+
- Never edit a Pi session JSONL file during the run.
|
|
20
|
+
|
|
21
|
+
Recommended minimum before promoting the beta: three normal work sessions, two process restarts, one branch change, one projection rebuild, the TUI/RPC/print/JSON matrix, one configured remote provider, and—when available—one verified local provider.
|
|
22
|
+
|
|
23
|
+
## Isolated setup
|
|
24
|
+
|
|
25
|
+
Pi packages execute with the user's full permissions. Review the package before installation.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
mkdir -p /tmp/ds4-beta-dogfood
|
|
29
|
+
cd /tmp/ds4-beta-dogfood
|
|
30
|
+
git init
|
|
31
|
+
mkdir -p sessions evidence
|
|
32
|
+
pi install -l npm:ds4-context-engine@0.3.0-beta.1
|
|
33
|
+
pi list
|
|
34
|
+
pi --version
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The `-l` installation is project-local and the exact npm version is pinned. Run Pi from this directory. Use `--approve` only after trusting this disposable project; non-interactive modes cannot show the project-trust dialog.
|
|
38
|
+
|
|
39
|
+
Use the same dedicated session directory throughout:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
export DS4_DOGFOOD_SESSIONS="$PWD/sessions"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Record the Pi version, DS4 version, provider/model, mode, session name, expected result, observed result, and pass/fail status for every scenario.
|
|
46
|
+
|
|
47
|
+
## Synthetic test data
|
|
48
|
+
|
|
49
|
+
Use unique non-sensitive values so duplicates from earlier runs cannot hide a failure. Example run label:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
beta1-run-01
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Example Pin:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
For beta1-run-01 verification, use Node.js 22 in this disposable project.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Example Memory:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
For beta1-run-01, the synthetic release channel is amber.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Never use real credentials, customer data, private paths, or production policy in dogfooding prompts.
|
|
68
|
+
|
|
69
|
+
## TUI procedure
|
|
70
|
+
|
|
71
|
+
Start a persistent interactive session:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pi --approve --session-dir "$DS4_DOGFOOD_SESSIONS" \
|
|
75
|
+
--name "ds4-beta-tui"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Run these scenarios in order:
|
|
79
|
+
|
|
80
|
+
1. Inspect `/context health`, `/context pins`, `/context memory`, and `/context privacy`.
|
|
81
|
+
2. Send an ordinary suggestion without asking to persist it, for example: `The synthetic release channel amber seems useful.` No `context_persistence` call or confirmation dialog should appear.
|
|
82
|
+
3. Explicitly request the synthetic Memory: `Remember for this session that the synthetic release channel for beta1-run-01 is amber.` Verify that the dialog identifies the action and canonical persistence class. Accept it. Expect one committed Memory mutation.
|
|
83
|
+
4. Ask the model to use `context_persistence` to list active Memory. Verify bounded metadata and no complete claim, key, reason, path, or raw error in the result.
|
|
84
|
+
5. Explicitly request the synthetic Pin, but reject or close the confirmation dialog. Verify with `/context pins` that it was not created.
|
|
85
|
+
6. Ask the model to retry using the sanitized value remaining in history. If it copies `[omitted-by-ds4-egress-policy]`, expect `rejected / egress-placeholder` before any new confirmation, runtime mutation, or append. If it asks for fresh text instead, record that safe routing result and run the exact-marker case from the JSON procedure.
|
|
86
|
+
7. Request the Pin again with fresh synthetic text and accept it. Ask the model to list Pins, then use the exact returned Pin ID and `targetRevision` to unpin it in the same process. Accept the destructive confirmation. Fuzzy targeting must not be used.
|
|
87
|
+
8. With a remote provider, request a `local-only` Pin. Expect provider-policy denial before confirmation and no append.
|
|
88
|
+
9. Restart Pi and continue the session:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pi --approve --session-dir "$DS4_DOGFOOD_SESSIONS" -c
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Verify the accepted Memory remains visible. Revision handles from the previous process are intentionally invalid; perform a fresh read before any targeted write.
|
|
95
|
+
10. Run `/context rebuild-index`, then verify the same canonical Memory/Pin lifecycle state is reconstructed.
|
|
96
|
+
|
|
97
|
+
TUI passes when accepted writes append once, refusal/closure appends nothing, destructive writes require an exact fresh revision, ordinary conversation does not persist, and rebuild preserves canonical state.
|
|
98
|
+
|
|
99
|
+
## RPC procedure
|
|
100
|
+
|
|
101
|
+
RPC mode exposes extension dialogs through a JSON request/response protocol. It reports `ctx.hasUI=true` because a client can answer those requests; the client is the UI bridge.
|
|
102
|
+
|
|
103
|
+
Start a persistent RPC process from the disposable project:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
pi --mode rpc --approve \
|
|
107
|
+
--session-dir "$DS4_DOGFOOD_SESSIONS" \
|
|
108
|
+
--name "ds4-beta-rpc" \
|
|
109
|
+
2>evidence/rpc.stderr.log
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Enter one JSON object per line on stdin. First request a read:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{"id":"read-1","type":"prompt","message":"Use context_persistence with action pins_list to inspect active Pins. Do not perform a write."}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Wait for the turn to end before sending the next prompt. For a write:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{"id":"write-1","type":"prompt","message":"Persist a session Pin for beta1-run-01 stating that this disposable project uses Node.js 22 for verification."}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Pi should emit a request shaped like:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{"type":"extension_ui_request","id":"<dynamic-id>","method":"confirm","title":"DS4 Context Persistence","message":"..."}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
After inspecting the request, approve it with the exact dynamic ID:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{"type":"extension_ui_response","id":"<dynamic-id>","confirmed":true}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Expect the `context_persistence` tool result to report a committed outcome without echoing complete Pin content. Repeat with a different synthetic value and reject it:
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{"type":"extension_ui_response","id":"<dynamic-id>","confirmed":false}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The rejected call must report cancellation and append nothing. `{"cancelled":true}` is also a valid dialog dismissal response.
|
|
143
|
+
|
|
144
|
+
### RPC without a responding UI client
|
|
145
|
+
|
|
146
|
+
Start a separate disposable RPC process, request a write, and do not send an `extension_ui_response`. In Pi `0.84.3`, the confirmation remains pending because RPC still advertises UI capability. This is not converted to `confirmation-required`; no append may occur before a positive response. Terminate the disposable process after recording the pending request, then inspect the session from TUI.
|
|
147
|
+
|
|
148
|
+
### RPC without a persistent session
|
|
149
|
+
|
|
150
|
+
Start a separate process:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
pi --mode rpc --approve --no-session
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Send a read and a write prompt. Both must return `runtime-unavailable`; no `extension_ui_request` should be emitted and no canonical commit should be claimed.
|
|
157
|
+
|
|
158
|
+
RPC passes when positive confirmation commits once, negative/cancelled confirmation appends nothing, an unanswered dialog remains pending without append, `--no-session` fails before confirmation, and result content/details remain bounded and metadata-only.
|
|
159
|
+
|
|
160
|
+
## Print-mode procedure
|
|
161
|
+
|
|
162
|
+
Print mode has no extension UI. Keep session persistence enabled:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
pi -p --approve --session-dir "$DS4_DOGFOOD_SESSIONS" \
|
|
166
|
+
"Use context_persistence with action memory_list to inspect active Memory. Do not write."
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The read should complete. Then request a write:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
pi -p --approve --session-dir "$DS4_DOGFOOD_SESSIONS" \
|
|
173
|
+
"Use context_persistence to add a session Memory saying that beta1-run-01 uses the synthetic channel amber."
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Expected behavior:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
outcome=unavailable
|
|
180
|
+
errorCode=confirmation-required
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
No dialog can appear and no canonical custom entry may be appended. The assistant's final wording can vary; use JSON mode or the canonical audit below when the exact tool envelope is needed. If the model does not call the tool, record that separately as a routing observation and repeat with the explicit action name to isolate runtime behavior.
|
|
184
|
+
|
|
185
|
+
Adding `--no-session` changes the expected error to `runtime-unavailable` for both reads and writes.
|
|
186
|
+
|
|
187
|
+
## JSON event-stream procedure
|
|
188
|
+
|
|
189
|
+
JSON mode is also non-interactive, but it exposes authoritative tool lifecycle events. Capture the complete local stream; it may include current non-secret tool arguments.
|
|
190
|
+
|
|
191
|
+
Read case:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
pi --mode json --approve --session-dir "$DS4_DOGFOOD_SESSIONS" \
|
|
195
|
+
"Use context_persistence with action pins_list to inspect active Pins. Do not write." \
|
|
196
|
+
2>evidence/json-read.stderr.log | tee evidence/json-read.jsonl
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Write case:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
pi --mode json --approve --session-dir "$DS4_DOGFOOD_SESSIONS" \
|
|
203
|
+
"Use context_persistence to add a session Pin for beta1-run-01 stating that this disposable project uses Node.js 22." \
|
|
204
|
+
2>evidence/json-write.stderr.log | tee evidence/json-write.jsonl
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Reserved historical-placeholder regression:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
pi --mode json --approve --session-dir "$DS4_DOGFOOD_SESSIONS" \
|
|
211
|
+
"Call context_persistence exactly once with action pin_add, scope session, classification normal, and content exactly [omitted-by-ds4-egress-policy]." \
|
|
212
|
+
2>evidence/json-placeholder.stderr.log | tee evidence/json-placeholder.jsonl
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Extract tool completions:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
jq -c '
|
|
219
|
+
select(.type == "tool_execution_end" and .toolName == "context_persistence")
|
|
220
|
+
| {isError, result}
|
|
221
|
+
' evidence/json-*.jsonl
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
The read should succeed. The ordinary write must return `confirmation-required` and append nothing. The placeholder case must return `rejected / egress-placeholder`, not request confirmation, and append nothing. Inspect `result.content` and `result.details` for bounded allowlisted metadata; they must not echo complete content, claims, keys, reasons, paths, source-session identity, confirmation text, or raw errors.
|
|
225
|
+
|
|
226
|
+
The local `tool_execution_start.args` event can contain the current synthetic arguments supplied to the tool. That local event is not the provider-facing result contract, which is why dogfooding must use non-sensitive data and evidence files must not be published blindly.
|
|
227
|
+
|
|
228
|
+
## Canonical append audit
|
|
229
|
+
|
|
230
|
+
List only metadata for canonical Pin/Memory entries in the dedicated sessions:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
find "$DS4_DOGFOOD_SESSIONS" -name '*.jsonl' -print0 \
|
|
234
|
+
| xargs -0 -r jq -r '
|
|
235
|
+
select(
|
|
236
|
+
.type == "custom"
|
|
237
|
+
and (
|
|
238
|
+
.customType == "ds4-context-pin-v1"
|
|
239
|
+
or .customType == "ds4-context-memory-v1"
|
|
240
|
+
)
|
|
241
|
+
)
|
|
242
|
+
| [.customType, .id, .timestamp, (.data.operation // "unknown")]
|
|
243
|
+
| @tsv
|
|
244
|
+
'
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Expected invariants:
|
|
248
|
+
|
|
249
|
+
- each accepted canonical add/supersede/status operation contributes exactly one append-only custom entry;
|
|
250
|
+
- cancelled, rejected, unavailable, and unanswered-confirmation operations contribute none;
|
|
251
|
+
- print/JSON writes contribute none;
|
|
252
|
+
- `--no-session` contributes none;
|
|
253
|
+
- source include/exclude policy contributes no Pin/Memory custom entry because it is derived local SQLite policy;
|
|
254
|
+
- rebuild changes projections, not the JSONL mutation sequence.
|
|
255
|
+
|
|
256
|
+
Do not publish the session files: they are canonical local history and may contain prompt/tool argument text even when tool results are metadata-only.
|
|
257
|
+
|
|
258
|
+
## Extended provider and lifecycle matrix
|
|
259
|
+
|
|
260
|
+
After the basic mode matrix passes, repeat the relevant TUI/RPC cases with:
|
|
261
|
+
|
|
262
|
+
- a configured remote provider;
|
|
263
|
+
- a verified local provider whose exact provider ID is listed in `privacy.localProviders`;
|
|
264
|
+
- privacy enabled and disabled;
|
|
265
|
+
- a provider switch between read and targeted write;
|
|
266
|
+
- a branch switch between read and targeted write;
|
|
267
|
+
- trusted and untrusted project state;
|
|
268
|
+
- two simultaneous Pi sessions using the shared SQLite database;
|
|
269
|
+
- cross-session project Memory when `memory.crossSession` is explicitly enabled.
|
|
270
|
+
|
|
271
|
+
Provider, trust, branch, provenance, capability, target state, and classification changes after confirmation must fail safely. A model-supplied `local-only` classification is never evidence that earlier input stayed local.
|
|
272
|
+
|
|
273
|
+
## Storage containment and offline maintenance candidate
|
|
274
|
+
|
|
275
|
+
For a build that includes bounded storage support, keep normal online validation separate from physical maintenance.
|
|
276
|
+
|
|
277
|
+
While Pi is running:
|
|
278
|
+
|
|
279
|
+
1. Run `/context storage`; verify metadata-only output and no manifest/message/Pin/Memory/snippet/tool content.
|
|
280
|
+
2. Run `/context health`; a storage high-water warning must produce `WARN` while SQLite quick/FK/schema checks remain independently visible.
|
|
281
|
+
3. Perform multiple normal model calls and verify manifest count converges toward `128` without startup pause or provider-request changes.
|
|
282
|
+
4. Verify provider usage remains visible after close/reopen and that `manifest_json` is not rewritten at `message_end` in a disposable test database.
|
|
283
|
+
5. Start a second current-version Pi process against the same disposable database; both client leases must exist, and closing each process must remove only its own lease.
|
|
284
|
+
|
|
285
|
+
Do not compact a live or production database as part of ordinary dogfooding. On an explicitly disposable copy only:
|
|
286
|
+
|
|
287
|
+
1. close every Pi process;
|
|
288
|
+
2. run `ds4-context-storage inspect --database <exact-copy-path>`;
|
|
289
|
+
3. preserve the metadata output;
|
|
290
|
+
4. run `compact` and complete the local TTY confirmation;
|
|
291
|
+
5. verify the fixed backup exists, manifest/calibration limits converge, source exclusions remain, and quick/FK/schema checks pass;
|
|
292
|
+
6. reopen the copy through Pi, run `/context health` and `/context storage`, then verify Pin/Memory/source-policy projections;
|
|
293
|
+
7. retain the backup during observation and remove it manually afterward.
|
|
294
|
+
|
|
295
|
+
Also verify refusal for an active client, an existing backup/stage, insufficient simulated disk, a corrupt source, and ambiguous recovery state. Maintenance of the actual user database requires a separate explicit authorization after online dogfooding succeeds. See [`STORAGE_MAINTENANCE.md`](STORAGE_MAINTENANCE.md).
|
|
296
|
+
|
|
297
|
+
## Result record
|
|
298
|
+
|
|
299
|
+
Use one record per scenario:
|
|
300
|
+
|
|
301
|
+
```text
|
|
302
|
+
Run ID:
|
|
303
|
+
Date:
|
|
304
|
+
Pi version:
|
|
305
|
+
DS4 exact version:
|
|
306
|
+
Provider/model:
|
|
307
|
+
Mode and session persistence:
|
|
308
|
+
Scenario:
|
|
309
|
+
Expected outcome:
|
|
310
|
+
Observed outcome:
|
|
311
|
+
Confirmation shown/answered:
|
|
312
|
+
Canonical entries before/after:
|
|
313
|
+
Projection/rebuild observation:
|
|
314
|
+
Result leak check:
|
|
315
|
+
Pass/fail:
|
|
316
|
+
Issue/reference:
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
## Promotion criteria
|
|
320
|
+
|
|
321
|
+
Do not promote the beta if any run shows:
|
|
322
|
+
|
|
323
|
+
- a write without a fresh positive local UI decision;
|
|
324
|
+
- canonical JSONL rewrite, loss, duplication, or a false commit claim;
|
|
325
|
+
- complete persistent content or prohibited metadata in provider-facing results/history;
|
|
326
|
+
- fuzzy destructive targeting or acceptance of a stale revision;
|
|
327
|
+
- failure to reconstruct canonical state from JSONL;
|
|
328
|
+
- an actionable warning hidden as routine debug output;
|
|
329
|
+
- a reproducible regression above the release latency/quality/schema gates.
|
|
330
|
+
|
|
331
|
+
A missing live local-provider run should remain explicitly recorded rather than inferred from remote-provider or automated-test results.
|
|
@@ -69,7 +69,7 @@ Pi JSONL, reference-adapter JSONL, and live project files are never deleted by a
|
|
|
69
69
|
| minimum Node and current LTS | CI matrix: Node `22.19.0` and `24.x` |
|
|
70
70
|
| migration/privacy/limitations/rollback docs | this document, `STORAGE.md`, `PRIVACY.md`, adapter/KV documentation |
|
|
71
71
|
|
|
72
|
-
The latency check loads exact `ds4-context-core@0.1.2` and the local
|
|
72
|
+
The latency check loads exact `ds4-context-core@0.1.2` and the local candidate build in one process, runs the same deterministic feature-disabled 401-message fixture, alternates samples to reduce host drift, amortizes 50 planner calls per reported sample to reduce sub-millisecond noise, and rejects a p95 ratio above `1.10`. The comparison contains only timings and package versions.
|
|
73
73
|
|
|
74
74
|
## Candidate validation
|
|
75
75
|
|
package/docs/RELEASING.md
CHANGED
|
@@ -41,7 +41,7 @@ npm run latency:check -- "$BASELINE_DIR/node_modules/ds4-context-core"
|
|
|
41
41
|
rm -rf "$BASELINE_DIR"
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
The check rejects a candidate p95 above 110% of the exact 0.1.2 baseline. Run latency measurements on an otherwise idle host and repeat an anomalous run before drawing a release conclusion. See [`RELEASE_READINESS_0.2.0.md`](RELEASE_READINESS_0.2.0.md) for the stable-line gate matrix, the versioned notes under [`releases/`](releases/) for prerelease evidence, and [`DOGFOODING_0.3.
|
|
44
|
+
The check rejects a candidate p95 above 110% of the exact 0.1.2 baseline. Each reported sample amortizes 50 identical planner calls to reduce sub-millisecond timer and scheduler noise without weakening the threshold. Run latency measurements on an otherwise idle host and repeat an anomalous run before drawing a release conclusion. See [`RELEASE_READINESS_0.2.0.md`](RELEASE_READINESS_0.2.0.md) for the stable-line gate matrix, the versioned notes under [`releases/`](releases/) for prerelease evidence, and [`DOGFOODING_0.3.0_BETA.md`](DOGFOODING_0.3.0_BETA.md) for the current post-publication operating matrix.
|
|
45
45
|
|
|
46
46
|
CI runs the same checks on the minimum supported Node.js version and the current Node.js LTS line. `npm run pack:check` uses a temporary directory and removes it when complete. Set `DS4_KEEP_PACK_TMP=1` only when diagnosing a failed package check.
|
|
47
47
|
|
|
@@ -82,12 +82,12 @@ npm publish --workspace ds4-context-reference-adapter --access public
|
|
|
82
82
|
npm publish --access public
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Prereleases must pass the same explicit channel tag to all three commands so they cannot move `latest`. For a 0.3
|
|
85
|
+
Prereleases must pass the same explicit channel tag to all three commands so they cannot move `latest`. For a 0.3 beta:
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
|
-
npm publish --workspace ds4-context-core --access public --tag
|
|
89
|
-
npm publish --workspace ds4-context-reference-adapter --access public --tag
|
|
90
|
-
npm publish --access public --tag
|
|
88
|
+
npm publish --workspace ds4-context-core --access public --tag beta
|
|
89
|
+
npm publish --workspace ds4-context-reference-adapter --access public --tag beta
|
|
90
|
+
npm publish --access public --tag beta
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
After prerelease publication, verify both the exact artifacts and that `latest` still resolves to the intended stable version. If core succeeds but an adapter publication fails, fix that adapter release and retry it with the same version and channel tag. Do not rewrite or unpublish a valid core release merely to make the commands appear atomic.
|
package/docs/STORAGE.md
CHANGED
|
@@ -115,7 +115,19 @@ A full index rebuild replays all message entries, recreates missing qualifying o
|
|
|
115
115
|
|
|
116
116
|
For persisted sessions, each `context` hook stores a metadata-only manifest containing token counts, session/project/pin/memory source and atomic-group IDs, inclusion/exclusion reasons, classifications and scores, original/selected counts, exact-model override/calibration/adaptive budgets, aggregate learned-ranking status/disagreement, model-switch/cache disposition, provider destination/allow names, privacy counters, optional continuation mode/item counts/retry reasons, project revision/hash/line references, tool names, a SHA-256 prompt hash, and planner/policy versions. Prompt text, message text, pin content, memory claims, project snippet text, tool arguments, image data, rendered provider payloads, and provider response/conversation IDs are not stored in the manifest.
|
|
117
117
|
|
|
118
|
-
`before_provider_request` updates the pending manifest with final-check/redaction counters but never the provider payload. The following finalized assistant response updates
|
|
118
|
+
`before_provider_request` updates the pending in-memory manifest with final-check/redaction counters but never the provider payload. The following finalized assistant response updates only the existing scalar usage columns (`actual_tokens`, `input_tokens`, `cache_read_tokens`, and `cache_write_tokens`) and adds at most one exact-model calibration sample. It does not read or rewrite `manifest_json`. Repository reads hydrate authoritative usage from those columns. Ephemeral, oversize-skipped, concurrently pruned, and otherwise uncorrelated manifests retain bounded calibration only in memory.
|
|
119
|
+
|
|
120
|
+
Retention is bounded without a schema change: SQLite keeps the latest 128 manifests globally and at most 200 calibration samples for each provider/model/estimator profile. A manifest prune first detaches its small calibration row, then removes the large diagnostic JSON; calibration has its own per-profile retention. Save and prune are one transaction. Existing oversized stores are reduced incrementally by at most 32 rows and 8 MiB of serialized manifest payload per subsequent manifest write; one individually oversized oldest row may be removed to guarantee progress. There is no startup purge.
|
|
121
|
+
|
|
122
|
+
New manifest persistence is byte-bounded. Payloads up to 256 KiB remain complete. Larger payloads preserve all `included` provenance and replace only the `excluded` inventory with a deterministic first/last sample of at most 256 details plus explicit `ds4-context-manifest-inventory-v1` counts, token/classification/kind rollups, and digests. The wrapper returned by `getStored()` declares `complete` or `excluded-rollup`; the live runtime manifest remains complete. A projected payload over 1 MiB is skipped without affecting the model request. Deleted pages become reusable by SQLite but do not promise an immediate reduction in filesystem size. Manifests and calibration remain disposable; Pi JSONL and project files are untouched.
|
|
123
|
+
|
|
124
|
+
## Storage diagnostics and offline maintenance
|
|
125
|
+
|
|
126
|
+
`/context storage` is read-only and metadata-only. It reports schema/journal, database and sidecar sizes, page/free-page counts, bounded manifest/calibration aggregates, active-project aggregate counts, artifact totals, convergence, and categorical maintenance reasons. `/context health` reports storage warning state separately from SQLite integrity: high-water or retention warnings produce an overall `WARN` without changing `DatabaseHealth.ok`.
|
|
127
|
+
|
|
128
|
+
File-backed runtime clients use a private two-phase lease next to the database. An explicit maintenance lock prevents new clients from opening SQLite, and active or ambiguous client leases block compaction. Database close precedes lease release. Pi remains on its existing fallback path if it starts while maintenance is active.
|
|
129
|
+
|
|
130
|
+
Physical size recovery uses the separately packaged, interactive `ds4-context-storage` CLI. It creates and validates a standalone backup, rewrites only an offline working copy, runs `VACUUM INTO` a candidate, checks schema/migrations/foreign keys, protected-table counts and private full-row digests, and source exclusions, then performs a persisted recoverable swap that retires WAL/SHM sidecars before installing the candidate. It never runs automatically or through an LLM-callable tool, never overwrites its fixed backup, and never edits Pi JSONL or project files. See [`STORAGE_MAINTENANCE.md`](STORAGE_MAINTENANCE.md).
|
|
119
131
|
|
|
120
132
|
## Compaction summaries
|
|
121
133
|
|
|
@@ -137,4 +149,6 @@ Rollback is also projection-based. A 0.1 binary refuses schema 15 by design. Sto
|
|
|
137
149
|
|
|
138
150
|
A full rebuild does not blindly delete unchanged entries. It upserts all observed entries, marks them in a temporary seen-set, and removes only stale rows. This preserves foreign-key provenance for unchanged source entries. FTS rows and checkpoint state update in the same transaction.
|
|
139
151
|
|
|
140
|
-
Session reconciliation is transactional. Memory/pin mutation replacement, checkpoint update, source exclusion and full materialization each occur under the shared write coordinator. Each quality upsert and bounded-retention prune share one transaction; quality failures do not affect manifests or planning. Each changed project file is
|
|
152
|
+
Session reconciliation is transactional. Memory/pin mutation replacement, checkpoint update, source exclusion and full materialization each occur under the shared write coordinator. Each manifest upsert and dual-bound incremental retention prune share one transaction; each scalar usage/calibration update and its independent per-profile prune do the same. Each quality upsert and bounded-retention prune also share one transaction; quality failures do not affect manifests or planning. Each changed project file is replaced transactionally with its snippets and FTS rows; embedding upserts and canonical-source pruning are transactional; artifact object/reference metadata and project deletion batches are atomic. A filesystem artifact write precedes its metadata transaction, so an interrupted metadata write may leave only an unreferenced content-addressed cache file; canonical JSONL remains sufficient for recovery. If manifest serialization, projection, retention, or SQLite writing fails, the complete current manifest remains in memory and the provider request is unchanged. Other artifact/project failures contribute no replacement/snippets; planner failures discard all synthetic evidence; Pi continues with its native context.
|
|
153
|
+
|
|
154
|
+
After bounded busy-aware replay is exhausted, DS4 emits `database.write_lock_timeout` with only the coordinator operation name, attempt count, elapsed/configured waits, and SQLite primary code. The thrown error repeats the operation and categorical lock status but never includes SQL, bound values, provider content, or the raw SQLite message. Retry and rollback diagnostics follow the same metadata-only rule.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Offline SQLite Storage Maintenance
|
|
2
|
+
|
|
3
|
+
DS4 keeps `context.db` as disposable derived state, while Pi session JSONL and live project files remain canonical. Normal runtime retention stops unbounded manifest growth and makes deleted pages reusable. It does not promise that an existing high-water SQLite file shrinks physically.
|
|
4
|
+
|
|
5
|
+
Physical compaction is therefore an explicit offline operation. It is never model-callable, never runs at startup, and never edits Pi JSONL or project files.
|
|
6
|
+
|
|
7
|
+
## Commands
|
|
8
|
+
|
|
9
|
+
The root package installs:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
ds4-context-storage inspect --database <exact-path>
|
|
13
|
+
ds4-context-storage compact --database <exact-path>
|
|
14
|
+
ds4-context-storage recover --database <exact-path>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`inspect` is metadata-only and read-only. `compact` and `recover` require an interactive local TTY; there is no V1 `--yes` option. The database path is mandatory and is normalized before use.
|
|
18
|
+
|
|
19
|
+
Typical default path:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
~/.pi/agent/ds4-context/context.db
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Do not run `compact` until every Pi process that may use that database is closed. On Linux, an additional read-only holder check can be made with:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
fuser -v context.db context.db-wal context.db-shm
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The utility never terminates a process.
|
|
32
|
+
|
|
33
|
+
## Online diagnostics first
|
|
34
|
+
|
|
35
|
+
With Pi running:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
/context health
|
|
39
|
+
/context storage
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`/context storage` reports only schema, journal mode, file/page sizes, manifest and calibration counts, current-project aggregate counts, artifact totals, convergence state, and categorical maintenance reasons. It does not expose manifest rows, messages, claims, snippets, tool payloads, SQL, or raw SQLite errors.
|
|
43
|
+
|
|
44
|
+
A storage warning makes overall health display `WARN`, but it does not make SQLite corruption checks fail and does not alter the provider request.
|
|
45
|
+
|
|
46
|
+
## Cooperative exclusion protocol
|
|
47
|
+
|
|
48
|
+
Each new file-backed `ContextDatabase` client creates a private lease under:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
context.db.clients/<client-id>.json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The lease contains only protocol version, client ID, PID, creation time, and a database-path fingerprint. The database is opened only after a two-phase check for:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
context.db.maintenance.lock
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The maintenance utility creates that lock exclusively and refuses compaction when a verified client is alive or a lease/PID is ambiguous. Verified dead-client leases may be removed. A process started during maintenance sees the lock, does not open SQLite, and leaves Pi on its existing fallback path. Database close occurs before client-lease removal.
|
|
61
|
+
|
|
62
|
+
Older DS4 versions do not create leases, so the interactive assertion that every Pi instance is closed remains mandatory.
|
|
63
|
+
|
|
64
|
+
## Compact protocol
|
|
65
|
+
|
|
66
|
+
`compact` performs these phases:
|
|
67
|
+
|
|
68
|
+
1. validate exact path, regular-file type, stage-file absence, schema 15, migration checksums, `quick_check`, and foreign keys;
|
|
69
|
+
2. acquire the maintenance lock and refuse active or ambiguous clients;
|
|
70
|
+
3. verify conservative free space for backup, working copy, candidate, and safety margin;
|
|
71
|
+
4. create a standalone SQLite backup using `node:sqlite.backup()` from a read-only source connection;
|
|
72
|
+
5. validate that backup;
|
|
73
|
+
6. create an exclusive working copy from the backup;
|
|
74
|
+
7. on the working copy only, retain 128 newest manifests, retain 200 calibration samples per exact profile, detach calibration from deleted manifests, and rewrite retained manifests through the bounded serializer;
|
|
75
|
+
8. checkpoint and close the working copy;
|
|
76
|
+
9. create `context.db.compact-ready` with `VACUUM INTO`;
|
|
77
|
+
10. validate quick/FK/schema checks, hard manifest bounds, protected-table counts and private full-row digests, and source-exclusion keys;
|
|
78
|
+
11. persist swap state, retire the source and its WAL/SHM sidecars, install the candidate, fsync, and validate again;
|
|
79
|
+
12. remove temporary working/retired files, release the lock, and retain exactly one fixed backup.
|
|
80
|
+
|
|
81
|
+
The fixed files are:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
context.db.maintenance-work
|
|
85
|
+
context.db.compact-ready
|
|
86
|
+
context.db.precompact.bak
|
|
87
|
+
context.db.swap-old
|
|
88
|
+
context.db.maintenance-state.json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Existing stage or backup files are never overwritten. A failure before swap leaves the source in place. A failure during swap attempts immediate restoration of the retired source and sidecars. Persisted state supports deterministic recovery after process interruption.
|
|
92
|
+
|
|
93
|
+
## Recover
|
|
94
|
+
|
|
95
|
+
Use `recover` only when a prior operation reports recovery state or leaves `context.db.maintenance-state.json`.
|
|
96
|
+
|
|
97
|
+
The command fails closed on ambiguous combinations. Depending on the persisted phase it will:
|
|
98
|
+
|
|
99
|
+
- remove uninstalled staging while retaining the source;
|
|
100
|
+
- restore the retired source after an interrupted first rename;
|
|
101
|
+
- keep a valid installed candidate and clean the retired source;
|
|
102
|
+
- restore the retired source when the installed candidate fails validation.
|
|
103
|
+
|
|
104
|
+
Every database selected for use is checked again. Persisted state is accepted only when every fixed path matches the selected database. Recovery does not guess from timestamps or file sizes and never overwrites the fixed backup.
|
|
105
|
+
|
|
106
|
+
## Post-maintenance checks
|
|
107
|
+
|
|
108
|
+
After successful compaction:
|
|
109
|
+
|
|
110
|
+
1. retain `context.db.precompact.bak`;
|
|
111
|
+
2. reopen Pi;
|
|
112
|
+
3. run `/context health` and `/context storage`;
|
|
113
|
+
4. verify expected Pin, Memory, and local project-source exclusion behavior;
|
|
114
|
+
5. dogfood normal model calls;
|
|
115
|
+
6. remove the backup manually only after the observation period succeeds.
|
|
116
|
+
|
|
117
|
+
If rollback is needed, close Pi before invoking recovery or manually restoring the validated standalone backup. No storage rollback requires a Pi JSONL change.
|
|
118
|
+
|
|
119
|
+
## Packaging and privacy
|
|
120
|
+
|
|
121
|
+
Package verification rejects database, WAL, SHM, backup, candidate, work, retired swap, lock, state, client-lease, JSONL, `.pi`, and `.serena` paths. Protected-table digests are compared only in process and are never printed. CLI output is bounded to phases, counts, sizes, schema/check status, exact user-selected local paths, and categorical recovery guidance.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DS4 Context Engine 0.3.0-alpha.5
|
|
2
2
|
|
|
3
|
-
Status:
|
|
3
|
+
Status: published prerelease on 2026-09-02; tag `v0.3.0-alpha.5`.
|
|
4
4
|
|
|
5
5
|
This coordinated prerelease adds overflow-safe hierarchical compaction for discarded source that cannot fit in one active-model summary request. It preserves strict summary validation, privacy sanitization, canonical Pi JSONL semantics, one final Pi compaction entry, and fail-closed fallback to Pi default compaction.
|
|
6
6
|
|
|
@@ -30,7 +30,7 @@ ds4-context-reference-adapter
|
|
|
30
30
|
ds4-context-engine
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Both adapters depend exactly on `ds4-context-core@0.3.0-alpha.5`.
|
|
33
|
+
Both adapters depend exactly on `ds4-context-core@0.3.0-alpha.5`. The packages were published manually under the explicit npm `alpha` dist-tag while `latest` remains `0.2.0`. GitHub Actions remains validation-only with OIDC and package-write permissions denied.
|
|
34
34
|
|
|
35
35
|
## Validation evidence
|
|
36
36
|
|
|
@@ -45,9 +45,11 @@ Local candidate verification on Node.js `26.5.1`:
|
|
|
45
45
|
- `npm pack --dry-run --json` for all three packages passed with the same bounded inventories and no forbidden local/session files.
|
|
46
46
|
- The committed candidate was replayed from detached clean checkout `8b609c0`; `npm ci`, the 65-file/297-test suite, quality, schema, package verification, tarball review, latency retry, and `git diff --check` passed.
|
|
47
47
|
- `git diff --check`: passed.
|
|
48
|
+
- Validation-only CI passed on Node.js `22.19.0` and `24.x`; an initial unrelated schema-v10 upgrade-test timeout on Node 22 passed three isolated local reruns and the failed-job retry.
|
|
48
49
|
- Protected CI, compatibility golden, Pi fixture, migration, canonical Pin/Memory, persistence confirmation, and persistence result-contract files are unchanged.
|
|
50
|
+
- `npm run registry:check -- 0.3.0-alpha.5`: passed against all three exact published versions; `alpha` resolves to `0.3.0-alpha.5` and `latest` remains `0.2.0` for every package.
|
|
49
51
|
|
|
50
|
-
Exact registry verification
|
|
52
|
+
Exact registry verification passed before the annotated tag and GitHub prerelease were created.
|
|
51
53
|
|
|
52
54
|
## Documentation
|
|
53
55
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# DS4 Context Engine 0.3.0-beta.1
|
|
2
|
+
|
|
3
|
+
Status: release candidate; publication and exact registry verification pending.
|
|
4
|
+
|
|
5
|
+
This coordinated beta contains SQLite growth caused by persisted Context Manifests and adds explicit, recoverable offline maintenance for already-large derived databases. It also hardens compaction provider retries while preserving strict grounding, privacy filtering, canonical Pi JSONL semantics, atomic tool exchanges, one final Pi compaction entry, and fail-open delegation to Pi.
|
|
6
|
+
|
|
7
|
+
## Added
|
|
8
|
+
|
|
9
|
+
- Retains at most 128 Context Manifests globally and at most 200 calibration samples per exact provider/model/estimator profile.
|
|
10
|
+
- Bounds each online manifest prune to 32 rows and 8 MiB, while allowing one individually oversized oldest row to be removed so convergence cannot stall.
|
|
11
|
+
- Persists complete manifests up to 256 KiB; larger manifests retain complete included provenance and a deterministic excluded-only rollup with complete counts, aggregates, and digests plus at most 256 sampled excluded details.
|
|
12
|
+
- Skips manifest persistence above the 1 MiB hard bound without altering the active in-memory manifest or provider request.
|
|
13
|
+
- Exposes persisted inventory completeness through `getStored()` while legacy complete rows remain readable through `get()`.
|
|
14
|
+
- Adds metadata-only `/context storage` diagnostics and storage high-water integration in `/context health`.
|
|
15
|
+
- Adds cooperative database client leases and a two-phase maintenance lock; active or ambiguous clients block physical maintenance.
|
|
16
|
+
- Adds the `ds4-context-storage inspect|compact|recover --database <exact-path>` CLI. Mutating commands require a local TTY and have no non-interactive bypass.
|
|
17
|
+
- Adds standalone backup, working-copy transformation, validated `VACUUM INTO` candidate, protected-table full-row digests, recoverable swap state, and deterministic crash recovery.
|
|
18
|
+
|
|
19
|
+
## Changed
|
|
20
|
+
|
|
21
|
+
- Provider usage is authoritative in scalar Context Manifest columns; `message_end` no longer rewrites `manifest_json`.
|
|
22
|
+
- Only compaction failures categorized as `transport` are retried, with at most three attempts, abort-aware 200 ms and 500 ms delays, fresh routing session IDs, and cumulative usage accounting.
|
|
23
|
+
- Runtime startup during maintenance degrades safely to Pi fallback with categorical diagnostics rather than exposing raw SQLite messages.
|
|
24
|
+
- SQLite lock timeout and rollback diagnostics expose bounded categories, operation names, attempt counts, and numeric SQLite codes rather than raw database errors.
|
|
25
|
+
- Package verification rejects database, WAL, SHM, backup, staging, retired-swap, maintenance-state, client-lease, JSONL, `.pi`, and `.serena` paths.
|
|
26
|
+
|
|
27
|
+
## Safety and compatibility
|
|
28
|
+
|
|
29
|
+
Pi JSONL remains canonical and append-only. Physical maintenance never edits session history or project files and is unavailable to model-callable tools. Every `context_persistence` write still requires a fresh positive local UI decision, exact destructive targeting remains revision-bound, and canonical Pin/Memory mutations still append through Pi before SQLite reconciliation.
|
|
30
|
+
|
|
31
|
+
An individually oversized compaction group, unsupported exact value, non-transport provider failure, abort, or bounded-operation failure still delegates to Pi default compaction. Rejected values and provider payloads are not emitted in diagnostics.
|
|
32
|
+
|
|
33
|
+
SQLite schema remains 15. Migrations 1–15, `ds4-context-config-v1`, `runtime-adapter-v1`, `ds4-context-persistence-tool-v1`, and `ds4-context-persistence-result-v1` are unchanged. Earlier schema-15 readers can parse additive rollup metadata but may present sampled excluded details as complete, so historical excluded-inventory rendering is unsupported after downgrade once rollups have been written.
|
|
34
|
+
|
|
35
|
+
## Package/version policy
|
|
36
|
+
|
|
37
|
+
The coordinated version is `0.3.0-beta.1` for:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
ds4-context-core
|
|
41
|
+
ds4-context-reference-adapter
|
|
42
|
+
ds4-context-engine
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Both adapters depend exactly on `ds4-context-core@0.3.0-beta.1`. Publication uses the explicit npm `beta` dist-tag for all three packages while `latest` must remain stable `0.2.0`. GitHub Actions remains validation-only with OIDC and package-write permissions denied.
|
|
46
|
+
|
|
47
|
+
## Candidate validation evidence
|
|
48
|
+
|
|
49
|
+
Local candidate verification on Node.js `26.5.1`:
|
|
50
|
+
|
|
51
|
+
- `npm run check`: 69 files and 341 tests passed.
|
|
52
|
+
- Three consecutive focused multi-process SQLite concurrency runs passed.
|
|
53
|
+
- `npm run quality:compare`: candidate quality `0.9875` versus baseline `0.808156`.
|
|
54
|
+
- `npm run schema:context-persistence`: 1,266 bytes and 317 estimated tokens; below the 1,500 absolute and 320 relative limits.
|
|
55
|
+
- `npm run latency:check -- <exact ds4-context-core@0.1.2>`: passed after clean install with ratio `0.93982`, at or below `1.10`, using 200 samples and 50 calls per sample.
|
|
56
|
+
- `npm run pack:check`: verified core (223 files), reference adapter (7 files), and Pi adapter (67 files) in a clean consumer.
|
|
57
|
+
- `npm pack --dry-run --json` for all three packages passed with the same inventories and no forbidden local/session/storage files.
|
|
58
|
+
- `git diff --check`: passed.
|
|
59
|
+
- Version, exact core dependencies, package-lock entries, extension constant, and reference-adapter constant are synchronized to `0.3.0-beta.1`.
|
|
60
|
+
- Protected compatibility golden, Pi JSONL fixture, migration definitions, canonical persistence contracts, and CI publication permissions are unchanged.
|
|
61
|
+
|
|
62
|
+
Large-database validation used a temporary private copy created from a read-only source connection; the live database was not compacted, vacuumed, rebuilt, replaced, or maintained:
|
|
63
|
+
|
|
64
|
+
- before: schema 15, `quick_check=ok`, 3,691 manifests, 2,101,666,663 manifest bytes, 2,489,868,288 database bytes;
|
|
65
|
+
- after: 128 manifests, 15,626,529 manifest bytes, 414 calibration samples across three profiles, 389,746,688 database bytes;
|
|
66
|
+
- all 128 retained oversized manifests were rewritten as explicit `excluded-rollup` projections with no irreducible oversize;
|
|
67
|
+
- the final candidate passed quick check and foreign-key validation while the standalone backup remained present;
|
|
68
|
+
- temporary copy, backup, and stage files were removed afterward, with no maintenance artifact created next to the live database or in the repository.
|
|
69
|
+
|
|
70
|
+
Publication, exact registry verification, annotated tag, and GitHub prerelease are performed only after the committed candidate passes validation-only CI.
|
|
71
|
+
|
|
72
|
+
## Documentation
|
|
73
|
+
|
|
74
|
+
- [`../CONTEXT_MANIFEST.md`](../CONTEXT_MANIFEST.md)
|
|
75
|
+
- [`../STORAGE.md`](../STORAGE.md)
|
|
76
|
+
- [`../STORAGE_MAINTENANCE.md`](../STORAGE_MAINTENANCE.md)
|
|
77
|
+
- [`../COMPACTION.md`](../COMPACTION.md)
|
|
78
|
+
- [`../ARCHITECTURE.md`](../ARCHITECTURE.md)
|
|
79
|
+
- [`../DOGFOODING_0.3.0_BETA.md`](../DOGFOODING_0.3.0_BETA.md)
|
|
80
|
+
- [`../RELEASING.md`](../RELEASING.md)
|
|
81
|
+
- [`0.3.0-alpha.5.md`](0.3.0-alpha.5.md)
|