dsh-github-copilot 0.4.0-alpha.122 → 0.4.0-alpha.124

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.
@@ -0,0 +1,388 @@
1
+ # Local diagnostics: account and compaction pilot
2
+
3
+ Roadmap: [#347](https://github.com/cloga/dsh-github-copilot/issues/347).
4
+ Phase 0: [#354](https://github.com/cloga/dsh-github-copilot/issues/354).
5
+ Phases 1–2: [#356](https://github.com/cloga/dsh-github-copilot/issues/356).
6
+ Reviewed source baseline: plugin alpha.123 and official DSH
7
+ `0.2.0-rc.2`, commit `639ed015397290b3745d163aafe02ffee4aa3f84`.
8
+
9
+ **Runtime pilot, default off. Publication, installation, loaded Host and enabled
10
+ collection are separate states.** This feature does not install itself, restart
11
+ Desktop, enable a live profile, create a daily task or upload observations.
12
+ No historical failure rate is reconstructed.
13
+
14
+ ## Enable, read, pause and clear
15
+
16
+ After installing and loading the published build, open the plugin's detail
17
+ settings page and find **Local diagnostics**. On hosts without that page the
18
+ same additive control accompanies the existing Models/footer or settings-section
19
+ search-routing fallback. **Read status** must show ready storage; choose
20
+ **Enable local collection** to persist only `github-copilot.diagnosticsEnabled`
21
+ through native path-level Settings CAS and confirm readback. This enables
22
+ collection **and bounded local aggregate persistence**, not exports or uploads.
23
+ The normal installation does not change this default-off setting.
24
+
25
+ Use the plugin normally: account selection, Identity/Checking and compaction
26
+ will contribute independent Client/Host populations. **Read status** returns a
27
+ strict aggregate snapshot; **Review aggregate-only JSON → Prepare current JSON**
28
+ prepares a read-only copy for explicit review/sharing, never a download or upload.
29
+ The coding session does not automatically gain access to the running Host.
30
+ Pause preserves retained evidence and closes active observations as interrupted.
31
+ It remains available for a configured-on collector when storage is unavailable;
32
+ enabling still requires ready storage.
33
+ Clear requires a separate confirmation, advances an epoch and removes this
34
+ domain's aggregates without changing the enabled setting, accounts or history.
35
+ An uncertain write is not automatically replayed by the UI.
36
+
37
+ ## Storage and limits
38
+
39
+ The Host uses only the public storage-domain `global.get/set/close` seam and the
40
+ configured backend. The plugin pins Zod to the qualified published storage
41
+ type contract; no shared schemas, prototypes or Core artifacts are adapted.
42
+ The official JSON backend root is **DSH-home shared**, so
43
+ the plugin addresses a separate domain using the public `profileContext.name`,
44
+ encoded as a bounded storage-unit suffix. The technical profile name is used
45
+ only for addressing, never included in rows, Remotes or exported JSON. Names
46
+ must be 1–48 ASCII letters, digits, underscores or hyphens; missing/unsupported
47
+ profile context fails explicitly rather than sharing another profile's data.
48
+ One writer per profile is required: the public JSON backend does not establish
49
+ cross-process locking for simultaneous Hosts writing the same domain.
50
+
51
+ Retain UTC-hour rows for 14 days, at most 4,096 rows, 128 live Host handles,
52
+ 128 live Client handles and a 128-row Client report buffer. Strict fixed ASCII
53
+ dimensions make the encoded snapshot ceiling an exact **2 MiB UTF-8** bound.
54
+ Evict oldest-hour rows first and expose eviction, drops, saturation, Client
55
+ unconfirmed acknowledgements and clock rollback. Rollback does not silently
56
+ erase already observed future-hour rows. Counts across a window boundary or
57
+ an eviction cannot establish a precise failure rate.
58
+
59
+ The Host coalesces writes on a ten-second cadence; the Client reports safe
60
+ rows/pending-age samples and reads collection status on a ten-second cadence.
61
+ These lifecycle-bound timers do **not** perform analysis, query credentials,
62
+ change request deadlines or trigger repair. Abrupt process loss can lose the
63
+ unflushed tail. Saved unfinished Host groups become interrupted on reopen,
64
+ attributed to their starting build, not resumable work. Client pending samples
65
+ are historical periodic samples, **not** an outstanding-operation gauge.
66
+ Clear/pause/enable epoch fences prevent late accepted reports or handles from
67
+ restoring pre-control evidence.
68
+ Epoch exhaustion blocks enabling explicitly; pause/close still stop collection
69
+ and record saturation even when the fence cannot advance.
70
+
71
+ `dirty` and `persistedAt` distinguish in-memory from confirmed persistence.
72
+ Missing backend/profile, corruption and failed writes remain named unavailable
73
+ or error evidence; account/compaction work is not rejected or retried for a
74
+ diagnostics failure. No ad-hoc file, Settings log or fallback backend is used.
75
+ Corrupt media is neither backed up nor silently reset; Clear cannot repair a
76
+ domain that cannot open. Public domain open loads external media before schema
77
+ validation: plugin-owned snapshots are bounded, but this is **not** a disk quota
78
+ or a pre-read bound on externally tampered files.
79
+
80
+ ## Coverage and interpretation
81
+
82
+ Host coverage includes global switch, Session select/inherit, logical identity
83
+ reads and shared physical identity flights, native compaction brackets and
84
+ managed physical summary calls inside the separately selected recovery engine.
85
+ Cache, cooldown and joined-flight stages remain distinct. A global-switch
86
+ preflight identity validation is a stage, not another shared-flight denominator.
87
+ Only the wrapped Client account/identity operations are reported, independently
88
+ of Host observations; no IDs correlate the layers and no end-to-end latency or
89
+ paint completion is inferred. Component teardown settles its own pending
90
+ Checking observations, without cancelling the actual business request.
91
+
92
+ Outcomes distinguish success, cancellation with actual signal evidence, policy
93
+ rejection, revocation, environment fault, failure, interruption and unknown.
94
+ Concurrent validation stages record cumulative operation age, not exclusive
95
+ phase duration. A fulfilled error-shaped account view is not success.
96
+ Compaction success requires a matching observed compact-checkpoint **and**
97
+ successful end; summary fulfillment alone is not recovery success. No-checkpoint
98
+ ends are unknown, not guessed no-op/prune-only success. Commit evidence remains
99
+ separate if the end later fails. Selected managed-summary cancellation supplies
100
+ signal evidence; arbitrary native error text cannot establish cancellation.
101
+
102
+ Stock/custom-engine physical summaries, recovery opt-out/native-only summary
103
+ branches, OAuth Add/reauthorization/removal, quota, ordinary model refresh,
104
+ managed chat/search/classifier transport and unwrapped RPCs remain uncovered.
105
+ Native checkpoint observation is not filesystem durability evidence. Reporting
106
+ loss, crashes, disabled intervals and paging/coverage gaps must never be treated
107
+ as zero failures. No automatic daily analysis, issue creation, account/model
108
+ switch, policy change, retry, compaction, restart or upload is introduced.
109
+
110
+ The tests exercise bounded codecs, once-only settlement, control epochs,
111
+ component teardown, actual Client/Host gateway binding, unchanged public JSON
112
+ storage reopen/isolation/write failure/corruption and native SettingsForms
113
+ hidden-leaf persistence. Compaction observer envelopes are synthetic; they are
114
+ not production reliability measurements or proof of live recovery. Complete
115
+ release CI and installed/loaded/collection evidence remain separate.
116
+ The published Client gateway fixture captures the unchanged registration-bundle
117
+ factory in its own isolated realm, sharing the actual public Cordis identity.
118
+ It does not substitute tagged source for published bytes or attach to a live
119
+ Client module registry; factory qualification is not Desktop activation proof.
120
+
121
+ ## Archived phase-0 qualification and proposals
122
+
123
+ The remaining sections preserve the reviewed phase-0 inventory. Their proposed
124
+ limits and future-tense acceptance steps are historical, superseded by the
125
+ runtime contract above; they do not enable any additional collection or schedule.
126
+
127
+ ## Decision and evidence levels
128
+
129
+ Start with account operations, identity/Checking and compaction. Keep Client
130
+ and Host populations separate. Use fixed aggregates, never a raw error archive.
131
+ Do not add an end-to-end claim by matching clocks, account IDs or Session IDs.
132
+ Do not count a summary request or background-job admission as recovery success.
133
+
134
+ | Seam | Evidence now | Decision | Remaining qualification |
135
+ | --- | --- | --- | --- |
136
+ | Plugin Client wrappers and Host controllers | Direct current implementation inspection | Instrument plugin-owned entry/settlement only in phase 1 | Exact Client/Host gateway tests, teardown and decoding failures |
137
+ | Native `session/event` compaction brackets/checkpoints | Existing plugin listener and public event contract | Count native bracket outcomes; inspect only event type and fixed ownership fields in memory | Matching commit followed by end; cancelled/failed/no-op and interrupted brackets |
138
+ | Published basic compaction `summarize` subclass hook | Existing selected plugin engine | Separate logical bracket from physical summary attempts | Segment failures, cancellation, call caps and selected-engine coverage |
139
+ | Storage domain public root exports | Exact official source/manifest inspection | Candidate for phase 2, not selected or activated | Published artifacts, actual backend route, restart/durability/clear/corruption and capacity tests |
140
+ | Native Schedule | Exact official source/manifest inspection | Not a generic collector callback or approved daily-analysis bridge | Explicit task owner/delivery, local read seam, offline/missed execution and stop semantics |
141
+ | Copilot App automation | Available coding-session tooling, not a Host data seam | Do not configure a task in phase 0 | Prove approved aggregate access in the selected execution environment |
142
+
143
+ Source inspection proves API shape, not loaded services, backend paths, package
144
+ installation or live health. The copied qualification tree has no Git metadata;
145
+ five inspected files were compared byte-for-byte through GitHub with the exact
146
+ official commit and matched. No Core or dependency file was changed or executed.
147
+ The public root package manifests declare storage-domain and schedule exports;
148
+ this phase did not qualify their published artifact bytes or a live backend.
149
+
150
+ ## Observation inventory
151
+
152
+ Paths below identify implementation seams, not a request to read stored
153
+ credentials, conversation bodies or the values passed into those methods.
154
+
155
+ | Operation population | Safe observation position | Observable facts | Explicit blind spots |
156
+ | --- | --- | --- | --- |
157
+ | Models account action | `src/copilot-accounts-card.ts`: `run`, owned decoder and its `finally` | Client invocation, transport result, decode result, owner invalidation, state-settlement duration | State update is not paint completion; an unmounted Client cannot confirm visible completion |
158
+ | Models Checking/Identity | Same file: `hydrateIdentity`, `identityRead` lifetime | Client ensure invocation/join, result/decoding, invalidation, unsettled age | No proof the Host received a failed RPC; joined promise is not another physical lookup |
159
+ | Chat account selection/Checking | `src/copilot-usage-card.ts`: reads and `sessionAccount.set` | Client invocation/terminal result and stale viewed-owner rejection | Quota and identity can settle independently; do not combine their success rates |
160
+ | Global switch | `src/copilot-accounts-host.ts`: `switchAccount`; controller `@Remote switchAccount` | Host receipt, admission checks, identity/model validation stages, CAS, readback, terminal view diagnostic | Identity and model checks run concurrently; their durations are not additive; resolved Promise can contain an error view |
161
+ | Session override/inherit | `src/session-accounts-controller.ts`: `set`; `src/session-accounts-host.ts`: `set` | Host receipt, membership validation when applicable, CAS, readback, controller result | Inheritance does not necessarily perform identity/model network validation; final `get` can fail after CAS |
162
+ | Identity logical read | `src/copilot-accounts-host.ts`: `readIdentity` | Cache/cooldown/join/new-flight branch, logical result, named timeout/revocation | Successful cache read is not fresh GitHub validation; cooldown is not a new failed network attempt |
163
+ | Identity physical flight | Same method's new-flight creation and final cleanup | One started/settled flight, elapsed time, allowlisted failure | No URL, token, login, user ID, body or credential fingerprint enters diagnostics |
164
+ | Compaction logical transaction | `src/compaction-continuation.ts`: public `session/event` pattern | Start, matching compact-checkpoint commit, end, interrupted owner lifecycle | Current continuation presentation only retains selected-policy cases, not all compaction; summary event alone is not commit |
165
+ | Compaction physical summary | `src/manual-compaction-recovery.ts`: `summarizeManaged`/native `super.summarize` calls | Single versus segmented attempt, completion/error/cancellation, attempt count | Selected recovery engine only; stock/custom-engine requests must remain explicit uncovered attempts |
166
+ | Background command admission | `src/background-compaction.ts`: start and native job settlement | Admitted/duplicate/refused, job terminal state, fixed failure code | Job completion with no compactable history is no-op, not checkpoint success; reporter is not a second logical failure |
167
+ | Managed model requests (later) | `src/preview-route.ts`, `src/preview-provider.ts`: public adapter/fetch hooks | Plugin-route preparation/admission and bounded request outcomes | Native routes, provider directory and unowned transport remain gaps; inspect/fetch start is not supplier acceptance |
168
+ | Auxiliary classifier (later) | `src/auto-assessment-evidence.ts`, `src/auto-task-assessment.ts` | Existing safe preparation/adapter/text/finish milestones | Auxiliary failure is not main-answer failure; first text is not HTTP first byte or billing proof |
169
+ | Hosted search (later) | `src/traditional-search.ts`, `src/plan.ts`, `src/probe.ts` | Logical search, capability proof and final-query outcomes as distinct populations | Proof failure is not a sent user query; other providers and native directory errors remain outside this owner |
170
+
171
+ The account pilot includes global switch, Session override/inherit and identity
172
+ reads/physical flights. OAuth Add/reauthorization, removal, ordinary quota reads,
173
+ model refresh and all later request/search populations are inventoried but not
174
+ implicitly included in that first denominator. Adding them changes coverage.
175
+
176
+ ### Cross-layer association
177
+
178
+ Existing strict RPC descriptors do not carry a diagnostics correlation token.
179
+ Do not alter their signatures, infer correspondence from timestamps or persist
180
+ identifiers as a shortcut. Phase 1 can deliver independent Client and Host
181
+ counts with an explicit `correlation: unavailable` boundary. A future additive
182
+ public protocol can be reviewed separately with native gateway compatibility,
183
+ short-lived token admission and teardown tests.
184
+
185
+ Within one owner, a bounded in-memory operation handle may connect start/stage/
186
+ terminal events. Native compaction matching may use the existing Session object
187
+ and compaction ID **only** while the bracket is live. Neither those IDs, account
188
+ IDs, nor their hashes are aggregate dimensions, stored records or exports.
189
+ Discard handles on settlement/disposal; never rebuild them by reading history.
190
+
191
+ ## Proposed strict vocabulary
192
+
193
+ This is a proposed schema contract, not an installed Remote or runtime schema.
194
+ Phase 1 must implement a strict version-1 codec and rejection tests before use.
195
+ Unknown keys, arbitrary strings, non-finite/negative counters and impossible
196
+ stage transitions must be rejected without echoing the rejected input.
197
+
198
+ | Field | Allowed form / meaning |
199
+ | --- | --- |
200
+ | `schemaVersion` | Literal `1` |
201
+ | `pluginVersion` | Locally loaded build version, bounded validated package version; never infer from installed files |
202
+ | `coverageVersion` | Literal reviewed inventory revision; changes split comparison populations |
203
+ | `layer` | `client` or `host`; do not merge rates across them |
204
+ | `operation` | `account-global-switch`, `account-session-select`, `account-session-inherit`, `identity-read`, `identity-flight`, `compaction`, `compaction-summary`, `compaction-job-admission` |
205
+ | `stage` | Operation-specific subset of `admitted`, `rpc-invoked`, `host-received`, `identity-validation`, `model-validation`, `cas`, `readback`, `response-received`, `decoded`, `client-settled`, `summary-attempt`, `checkpoint-committed`, `ended` |
206
+ | `outcome` | `success`, `no-op`, `cancelled`, `policy-rejected`, `revoked`, `environment-fault`, `failed`, `unknown` |
207
+ | `reason` | Fixed allowlist below, `none` or `unknown`; never an Error message/stack/cause serialization |
208
+ | `count`, `durationBucket`, `ageBucket` | Safe bounded integer counters and fixed bucket enum; monotonic elapsed time, not cross-process clock subtraction |
209
+ | `coverage` | Fixed flags/counters for unavailable seams, paused intervals, dropped operations, unknown results, discarded evidence, saturated counters and interrupted owners |
210
+
211
+ Initial reason candidates: `COPILOT_ACCOUNTS_BUSY`,
212
+ `COPILOT_ACCOUNTS_CONFLICT`, `COPILOT_ACCOUNTS_CHANGED`,
213
+ `COPILOT_ACCOUNTS_COMMIT_UNCERTAIN`, `COPILOT_ACCOUNTS_IDENTITY_TIMEOUT`,
214
+ `COPILOT_ACCOUNTS_IDENTITY_UNAVAILABLE`, `COPILOT_ACCOUNTS_MODELS_FAILED`,
215
+ `COPILOT_ACCOUNTS_SETTINGS_UNAVAILABLE`,
216
+ `COPILOT_SESSION_ACCOUNTS_UNAVAILABLE`,
217
+ `COPILOT_SESSION_ACCOUNTS_COMMIT_UNCERTAIN`,
218
+ `COPILOT_ACCOUNTS_IDENTITY_TLS`, `COPILOT_ACCOUNTS_IDENTITY_NETWORK`,
219
+ `COPILOT_ACCOUNTS_IDENTITY_RATE_LIMITED`,
220
+ `COPILOT_ACCOUNTS_IDENTITY_AUTH_REJECTED`,
221
+ `COPILOT_ACCOUNTS_IDENTITY_HTTP_ERROR`, `COPILOT_ACCOUNTS_IDENTITY_INVALID`,
222
+ `COPILOT_RESPONSES_REPLAY_SCOPE_MISMATCH`, `CONTEXT_WINDOW_EXCEEDED`,
223
+ `COPILOT_MANUAL_RECOVERY_FIXED_PREFIX`, `COPILOT_MANUAL_RECOVERY_INDIVISIBLE`,
224
+ `COPILOT_MANUAL_RECOVERY_CALL_LIMIT`, `COPILOT_MANUAL_RECOVERY_EMPTY_SUMMARY`,
225
+ `COPILOT_MANUAL_RECOVERY_UNBALANCED`, plus collector-owned fixed
226
+ `rpc-unavailable`, `decode-invalid`, `summary-invalid`, `storage-unavailable`,
227
+ `storage-invalid`, `storage-write-failed`, `observer-unavailable` and `unknown`.
228
+ Finalize this allowlist against the owning schemas in phase 1; a missing code
229
+ must map to unknown, never leak the original string. Bounded Error cause-chain
230
+ inspection may extract only exact known tokens, never retain the Error.
231
+
232
+ Classify from verified origin, not just a shared code: busy/CAS rejection is
233
+ normally policy-rejected; credential invalidation is revoked; user cancellation
234
+ is cancelled only with actual cancellation evidence. Missing service is an
235
+ environment fault. Identity-unavailable/models-failed are sanitized but broad:
236
+ they do not prove network, authentication or code defect. A hung promise is
237
+ unsettled, not a declared failure. Terminal observations are idempotent: a Host
238
+ failure plus Client error plus job reporter must not become three failures in
239
+ one logical population.
240
+
241
+ ## Denominators, slow operations and success
242
+
243
+ Each layer/operation starts its own denominator at actual admission. Report
244
+ started, settled by outcome, unsettled, interrupted and dropped separately.
245
+ Phase 1 should collect every eligible success and failure, not errors only.
246
+ For one uninterrupted owner, the accounting invariant is:
247
+
248
+ `started = settled + live-unsettled + interrupted`
249
+
250
+ Dropped admission is a separate lost-opportunity count, not a fake success or
251
+ terminal failure. A restart before persistence creates an unknown gap, not a
252
+ historical interrupted count of zero. Do not report failure rate from starts
253
+ while many are unfinished; show settled/started and all outcome counts.
254
+ Cancellation/policy rejection/environment faults are not folded into code
255
+ failure rate. Sum physical summary/identity attempts separately from logical
256
+ operation counts; cache hits and joined calls keep their actual semantics.
257
+
258
+ Proposed fixed duration/age bins in milliseconds:
259
+ `[0,100)`, `[100,500)`, `[500,1000)`, `[1000,5000)`,
260
+ `[5000,15000)`, `[15000,60000)`, `[60000,300000)`, `[300000,+infinity)`.
261
+ These are descriptive bins, not calibrated alerts. Monotonic clocks and bounded
262
+ owner-local age snapshots can detect pending work without cancelling it,
263
+ polling credentials or changing timeouts. UI unmount/Host teardown closes
264
+ coverage as interrupted; it must not silently declare the operation completed.
265
+
266
+ Account CAS fulfillment is not the entire operation's success: require the
267
+ existing owning readback and valid terminal view. Client state settlement still
268
+ does not prove a painted UI or the Host's inner stages.
269
+ Compaction success requires a matching **native compact-checkpoint commit and
270
+ successful native end**. An error after a commit is a distinct failed-after-
271
+ commit observation, not an assertion that no history changed. Record observed
272
+ commit independently of terminal status; no-op, prune-only reduction and unknown
273
+ commit remain distinct. Do not inspect checkpoint content, summarize the history
274
+ or rewrite native events/Usage to obtain evidence.
275
+
276
+ ## Privacy and control proposal
277
+
278
+ No prompts, assistant/tool content, replay, grants, device codes, raw responses,
279
+ settings values, identity/login, account/Session/job/message IDs or hashes, URLs,
280
+ paths, arbitrary exception text, stacks or freeform labels. Fixed stage codes
281
+ and numeric aggregates are the entire data boundary. Native source/transaction,
282
+ retry, account selection, authorization, accounting and cancellation stay owned
283
+ by their existing implementations.
284
+
285
+ Collection controls must distinguish disabled, active, paused and unavailable.
286
+ Enabling collection does not authorize persistence, export, scheduling, uploads,
287
+ paid probes or repairs. Clearing evidence is not disabling collection; pause
288
+ records a coverage break and does not fabricate normal outcomes. Phase 1 should
289
+ default off until its control surface and enable scope are reviewed. Collector
290
+ failures remain explicit fixed diagnostics without rejecting/retrying the
291
+ operation being observed or silently writing a fallback log.
292
+
293
+ The collector must bound live handles and aggregate dimensions before allocation,
294
+ report overflow/saturation, and tear down timers/listeners completely. Proposed
295
+ phase-1 limits are 128 live handles per owner and a 1 MiB encoded snapshot ceiling;
296
+ these are implementation-review candidates, not already enforced guarantees.
297
+
298
+ ## Storage qualification and proposed phase-2 policy
299
+
300
+ Public candidate:
301
+ [`@deepseek-ai/dsh-storage-domain`](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/storage/storage-domain/src/index.ts).
302
+ Its root exports `defineDomain`, `domainTable`, `DomainFacility` and the `Domain`
303
+ types. `ctx.storageDomain.open(spec)` selects a configured public backend;
304
+ `table.put/update/delete` and `global.set` await backend durability before
305
+ publishing memory changes. `update` serializes one-record read/modify/write.
306
+ `close` rejects new writes and drains accepted work. The caller owns the handle.
307
+ Absent route/backend, unsupported facet or invalid medium is an error, not
308
+ permission to open an ad-hoc file or use Settings as a log store.
309
+
310
+ Important constraints: there is no documented multi-record transaction for
311
+ atomic clear; `open` loads all records; returned values are not defensive copies;
312
+ the backend determines crash durability and physical capacity. A logical byte
313
+ limit is not a filesystem quota. Use one bounded strict aggregate snapshot or
314
+ prove interruption-safe multi-record semantics before choosing a layout.
315
+ Do not enable `backup-and-skip`: it may retain corrupt records and log underlying
316
+ causes, violating the proposed no-raw-data contract. Prefer fail-closed open with
317
+ a fixed corruption diagnostic; explicit clear/reset must operate through a
318
+ qualified public seam and report whether inaccessible corrupt storage was
319
+ actually removed. Do not promise clear can repair an unopenable domain.
320
+
321
+ Proposed policy, pending backend/runtime tests and review:
322
+
323
+ - 14-day rolling UTC-hour aggregates; expiry at write/read/startup, no raw events.
324
+ - Hard proposed 2 MiB encoded snapshot and 336 hourly windows, plus a bounded
325
+ reviewed version/dimension inventory; enforce whichever bound is reached first.
326
+ Eviction and current retained bounds are explicit. Do not silently merge versions.
327
+ - Do not persist operation handles. Persist only aggregate unfinished counts by
328
+ safe stage if reviewed; after restart they are interrupted/unknown evidence,
329
+ never resumable handles or an invitation to replay work.
330
+ - Clear increments an aggregate epoch and removes only the plugin domain's data;
331
+ pause/disable/clear have independent results. Prevent accepted pre-clear writes
332
+ from resurrecting the earlier epoch. Do not reset credentials, Settings/history
333
+ or existing Auto observations.
334
+ - Missing/unavailable/corrupt storage yields evidence-unavailable, never an empty
335
+ healthy report. No fallback to files, Client storage, logs or another backend.
336
+
337
+ Stage 2 must qualify exact published artifacts and synthetic restart, backend
338
+ failure, queue saturation, bounded load, expiry, clock rollback, clear races and
339
+ corrupt-medium behavior. No storage dependency or route is added in phase 0.
340
+
341
+ ## Scheduling qualification
342
+
343
+ [`@deepseek-ai/dsh-schedule`](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/schedule/schedule/src/index.ts)
344
+ is a durable reminder service with public create/list/catalog/history/update/
345
+ delete management and after/at/every/daily/weekly/cron record types. It requires
346
+ Agents, Sessions, tools, storageDomain, Session controller and persistence.
347
+ [Runtime delivery](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/schedule/schedule/src/runtime.ts)
348
+ resolves an Agent, appends a reminder through `followup`, flushes native Session
349
+ persistence and records delivery. It is **not** a public arbitrary callback
350
+ scheduler, nor a promise that a coding session can read the plugin's domain.
351
+ Creating a reminder changes native inbox/history and can lead to model work:
352
+ do not use it as hidden passive monitoring.
353
+
354
+ Before stage 3, select exactly one mechanism, name its owner, approved read
355
+ endpoint/data range, local environment, timezone, missed-run policy, report
356
+ destination and stop/delete path. A Copilot App automation may start a coding
357
+ session, but must separately prove access to the intended live Host's sanitized
358
+ aggregate reader. Service presence, task admission, execution and successful
359
+ data read are four distinct facts. No timer, automation or reminder was created.
360
+
361
+ ## Phase-1 acceptance and later decisions
362
+
363
+ The next PR must implement the reviewed codec/controls and bounded in-memory
364
+ account/compaction pilot, not persistence or scheduling:
365
+
366
+ 1. Test real Client and Host gateways independently; transport/decoding/stale
367
+ result failures, cache/join/cooldown and successful denominators must differ.
368
+ 2. Test settled-once handles, concurrent stages, cancellation/revocation, slow
369
+ pending age, overflow, clock behavior, pause/clear and owner teardown.
370
+ 3. Exercise unchanged native compaction start/attempt/commit/end, no-op,
371
+ failed-after-commit, invalid summary, replay scope, capacity and cancellation.
372
+ Stock/custom engine gaps must remain visible; do not patch their internals.
373
+ 4. Test privacy with hostile errors, nested causes and arbitrary fields. Neither
374
+ failed input nor sensitive sentinel can appear in reports, logs or storage.
375
+ 5. Preserve original operation results and existing UI/native behavior; run the
376
+ complete required CI. Installation and loaded-version acceptance are separate.
377
+
378
+ Phase-2 persistence and phase-3 daily reads require separate qualification and
379
+ review. Stage 4 adds the inventoried request/classifier/search populations.
380
+ Stage 5 compares the same operations, coverage versions, loaded plugin versions,
381
+ windows and denominators. Sample sufficiency and thresholds are declared before
382
+ claiming improvement; no data remains insufficient evidence.
383
+
384
+ Owner for the next decision: the repository maintainer reviewing #347.
385
+ Trigger: approval of this boundary/schema/control proposal before phase-1
386
+ activation. Action: implement the pilot with a linked acceptance PR, or retain
387
+ unavailable seams and narrow the scope. This phase closes only #354, not #347,
388
+ and makes no claim that #346's Checking fault has been reproduced or repaired.