dsh-github-copilot 0.1.0-alpha.1.dsh.0.2.1.alpha.5
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/AGENTS.md +439 -0
- package/CHANGELOG.md +875 -0
- package/CONTRIBUTING.md +55 -0
- package/LICENSE +21 -0
- package/README.md +366 -0
- package/README.zh.md +341 -0
- package/SECURITY.md +29 -0
- package/cordis.patch.yml +16 -0
- package/deployment-baseline.json +1580 -0
- package/docs/account-management-experience.md +143 -0
- package/docs/agent-readiness.md +110 -0
- package/docs/auto-high-cost.md +255 -0
- package/docs/auto-iteration-review.json +22 -0
- package/docs/auto-review-sampling.md +60 -0
- package/docs/auto-task-routing.md +341 -0
- package/docs/automatic-model-routing.md +236 -0
- package/docs/copilot-accounts.md +424 -0
- package/docs/copilot-compaction.md +148 -0
- package/docs/copilot-usage.md +133 -0
- package/docs/dual-model.md +66 -0
- package/docs/evidence-driven-iteration.md +86 -0
- package/docs/image-input-compatibility.md +64 -0
- package/docs/images/copilot-accounts-credits.png +0 -0
- package/docs/images/copilot-accounts.png +0 -0
- package/docs/images/copilot-current-provenance.json +39 -0
- package/docs/images/copilot-model-preferences.png +0 -0
- package/docs/images/copilot-search-routing.png +0 -0
- package/docs/images/copilot-session-continuation.png +0 -0
- package/docs/images/dual-model-desktop.png +0 -0
- package/docs/images/dual-model-mobile.png +0 -0
- package/docs/images/dual-model-provenance.json +35 -0
- package/docs/images/parent-model-follow.png +0 -0
- package/docs/manual-compaction-recovery.md +109 -0
- package/docs/mockups/copilot-account-dropdown.html +71 -0
- package/docs/mockups/copilot-account-management.html +393 -0
- package/docs/model-compatibility-acceptance.md +182 -0
- package/docs/npm-distribution.md +202 -0
- package/docs/official-first-016-alpha2.md +66 -0
- package/docs/official-first-020-rc1.md +32 -0
- package/docs/official-first-020-rc2.md +17 -0
- package/docs/official-first-021-alpha4.md +157 -0
- package/docs/official-first-021-alpha5.md +83 -0
- package/docs/plugin-diagnostics.md +605 -0
- package/docs/session-continuation.md +141 -0
- package/docs/session-search-routing.md +133 -0
- package/docs/single-route-migration.md +131 -0
- package/docs/web-lifecycle-rc2.md +55 -0
- package/lib/client.js +13236 -0
- package/lib/client.js.map +1 -0
- package/lib/copilot-identity-DRZY_d2X.js +15 -0
- package/lib/diagnostics-analysis-io.js +78 -0
- package/lib/diagnostics-analysis.js +427 -0
- package/lib/diagnostics-types-CF-qg8Do.js +708 -0
- package/lib/index.js +15661 -0
- package/lib/manual-compaction-recovery.js +485 -0
- package/lib/remote.js +1507 -0
- package/lib/request-budget-DLY_aRq0.js +87 -0
- package/lib/routed-web.js +120 -0
- package/lib/search-routing-CV2hs8as.js +792 -0
- package/lib/types/account-dropdown.d.ts +22 -0
- package/lib/types/account-model-auth.d.ts +15 -0
- package/lib/types/account-model-catalog.d.ts +70 -0
- package/lib/types/account-model-source.d.ts +85 -0
- package/lib/types/agent-compaction.d.ts +4 -0
- package/lib/types/authorization-code-clipboard.d.ts +4 -0
- package/lib/types/authorization-controller.d.ts +121 -0
- package/lib/types/auto-allocation-card.d.ts +9 -0
- package/lib/types/auto-allocation-diagnostics.d.ts +126 -0
- package/lib/types/auto-allocation-evidence.d.ts +44 -0
- package/lib/types/auto-allocation.d.ts +47 -0
- package/lib/types/auto-assessment-evidence.d.ts +111 -0
- package/lib/types/auto-model-host.d.ts +30 -0
- package/lib/types/auto-model-intent.d.ts +36 -0
- package/lib/types/auto-model-presentation.d.ts +57 -0
- package/lib/types/auto-model-routing.d.ts +64 -0
- package/lib/types/auto-review-sampling.d.ts +6 -0
- package/lib/types/auto-selection-explanation.d.ts +9 -0
- package/lib/types/auto-task-assessment.d.ts +49 -0
- package/lib/types/auto-task-classifier.d.ts +10 -0
- package/lib/types/background-compaction.d.ts +30 -0
- package/lib/types/client.d.ts +129 -0
- package/lib/types/compact-account.d.ts +42 -0
- package/lib/types/compaction-continuation-ui.d.ts +29 -0
- package/lib/types/compaction-continuation.d.ts +48 -0
- package/lib/types/compaction-input-estimate.d.ts +28 -0
- package/lib/types/compaction-pressure.d.ts +23 -0
- package/lib/types/compaction-replay.d.ts +18 -0
- package/lib/types/compatibility.d.ts +17 -0
- package/lib/types/composer-notice-style.d.ts +7 -0
- package/lib/types/config.d.ts +141 -0
- package/lib/types/content-file.d.ts +10 -0
- package/lib/types/context-evidence-ui.d.ts +28 -0
- package/lib/types/context-evidence.d.ts +256 -0
- package/lib/types/context-usage.d.ts +4 -0
- package/lib/types/copilot-account-presentation.d.ts +7 -0
- package/lib/types/copilot-accounts-card.d.ts +43 -0
- package/lib/types/copilot-accounts-host.d.ts +93 -0
- package/lib/types/copilot-accounts-remote.d.ts +85 -0
- package/lib/types/copilot-accounts-types.d.ts +43 -0
- package/lib/types/copilot-auth.d.ts +31 -0
- package/lib/types/copilot-grant.d.ts +11 -0
- package/lib/types/copilot-identity.d.ts +11 -0
- package/lib/types/copilot-request.d.ts +11 -0
- package/lib/types/copilot-stream-liveness.d.ts +23 -0
- package/lib/types/copilot-usage-card.d.ts +51 -0
- package/lib/types/copilot-usage-host.d.ts +61 -0
- package/lib/types/copilot-usage-normalize.d.ts +9 -0
- package/lib/types/copilot-usage-remote.d.ts +63 -0
- package/lib/types/copilot-usage-types.d.ts +20 -0
- package/lib/types/copilot-usage-ui.d.ts +4 -0
- package/lib/types/current-provider.d.ts +59 -0
- package/lib/types/deepseek-search-fallback.d.ts +11 -0
- package/lib/types/diagnostics-analysis-io.d.ts +23 -0
- package/lib/types/diagnostics-analysis.d.ts +298 -0
- package/lib/types/diagnostics-card.d.ts +12 -0
- package/lib/types/diagnostics-client.d.ts +13 -0
- package/lib/types/diagnostics-collector.d.ts +50 -0
- package/lib/types/diagnostics-host.d.ts +183 -0
- package/lib/types/diagnostics-remote.d.ts +113 -0
- package/lib/types/diagnostics-types.d.ts +893 -0
- package/lib/types/dual-model-host.d.ts +119 -0
- package/lib/types/dual-model-remote.d.ts +63 -0
- package/lib/types/dual-model-types.d.ts +34 -0
- package/lib/types/external-link.d.ts +3 -0
- package/lib/types/failure.d.ts +38 -0
- package/lib/types/http.d.ts +48 -0
- package/lib/types/image-input-admission.d.ts +5 -0
- package/lib/types/index.d.ts +39 -0
- package/lib/types/manual-compaction-recovery.d.ts +67 -0
- package/lib/types/migration-status.d.ts +50 -0
- package/lib/types/model-exclusions.d.ts +15 -0
- package/lib/types/model-preferences-card.d.ts +9 -0
- package/lib/types/model-protocol.d.ts +31 -0
- package/lib/types/native-select-style.d.ts +4 -0
- package/lib/types/native-settings-style.d.ts +10 -0
- package/lib/types/parent-model-follow-card.d.ts +32 -0
- package/lib/types/parent-model-follow.d.ts +44 -0
- package/lib/types/pi-provider-bridge.d.ts +22 -0
- package/lib/types/plan.d.ts +148 -0
- package/lib/types/pre-step-pressure.d.ts +8 -0
- package/lib/types/preview-provider.d.ts +77 -0
- package/lib/types/preview-route.d.ts +76 -0
- package/lib/types/probe.d.ts +39 -0
- package/lib/types/remote-codec.d.ts +10 -0
- package/lib/types/remote.d.ts +202 -0
- package/lib/types/replay-recovery-host.d.ts +28 -0
- package/lib/types/replay-recovery-remote.d.ts +14 -0
- package/lib/types/replay-recovery-types.d.ts +24 -0
- package/lib/types/replay-recovery-ui.d.ts +28 -0
- package/lib/types/replay-recovery.d.ts +17 -0
- package/lib/types/request-body-composition.d.ts +17 -0
- package/lib/types/request-body-evidence.d.ts +37 -0
- package/lib/types/request-body-timeout-marker.d.ts +2 -0
- package/lib/types/request-body-timeout.d.ts +4 -0
- package/lib/types/request-budget.d.ts +58 -0
- package/lib/types/request-diagnostics.d.ts +278 -0
- package/lib/types/request-upload-evidence.d.ts +23 -0
- package/lib/types/response-error-body.d.ts +3 -0
- package/lib/types/responses-reasoning-text.d.ts +24 -0
- package/lib/types/responses-reasoning.d.ts +7 -0
- package/lib/types/responses-replay-compat.d.ts +31 -0
- package/lib/types/responses-request-compression.d.ts +33 -0
- package/lib/types/route-ownership.d.ts +70 -0
- package/lib/types/routed-web.d.ts +50 -0
- package/lib/types/search-backend.d.ts +16 -0
- package/lib/types/search-routing-host.d.ts +19 -0
- package/lib/types/search-routing-policy.d.ts +18 -0
- package/lib/types/search-routing-remote.d.ts +20 -0
- package/lib/types/search-routing.d.ts +43 -0
- package/lib/types/search-tool-routing.d.ts +22 -0
- package/lib/types/serialize.d.ts +106 -0
- package/lib/types/session-accounts-controller.d.ts +20 -0
- package/lib/types/session-accounts-host.d.ts +33 -0
- package/lib/types/session-accounts-remote.d.ts +114 -0
- package/lib/types/session-accounts.d.ts +38 -0
- package/lib/types/session-continuation-host.d.ts +45 -0
- package/lib/types/session-continuation-remote.d.ts +22 -0
- package/lib/types/session-continuation-types.d.ts +62 -0
- package/lib/types/session-continuation-ui.d.ts +49 -0
- package/lib/types/session-continuation.d.ts +14 -0
- package/lib/types/settings-reader.d.ts +16 -0
- package/lib/types/sse.d.ts +28 -0
- package/lib/types/temporary-models.d.ts +25 -0
- package/lib/types/tool-schema-compat.d.ts +17 -0
- package/lib/types/traditional-search.d.ts +17 -0
- package/lib/types/turn-model-provenance.d.ts +45 -0
- package/lib/types/turn-request-models.d.ts +55 -0
- package/lib/types/turn-selection-card.d.ts +24 -0
- package/lib/types/turn-selection-host.d.ts +35 -0
- package/lib/types/turn-selection-remote.d.ts +17 -0
- package/lib/types/turn-selection.d.ts +186 -0
- package/lib/types/turn-usage-evidence.d.ts +66 -0
- package/lib/types/turn-usage-notice.d.ts +7 -0
- package/lib/types/types.d.ts +69 -0
- package/lib/types/usage.d.ts +26 -0
- package/lib/types/watchdog.d.ts +22 -0
- package/lib/types/web-delegate.d.ts +12 -0
- package/lib/types/web-search-routing-card.d.ts +16 -0
- package/lib/types/web-search-routing-config.d.ts +12 -0
- package/lib/types/wire-anthropic.d.ts +37 -0
- package/lib/types/wire.d.ts +56 -0
- package/lib/web-delegate.js +9 -0
- package/output/auto-model-mockup/index.html +207 -0
- package/package.json +261 -0
- package/scripts/analyze-diagnostics.mjs +91 -0
- package/scripts/check-search-composition.mjs +191 -0
- package/scripts/iteration-review.mjs +53 -0
- package/scripts/release-policy.mjs +353 -0
- package/scripts/select-core-release.mjs +11 -0
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
# Local diagnostics: account, compaction, Auto allocation and requests
|
|
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
|
+
The dedicated Local diagnostics region opens with independently collapsed
|
|
26
|
+
**Auto allocation observations**, **Physical request observations**,
|
|
27
|
+
**Credential change observations**, and **Account and compaction observations**.
|
|
28
|
+
Summaries retain compact status/count information; expanding a group neither
|
|
29
|
+
enables collection nor performs another status/request call. The Auto group contains
|
|
30
|
+
the daily table: UTC date, policy, model,
|
|
31
|
+
decision cohort, opportunities, expected selections, selected counts and no-fit
|
|
32
|
+
decisions. Compare expected and selected counts only within matching cohorts;
|
|
33
|
+
these aggregates do not establish execution, quality or billing. Account and
|
|
34
|
+
compaction summaries, collection controls, and detailed data-scope/limits/JSON
|
|
35
|
+
guidance are in collapsed disclosures. A failed operation remains visible outside
|
|
36
|
+
the collapsed controls; expand Collection controls to find **Read status**.
|
|
37
|
+
No failed operation is automatically replayed.
|
|
38
|
+
Clearing aggregates still requires its separate confirmation.
|
|
39
|
+
|
|
40
|
+
Use the plugin normally: account selection, Identity/Checking and compaction
|
|
41
|
+
will contribute independent Client/Host populations. Auto model allocation has a
|
|
42
|
+
separate **Enable Auto allocation observation** control and its own hidden,
|
|
43
|
+
volatile `github-copilot.autoAllocationDiagnosticsEnabled` path-level CAS.
|
|
44
|
+
It can be enabled without collecting the other diagnostics. Auto decisions
|
|
45
|
+
contribute daily, profile-local allocation aggregates to the same storage
|
|
46
|
+
domain while this switch is enabled. These contain plugin/policy version, model
|
|
47
|
+
ID, target and selected category, task-demand/assessment-source strata,
|
|
48
|
+
high-cost/continuity flags, effective weight, candidate opportunities,
|
|
49
|
+
conditional expected selections, actual selections and no-fit counts. They do
|
|
50
|
+
not contain Session/turn identifiers, prompts, outcomes, execution or billing
|
|
51
|
+
attribution. Aggregate rows are capped at 1,024, retained for 14 days and
|
|
52
|
+
included in the existing 2 MiB snapshot limit; expired, dropped, truncated,
|
|
53
|
+
saturated and restart evidence remains explicit. There is no per-turn export,
|
|
54
|
+
automatic tuning or upload. The aggregate controls can be paused independently.
|
|
55
|
+
New rows also distinguish fixed assessment outcomes: local-known/local-unknown,
|
|
56
|
+
semantic-known/semantic-unknown, disabled, unavailable, timeout, failed,
|
|
57
|
+
invalid-result and context-omitted. Missing legacy outcomes remain **not recorded**,
|
|
58
|
+
never reconstructed from demand/source. Count decisions using Selected plus
|
|
59
|
+
No-fit, not candidate opportunities (one decision may have many candidates).
|
|
60
|
+
These outcomes explain classifier settlement, not network root cause or model
|
|
61
|
+
execution; no error bodies, signals, prompts or Session/turn IDs are added.
|
|
62
|
+
Classification and the conservative omitted-context guard stay unchanged.
|
|
63
|
+
The separately configured assessment budget defaults to 30 seconds as of alpha.7;
|
|
64
|
+
producer versions separate this trial from the earlier eight-second budget.
|
|
65
|
+
Older strict plugin versions may reject new snapshot fields on
|
|
66
|
+
rollback; do not delete or silently rewrite retained evidence to make them parse.
|
|
67
|
+
The separate **Enable request observations** control uses the hidden volatile
|
|
68
|
+
`github-copilot.requestDiagnosticsEnabled` leaf with path-level CAS and exact
|
|
69
|
+
readback. Existing aggregate consent never enables request observations.
|
|
70
|
+
**Clear local diagnostics** clears all three populations, including request
|
|
71
|
+
observations, without changing the three enabled/paused controls.
|
|
72
|
+
|
|
73
|
+
### Credential-change decisions (#402)
|
|
74
|
+
|
|
75
|
+
The request-observation consent also covers up to 128 content-free credential
|
|
76
|
+
notification/commit observations for 24 hours within the shared 2 MiB cap.
|
|
77
|
+
This user-requested extension does not add a fourth collection switch or
|
|
78
|
+
automatically enable an existing disabled control. It adds no credential reads:
|
|
79
|
+
fixed reasons are derived only from the refresh checks already required by the
|
|
80
|
+
native credential-store bridge. Reasons distinguish qualified refresh, unknown
|
|
81
|
+
source, account/endpoint/entitlement mismatch, expired result, auth mismatch,
|
|
82
|
+
duplicate notification, missing notification, commit mismatch, failed write and
|
|
83
|
+
conflicting write. Not every failure produces a notification; absent evidence
|
|
84
|
+
does not establish a successful refresh.
|
|
85
|
+
|
|
86
|
+
Each observation counts live managed wires that are preparing, dispatched or
|
|
87
|
+
already aborted and records which wires the existing decision preserves or
|
|
88
|
+
revokes. A qualified notification is provisional; a matching commit observation
|
|
89
|
+
is required to confirm its write. Counts are snapshots, not unique requests,
|
|
90
|
+
Session/turn attribution, native retry counts, supplier receipt or eventual
|
|
91
|
+
success. A random change ID joins at most one notification and one commit;
|
|
92
|
+
it does not join physical request rows or identify an account. Unknown source
|
|
93
|
+
does not prove an external/Core writer. Missing legacy fields remain **not
|
|
94
|
+
recorded**, never reconstructed from today's settings or a historical error.
|
|
95
|
+
|
|
96
|
+
Pending handles are capped at 128; clear/pause/expiry/teardown fence later
|
|
97
|
+
callbacks. Saved pending counts become interrupted-on-reopen without fabricated
|
|
98
|
+
commit rows. No grant values, record keys, identities/hashes, endpoints, raw
|
|
99
|
+
errors or conversation data enter storage/Remotes. The #385 qualification and
|
|
100
|
+
native cancellation/retry behavior are unchanged. Capture failures emit only
|
|
101
|
+
`COPILOT_CREDENTIAL_DIAGNOSTICS_CAPTURE_FAILED`; they do not reject business work.
|
|
102
|
+
The aggregate-only offline analyzer validates but does not analyze these rows,
|
|
103
|
+
retaining its `request-observations-not-analyzed` gap.
|
|
104
|
+
|
|
105
|
+
**Read status** returns a strict snapshot; **Review aggregate-only JSON → Prepare current JSON**
|
|
106
|
+
prepares a read-only copy for explicit review/sharing, never a download or upload.
|
|
107
|
+
When retained request observations exist, the disclosure is instead named
|
|
108
|
+
**Review local diagnostics JSON** and includes that separately consented scope.
|
|
109
|
+
The coding session does not automatically gain access to the running Host.
|
|
110
|
+
Pause preserves retained evidence and closes active observations as interrupted.
|
|
111
|
+
It remains available for a configured-on collector when storage is unavailable;
|
|
112
|
+
enabling still requires ready storage.
|
|
113
|
+
Clear requires a separate confirmation, advances an epoch and removes this
|
|
114
|
+
domain's aggregates and request observations without changing the enabled settings, accounts or history.
|
|
115
|
+
An uncertain write is not automatically replayed by the UI.
|
|
116
|
+
|
|
117
|
+
## Storage and limits
|
|
118
|
+
|
|
119
|
+
The Host uses only the public storage-domain `global.get/set/close` seam and the
|
|
120
|
+
configured backend. The plugin pins Zod to the qualified published storage
|
|
121
|
+
type contract; no shared schemas, prototypes or Core artifacts are adapted.
|
|
122
|
+
The official JSON backend root is **DSH-home shared**, so
|
|
123
|
+
the plugin addresses a separate domain using the public `profileContext.name`,
|
|
124
|
+
encoded as a bounded storage-unit suffix. The technical profile name is used
|
|
125
|
+
only for addressing, never included in rows, Remotes or exported JSON. Names
|
|
126
|
+
must be 1–48 ASCII letters, digits, underscores or hyphens; missing/unsupported
|
|
127
|
+
profile context fails explicitly rather than sharing another profile's data.
|
|
128
|
+
One writer per profile is required: the public JSON backend does not establish
|
|
129
|
+
cross-process locking for simultaneous Hosts writing the same domain.
|
|
130
|
+
|
|
131
|
+
Retain UTC-hour rows for 14 days, at most 4,096 rows, 128 live Host handles,
|
|
132
|
+
128 live Client handles and a 128-row Client report buffer. Strict fixed ASCII
|
|
133
|
+
dimensions make the encoded snapshot ceiling an exact **2 MiB UTF-8** bound.
|
|
134
|
+
Evict oldest-hour rows first and expose eviction, drops, saturation, Client
|
|
135
|
+
unconfirmed acknowledgements and clock rollback. Rollback does not silently
|
|
136
|
+
erase already observed future-hour rows. Counts across a window boundary or
|
|
137
|
+
an eviction cannot establish a precise failure rate.
|
|
138
|
+
|
|
139
|
+
The Host coalesces writes on a ten-second cadence; the Client reports safe
|
|
140
|
+
rows/pending-age samples and reads collection status on a ten-second cadence.
|
|
141
|
+
These lifecycle-bound timers do **not** perform analysis, query credentials,
|
|
142
|
+
change request deadlines or trigger repair. Abrupt process loss can lose the
|
|
143
|
+
unflushed tail. Saved unfinished Host groups become interrupted on reopen,
|
|
144
|
+
attributed to their starting build, not resumable work. Client pending samples
|
|
145
|
+
are historical periodic samples, **not** an outstanding-operation gauge.
|
|
146
|
+
Clear/pause/enable epoch fences prevent late accepted reports or handles from
|
|
147
|
+
restoring pre-control evidence.
|
|
148
|
+
Epoch exhaustion blocks enabling explicitly; pause/close still stop collection
|
|
149
|
+
and record saturation even when the fence cannot advance.
|
|
150
|
+
|
|
151
|
+
`dirty` and `persistedAt` distinguish in-memory from confirmed persistence.
|
|
152
|
+
Missing backend/profile, corruption and failed writes remain named unavailable
|
|
153
|
+
or error evidence; account/compaction work is not rejected or retried for a
|
|
154
|
+
diagnostics failure. No ad-hoc file, Settings log or fallback backend is used.
|
|
155
|
+
Corrupt media is neither backed up nor silently reset; Clear cannot repair a
|
|
156
|
+
domain that cannot open. Public domain open loads external media before schema
|
|
157
|
+
validation: plugin-owned snapshots are bounded, but this is **not** a disk quota
|
|
158
|
+
or a pre-read bound on externally tampered files.
|
|
159
|
+
|
|
160
|
+
## Coverage and interpretation
|
|
161
|
+
|
|
162
|
+
Host coverage includes global switch, Session select/inherit, logical identity
|
|
163
|
+
reads and shared physical identity flights, native compaction brackets and
|
|
164
|
+
managed physical summary calls inside the separately selected recovery engine.
|
|
165
|
+
Cache, cooldown and joined-flight stages remain distinct. A global-switch
|
|
166
|
+
preflight identity validation is a stage, not another shared-flight denominator.
|
|
167
|
+
Only the wrapped Client account/identity operations are reported, independently
|
|
168
|
+
of Host observations; no IDs correlate the layers and no end-to-end latency or
|
|
169
|
+
paint completion is inferred. Component teardown settles its own pending
|
|
170
|
+
Checking observations, without cancelling the actual business request.
|
|
171
|
+
|
|
172
|
+
Outcomes distinguish success, cancellation with actual signal evidence, policy
|
|
173
|
+
rejection, revocation, environment fault, failure, interruption and unknown.
|
|
174
|
+
Concurrent validation stages record cumulative operation age, not exclusive
|
|
175
|
+
phase duration. A fulfilled error-shaped account view is not success.
|
|
176
|
+
Compaction success requires a matching observed compact-checkpoint **and**
|
|
177
|
+
successful end; summary fulfillment alone is not recovery success. No-checkpoint
|
|
178
|
+
ends are unknown, not guessed no-op/prune-only success. Commit evidence remains
|
|
179
|
+
separate if the end later fails. Selected managed-summary cancellation supplies
|
|
180
|
+
signal evidence; arbitrary native error text cannot establish cancellation.
|
|
181
|
+
|
|
182
|
+
Stock/custom-engine physical summaries, recovery opt-out/native-only summary
|
|
183
|
+
branches, OAuth Add/reauthorization/removal, quota, ordinary model refresh,
|
|
184
|
+
canonical/custom transport and unwrapped RPCs remain uncovered. Managed native
|
|
185
|
+
adapter HTTP dispatches have only the separately enabled coverage below.
|
|
186
|
+
Native checkpoint observation is not filesystem durability evidence. Reporting
|
|
187
|
+
loss, crashes, disabled intervals and paging/coverage gaps must never be treated
|
|
188
|
+
as zero failures. No automatic daily analysis, issue creation, account/model
|
|
189
|
+
switch, policy change, retry, compaction, restart or upload is introduced.
|
|
190
|
+
|
|
191
|
+
The tests exercise bounded codecs, once-only settlement, control epochs,
|
|
192
|
+
component teardown, actual Client/Host gateway binding, unchanged public JSON
|
|
193
|
+
storage reopen/isolation/write failure/corruption and native SettingsForms
|
|
194
|
+
hidden-leaf persistence. Compaction observer envelopes are synthetic; they are
|
|
195
|
+
not production reliability measurements or proof of live recovery. Complete
|
|
196
|
+
release CI and installed/loaded/collection evidence remain separate.
|
|
197
|
+
The published Client gateway fixture captures the unchanged registration-bundle
|
|
198
|
+
factory in its own isolated realm, sharing the actual public Cordis identity.
|
|
199
|
+
It does not substitute tagged source for published bytes or attach to a live
|
|
200
|
+
Client module registry; factory qualification is not Desktop activation proof.
|
|
201
|
+
|
|
202
|
+
## Content-free physical request observations (#392)
|
|
203
|
+
|
|
204
|
+
This independent, default-off pilot observes physical Fetch dispatches composed
|
|
205
|
+
by the plugin-managed native adapter. It does not intercept canonical routes,
|
|
206
|
+
change request bodies, timeout settings, retry decisions or native accounting.
|
|
207
|
+
It retains at most 128 completed observations and 128 live handles for 24 hours
|
|
208
|
+
within the same 2 MiB snapshot ceiling. Expiry, capacity drops and sampled
|
|
209
|
+
pending counts are explicit. Pause settles live observations as interrupted;
|
|
210
|
+
clear fences late completions. Saved pending counts become interrupted-on-reopen
|
|
211
|
+
counts, not fabricated request rows. Abrupt loss can still lose the unflushed
|
|
212
|
+
tail and requests that began since the last saved sample.
|
|
213
|
+
|
|
214
|
+
Rows contain plugin version, request time, bounded model/protocol metadata,
|
|
215
|
+
original JSON and dispatched wire byte counts, encoding, bounded composition
|
|
216
|
+
partitions, local header/elapsed timing, HTTP status and fixed terminal/reason
|
|
217
|
+
categories. Existing public native upload observations add ALPN, local body-write
|
|
218
|
+
timing and writable-buffer bytes only when available. Unsupported/ambiguous
|
|
219
|
+
transport evidence stays explicitly unavailable. Bodies up to 16 MiB retain the
|
|
220
|
+
existing synchronous span validator. Larger JSON bodies, including the reported
|
|
221
|
+
approximately 20.4 MiB class, use a cooperative span scanner up to 32 MiB without
|
|
222
|
+
building a payload object graph or decoding image/replay values. It yields every
|
|
223
|
+
65,536 scanned characters, checks a two-second monotonic work deadline and caps
|
|
224
|
+
concurrent scans at four. Both paths retain 64-level depth, 65,536-value,
|
|
225
|
+
131,072-token and 128-serialized-key-character limits. Size, work, time and
|
|
226
|
+
cancellation limits remain named unavailable states without partial totals.
|
|
227
|
+
These are diagnostic work limits, not provider request limits.
|
|
228
|
+
|
|
229
|
+
For opted-in observations, large-body counting starts after Fetch invocation
|
|
230
|
+
and does not delay ordinary native response/stream delivery. A retained row can
|
|
231
|
+
receive its numeric composition after terminal settlement; until then its
|
|
232
|
+
initial `size-limit` remains explicit. Refresh/read/export obtains the currently
|
|
233
|
+
available evidence, not a promise of completion. Pause/re-enable, clear,
|
|
234
|
+
teardown, retention and eviction fence late updates, and the counting work
|
|
235
|
+
retains its source string only for that bounded scan. Actual caller cancellation
|
|
236
|
+
can stop it. Verified-408 guidance may await that same bounded work; without
|
|
237
|
+
request consent only an exact verified failure starts the larger scan.
|
|
238
|
+
Replay validation/recovery keeps its original 16 MiB boundary unchanged.
|
|
239
|
+
|
|
240
|
+
Random stream UUIDs group only dispatches within one native SDK stream.
|
|
241
|
+
`dispatchIndex` is physical Fetch order, **not** Core's retry number or an
|
|
242
|
+
end-to-end Session/turn correlation. No account/Session/turn IDs or hashes,
|
|
243
|
+
URLs, headers, raw errors, prompts, tool parameters/results, attachment or replay
|
|
244
|
+
content, credentials or token accounting are retained. Review timestamps/model
|
|
245
|
+
metadata before explicit sharing; nothing is uploaded automatically.
|
|
246
|
+
Comparing JSON/wire sizes and partitions within a stream can reveal repeated
|
|
247
|
+
large payload sizes or growth, not duplicate contents, a Core retry count,
|
|
248
|
+
delivery to a proxy/supplier or the reason for a rejection. No request hashes
|
|
249
|
+
are collected and no automatic size-based mitigation is introduced.
|
|
250
|
+
|
|
251
|
+
An exact verified HTTP408 `user_request_timeout` is classified as
|
|
252
|
+
`request-body-timeout`; other provider/transport errors remain fixed unknown
|
|
253
|
+
categories. Real caller, branded plugin-owned and byte-idle abort signals retain
|
|
254
|
+
their strict attribution. Missing terminal/`terminated` text is not reinterpreted
|
|
255
|
+
as a signal abort. `stream-done` means native terminal observation, not execution,
|
|
256
|
+
billing or recovery success. Local body-write completion and zero writable buffer
|
|
257
|
+
do **not** prove TCP acknowledgement, proxy forwarding or supplier receipt.
|
|
258
|
+
These observations can distinguish a repeated large-body timeout from an
|
|
259
|
+
actual cancellation; they do not identify the remote fault owner or fix
|
|
260
|
+
HTTP408, EOF, retries or the native context meter.
|
|
261
|
+
|
|
262
|
+
The collapsed **Physical request observations** table exposes latest retained
|
|
263
|
+
timings/status/bytes. Detailed composition, transport evidence and random group
|
|
264
|
+
IDs remain in reviewed JSON. Capture failures log only the fixed
|
|
265
|
+
`COPILOT_REQUEST_DIAGNOSTICS_FAILED` code and never replace the native result.
|
|
266
|
+
Synthetic native-SDK tests exercise HTTP408, missing terminal, real abort,
|
|
267
|
+
concurrent stream isolation and unchanged request/error delivery without network
|
|
268
|
+
or live account use.
|
|
269
|
+
|
|
270
|
+
## Explicit offline analysis (#368)
|
|
271
|
+
|
|
272
|
+
The package provides a separate, read-only analyzer for one explicitly selected
|
|
273
|
+
aggregate file. Build the package first, then provide an absolute input path, an
|
|
274
|
+
input mode, and a new local output path. The output is created exclusively and
|
|
275
|
+
is never printed to stdout or sent over the network:
|
|
276
|
+
|
|
277
|
+
```sh
|
|
278
|
+
node scripts/analyze-diagnostics.mjs --input "ABSOLUTE_UNIT_FILE.json" --mode persisted-unit --profile-name "PROFILE_NAME" --output "NEW_LOCAL_REPORT.json"
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Replace the quoted placeholders before running; the input must be an absolute
|
|
282
|
+
path whose basename matches the profile-qualified unit filename.
|
|
283
|
+
|
|
284
|
+
For an explicitly reviewed Client/Host Remote view export, use
|
|
285
|
+
`--mode reviewed-view` and omit `--profile-name`. The persisted-unit mode
|
|
286
|
+
requires the unit basename and unit envelope to match the supplied 1–48
|
|
287
|
+
character ASCII DSH profile name; the name is mapped using the same public
|
|
288
|
+
profile-qualified storage-domain convention as the collector. The operator
|
|
289
|
+
must identify the file and profile. The tool never searches DSH homes,
|
|
290
|
+
enumerates storage units, opens a storage-domain writer or RPC, reads Settings,
|
|
291
|
+
credentials or history, or falls back between modes.
|
|
292
|
+
|
|
293
|
+
Both modes reuse the collector's strict Zod snapshot/view vocabulary. Request
|
|
294
|
+
observations are validated but deliberately not included in the account/compaction
|
|
295
|
+
aggregate report; `request-observations-not-analyzed` marks their omission.
|
|
296
|
+
Review the source JSON separately for transport investigation; absence of
|
|
297
|
+
aggregate candidates says nothing about request failures. The
|
|
298
|
+
reader rejects symlinks and non-files, caps input at 8 MiB, opens only for
|
|
299
|
+
reading, decodes fatal UTF-8, and checks file identity, size and modification
|
|
300
|
+
metadata before and after reading. These checks bound and detect ordinary
|
|
301
|
+
concurrent changes; they do not attest the active Host's backend and cannot
|
|
302
|
+
eliminate every filesystem race. Errors expose fixed diagnostic codes, not
|
|
303
|
+
paths, rejected values or raw filesystem details. The strict versioned report
|
|
304
|
+
contains only validated dimensions, bounded counts and explicit gaps. An
|
|
305
|
+
existing output is never overwritten.
|
|
306
|
+
|
|
307
|
+
Populations stay separate by build version, Client/Host layer and operation,
|
|
308
|
+
including logical/physical pairs. Starts and terminal counters are reported
|
|
309
|
+
independently because UTC-hour aggregation and retention can censor either
|
|
310
|
+
side; pending-start subtraction and exact operation failure rates are never
|
|
311
|
+
calculated. Only terminal observations enter duration bins. Stage-age bins are
|
|
312
|
+
cumulative operation ages, not exclusive phase timings. Client pending samples
|
|
313
|
+
are repeated historical observations, not an outstanding-work gauge; persisted
|
|
314
|
+
Host pending rows describe the stored snapshot, not current live work.
|
|
315
|
+
|
|
316
|
+
Outcomes remain separate, including policy rejection, revocation,
|
|
317
|
+
environment-fault, unknown and interrupted. Safe sums that exceed JavaScript's
|
|
318
|
+
exact integer range become `null` with an overflow gap. Fixed semantic candidate
|
|
319
|
+
fingerprints contain only coverage version, layer, operation, metric and
|
|
320
|
+
allowlisted reason—never identity hashes. Candidates do not prove a regression,
|
|
321
|
+
persistent fault, unique impact or root cause. Reports do not claim calibrated
|
|
322
|
+
thresholds, trends, percentiles, effectiveness or live collection status from
|
|
323
|
+
a persisted-only file. Empty, stale, paused, dirty, saturated, dropped,
|
|
324
|
+
evicted, interrupted and clock-discontinuous evidence remains explicit;
|
|
325
|
+
missing account-switch or compaction observations are gaps, not zero failures.
|
|
326
|
+
A physical summary-call success is explicitly not a native checkpoint commit;
|
|
327
|
+
only the logical compaction population can label a matching checkpoint and end
|
|
328
|
+
as observed success.
|
|
329
|
+
|
|
330
|
+
The first locally qualified persisted snapshot produced a private descriptive
|
|
331
|
+
report outside the repository. It is not a release artifact, CI fixture, issue
|
|
332
|
+
attachment or proof that alpha.128 is installed, loaded, collecting now, or
|
|
333
|
+
representative of current behavior. Do not publish that report or its counts
|
|
334
|
+
without separate sharing approval. Synthetic tests never read production
|
|
335
|
+
storage. There is no scheduler, automatic analysis, upload, issue creation,
|
|
336
|
+
repair or live-profile mutation in this milestone.
|
|
337
|
+
|
|
338
|
+
## Archived phase-0 qualification and proposals
|
|
339
|
+
|
|
340
|
+
The remaining sections preserve the reviewed phase-0 inventory. Their proposed
|
|
341
|
+
limits and future-tense acceptance steps are historical, superseded by the
|
|
342
|
+
runtime contract above; they do not enable any additional collection or schedule.
|
|
343
|
+
|
|
344
|
+
## Decision and evidence levels
|
|
345
|
+
|
|
346
|
+
Start with account operations, identity/Checking and compaction. Keep Client
|
|
347
|
+
and Host populations separate. Use fixed aggregates, never a raw error archive.
|
|
348
|
+
Do not add an end-to-end claim by matching clocks, account IDs or Session IDs.
|
|
349
|
+
Do not count a summary request or background-job admission as recovery success.
|
|
350
|
+
|
|
351
|
+
| Seam | Evidence now | Decision | Remaining qualification |
|
|
352
|
+
| --- | --- | --- | --- |
|
|
353
|
+
| 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 |
|
|
354
|
+
| 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 |
|
|
355
|
+
| 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 |
|
|
356
|
+
| 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 |
|
|
357
|
+
| 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 |
|
|
358
|
+
| 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 |
|
|
359
|
+
|
|
360
|
+
Source inspection proves API shape, not loaded services, backend paths, package
|
|
361
|
+
installation or live health. The copied qualification tree has no Git metadata;
|
|
362
|
+
five inspected files were compared byte-for-byte through GitHub with the exact
|
|
363
|
+
official commit and matched. No Core or dependency file was changed or executed.
|
|
364
|
+
The public root package manifests declare storage-domain and schedule exports;
|
|
365
|
+
this phase did not qualify their published artifact bytes or a live backend.
|
|
366
|
+
|
|
367
|
+
## Observation inventory
|
|
368
|
+
|
|
369
|
+
Paths below identify implementation seams, not a request to read stored
|
|
370
|
+
credentials, conversation bodies or the values passed into those methods.
|
|
371
|
+
|
|
372
|
+
| Operation population | Safe observation position | Observable facts | Explicit blind spots |
|
|
373
|
+
| --- | --- | --- | --- |
|
|
374
|
+
| 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 |
|
|
375
|
+
| 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 |
|
|
376
|
+
| 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 |
|
|
377
|
+
| 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 |
|
|
378
|
+
| 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 |
|
|
379
|
+
| 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 |
|
|
380
|
+
| 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 |
|
|
381
|
+
| 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 |
|
|
382
|
+
| 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 |
|
|
383
|
+
| 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 |
|
|
384
|
+
| 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 |
|
|
385
|
+
| 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 |
|
|
386
|
+
| 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 |
|
|
387
|
+
|
|
388
|
+
The account pilot includes global switch, Session override/inherit and identity
|
|
389
|
+
reads/physical flights. OAuth Add/reauthorization, removal, ordinary quota reads,
|
|
390
|
+
model refresh and all later request/search populations are inventoried but not
|
|
391
|
+
implicitly included in that first denominator. Adding them changes coverage.
|
|
392
|
+
|
|
393
|
+
### Cross-layer association
|
|
394
|
+
|
|
395
|
+
Existing strict RPC descriptors do not carry a diagnostics correlation token.
|
|
396
|
+
Do not alter their signatures, infer correspondence from timestamps or persist
|
|
397
|
+
identifiers as a shortcut. Phase 1 can deliver independent Client and Host
|
|
398
|
+
counts with an explicit `correlation: unavailable` boundary. A future additive
|
|
399
|
+
public protocol can be reviewed separately with native gateway compatibility,
|
|
400
|
+
short-lived token admission and teardown tests.
|
|
401
|
+
|
|
402
|
+
Within one owner, a bounded in-memory operation handle may connect start/stage/
|
|
403
|
+
terminal events. Native compaction matching may use the existing Session object
|
|
404
|
+
and compaction ID **only** while the bracket is live. Neither those IDs, account
|
|
405
|
+
IDs, nor their hashes are aggregate dimensions, stored records or exports.
|
|
406
|
+
Discard handles on settlement/disposal; never rebuild them by reading history.
|
|
407
|
+
|
|
408
|
+
## Proposed strict vocabulary
|
|
409
|
+
|
|
410
|
+
This is a proposed schema contract, not an installed Remote or runtime schema.
|
|
411
|
+
Phase 1 must implement a strict version-1 codec and rejection tests before use.
|
|
412
|
+
Unknown keys, arbitrary strings, non-finite/negative counters and impossible
|
|
413
|
+
stage transitions must be rejected without echoing the rejected input.
|
|
414
|
+
|
|
415
|
+
| Field | Allowed form / meaning |
|
|
416
|
+
| --- | --- |
|
|
417
|
+
| `schemaVersion` | Literal `1` |
|
|
418
|
+
| `pluginVersion` | Locally loaded build version, bounded validated package version; never infer from installed files |
|
|
419
|
+
| `coverageVersion` | Literal reviewed inventory revision; changes split comparison populations |
|
|
420
|
+
| `layer` | `client` or `host`; do not merge rates across them |
|
|
421
|
+
| `operation` | `account-global-switch`, `account-session-select`, `account-session-inherit`, `identity-read`, `identity-flight`, `compaction`, `compaction-summary`, `compaction-job-admission` |
|
|
422
|
+
| `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` |
|
|
423
|
+
| `outcome` | `success`, `no-op`, `cancelled`, `policy-rejected`, `revoked`, `environment-fault`, `failed`, `unknown` |
|
|
424
|
+
| `reason` | Fixed allowlist below, `none` or `unknown`; never an Error message/stack/cause serialization |
|
|
425
|
+
| `count`, `durationBucket`, `ageBucket` | Safe bounded integer counters and fixed bucket enum; monotonic elapsed time, not cross-process clock subtraction |
|
|
426
|
+
| `coverage` | Fixed flags/counters for unavailable seams, paused intervals, dropped operations, unknown results, discarded evidence, saturated counters and interrupted owners |
|
|
427
|
+
|
|
428
|
+
Initial reason candidates: `COPILOT_ACCOUNTS_BUSY`,
|
|
429
|
+
`COPILOT_ACCOUNTS_CONFLICT`, `COPILOT_ACCOUNTS_CHANGED`,
|
|
430
|
+
`COPILOT_ACCOUNTS_COMMIT_UNCERTAIN`, `COPILOT_ACCOUNTS_IDENTITY_TIMEOUT`,
|
|
431
|
+
`COPILOT_ACCOUNTS_IDENTITY_UNAVAILABLE`, `COPILOT_ACCOUNTS_MODELS_FAILED`,
|
|
432
|
+
`COPILOT_ACCOUNTS_SETTINGS_UNAVAILABLE`,
|
|
433
|
+
`COPILOT_SESSION_ACCOUNTS_UNAVAILABLE`,
|
|
434
|
+
`COPILOT_SESSION_ACCOUNTS_COMMIT_UNCERTAIN`,
|
|
435
|
+
`COPILOT_ACCOUNTS_IDENTITY_TLS`, `COPILOT_ACCOUNTS_IDENTITY_NETWORK`,
|
|
436
|
+
`COPILOT_ACCOUNTS_IDENTITY_RATE_LIMITED`,
|
|
437
|
+
`COPILOT_ACCOUNTS_IDENTITY_AUTH_REJECTED`,
|
|
438
|
+
`COPILOT_ACCOUNTS_IDENTITY_HTTP_ERROR`, `COPILOT_ACCOUNTS_IDENTITY_INVALID`,
|
|
439
|
+
`COPILOT_RESPONSES_REPLAY_SCOPE_MISMATCH`, `CONTEXT_WINDOW_EXCEEDED`,
|
|
440
|
+
`COPILOT_MANUAL_RECOVERY_FIXED_PREFIX`, `COPILOT_MANUAL_RECOVERY_INDIVISIBLE`,
|
|
441
|
+
`COPILOT_MANUAL_RECOVERY_CALL_LIMIT`, `COPILOT_MANUAL_RECOVERY_EMPTY_SUMMARY`,
|
|
442
|
+
`COPILOT_MANUAL_RECOVERY_UNBALANCED`, plus collector-owned fixed
|
|
443
|
+
`rpc-unavailable`, `decode-invalid`, `summary-invalid`, `storage-unavailable`,
|
|
444
|
+
`storage-invalid`, `storage-write-failed`, `observer-unavailable` and `unknown`.
|
|
445
|
+
Finalize this allowlist against the owning schemas in phase 1; a missing code
|
|
446
|
+
must map to unknown, never leak the original string. Bounded Error cause-chain
|
|
447
|
+
inspection may extract only exact known tokens, never retain the Error.
|
|
448
|
+
|
|
449
|
+
Classify from verified origin, not just a shared code: busy/CAS rejection is
|
|
450
|
+
normally policy-rejected; credential invalidation is revoked; user cancellation
|
|
451
|
+
is cancelled only with actual cancellation evidence. Missing service is an
|
|
452
|
+
environment fault. Identity-unavailable/models-failed are sanitized but broad:
|
|
453
|
+
they do not prove network, authentication or code defect. A hung promise is
|
|
454
|
+
unsettled, not a declared failure. Terminal observations are idempotent: a Host
|
|
455
|
+
failure plus Client error plus job reporter must not become three failures in
|
|
456
|
+
one logical population.
|
|
457
|
+
|
|
458
|
+
## Denominators, slow operations and success
|
|
459
|
+
|
|
460
|
+
Each layer/operation starts its own denominator at actual admission. Report
|
|
461
|
+
started, settled by outcome, unsettled, interrupted and dropped separately.
|
|
462
|
+
Phase 1 should collect every eligible success and failure, not errors only.
|
|
463
|
+
For one uninterrupted owner, the accounting invariant is:
|
|
464
|
+
|
|
465
|
+
`started = settled + live-unsettled + interrupted`
|
|
466
|
+
|
|
467
|
+
Dropped admission is a separate lost-opportunity count, not a fake success or
|
|
468
|
+
terminal failure. A restart before persistence creates an unknown gap, not a
|
|
469
|
+
historical interrupted count of zero. Do not report failure rate from starts
|
|
470
|
+
while many are unfinished; show settled/started and all outcome counts.
|
|
471
|
+
Cancellation/policy rejection/environment faults are not folded into code
|
|
472
|
+
failure rate. Sum physical summary/identity attempts separately from logical
|
|
473
|
+
operation counts; cache hits and joined calls keep their actual semantics.
|
|
474
|
+
|
|
475
|
+
Proposed fixed duration/age bins in milliseconds:
|
|
476
|
+
`[0,100)`, `[100,500)`, `[500,1000)`, `[1000,5000)`,
|
|
477
|
+
`[5000,15000)`, `[15000,60000)`, `[60000,300000)`, `[300000,+infinity)`.
|
|
478
|
+
These are descriptive bins, not calibrated alerts. Monotonic clocks and bounded
|
|
479
|
+
owner-local age snapshots can detect pending work without cancelling it,
|
|
480
|
+
polling credentials or changing timeouts. UI unmount/Host teardown closes
|
|
481
|
+
coverage as interrupted; it must not silently declare the operation completed.
|
|
482
|
+
|
|
483
|
+
Account CAS fulfillment is not the entire operation's success: require the
|
|
484
|
+
existing owning readback and valid terminal view. Client state settlement still
|
|
485
|
+
does not prove a painted UI or the Host's inner stages.
|
|
486
|
+
Compaction success requires a matching **native compact-checkpoint commit and
|
|
487
|
+
successful native end**. An error after a commit is a distinct failed-after-
|
|
488
|
+
commit observation, not an assertion that no history changed. Record observed
|
|
489
|
+
commit independently of terminal status; no-op, prune-only reduction and unknown
|
|
490
|
+
commit remain distinct. Do not inspect checkpoint content, summarize the history
|
|
491
|
+
or rewrite native events/Usage to obtain evidence.
|
|
492
|
+
|
|
493
|
+
## Privacy and control proposal
|
|
494
|
+
|
|
495
|
+
No prompts, assistant/tool content, replay, grants, device codes, raw responses,
|
|
496
|
+
settings values, identity/login, account/Session/job/message IDs or hashes, URLs,
|
|
497
|
+
paths, arbitrary exception text, stacks or freeform labels. Fixed stage codes
|
|
498
|
+
and numeric aggregates are the entire data boundary. Native source/transaction,
|
|
499
|
+
retry, account selection, authorization, accounting and cancellation stay owned
|
|
500
|
+
by their existing implementations.
|
|
501
|
+
|
|
502
|
+
Collection controls must distinguish disabled, active, paused and unavailable.
|
|
503
|
+
Enabling collection does not authorize persistence, export, scheduling, uploads,
|
|
504
|
+
paid probes or repairs. Clearing evidence is not disabling collection; pause
|
|
505
|
+
records a coverage break and does not fabricate normal outcomes. Phase 1 should
|
|
506
|
+
default off until its control surface and enable scope are reviewed. Collector
|
|
507
|
+
failures remain explicit fixed diagnostics without rejecting/retrying the
|
|
508
|
+
operation being observed or silently writing a fallback log.
|
|
509
|
+
|
|
510
|
+
The collector must bound live handles and aggregate dimensions before allocation,
|
|
511
|
+
report overflow/saturation, and tear down timers/listeners completely. Proposed
|
|
512
|
+
phase-1 limits are 128 live handles per owner and a 1 MiB encoded snapshot ceiling;
|
|
513
|
+
these are implementation-review candidates, not already enforced guarantees.
|
|
514
|
+
|
|
515
|
+
## Storage qualification and proposed phase-2 policy
|
|
516
|
+
|
|
517
|
+
Public candidate:
|
|
518
|
+
[`@deepseek-ai/dsh-storage-domain`](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/storage/storage-domain/src/index.ts).
|
|
519
|
+
Its root exports `defineDomain`, `domainTable`, `DomainFacility` and the `Domain`
|
|
520
|
+
types. `ctx.storageDomain.open(spec)` selects a configured public backend;
|
|
521
|
+
`table.put/update/delete` and `global.set` await backend durability before
|
|
522
|
+
publishing memory changes. `update` serializes one-record read/modify/write.
|
|
523
|
+
`close` rejects new writes and drains accepted work. The caller owns the handle.
|
|
524
|
+
Absent route/backend, unsupported facet or invalid medium is an error, not
|
|
525
|
+
permission to open an ad-hoc file or use Settings as a log store.
|
|
526
|
+
|
|
527
|
+
Important constraints: there is no documented multi-record transaction for
|
|
528
|
+
atomic clear; `open` loads all records; returned values are not defensive copies;
|
|
529
|
+
the backend determines crash durability and physical capacity. A logical byte
|
|
530
|
+
limit is not a filesystem quota. Use one bounded strict aggregate snapshot or
|
|
531
|
+
prove interruption-safe multi-record semantics before choosing a layout.
|
|
532
|
+
Do not enable `backup-and-skip`: it may retain corrupt records and log underlying
|
|
533
|
+
causes, violating the proposed no-raw-data contract. Prefer fail-closed open with
|
|
534
|
+
a fixed corruption diagnostic; explicit clear/reset must operate through a
|
|
535
|
+
qualified public seam and report whether inaccessible corrupt storage was
|
|
536
|
+
actually removed. Do not promise clear can repair an unopenable domain.
|
|
537
|
+
|
|
538
|
+
Proposed policy, pending backend/runtime tests and review:
|
|
539
|
+
|
|
540
|
+
- 14-day rolling UTC-hour aggregates; expiry at write/read/startup, no raw events.
|
|
541
|
+
- Hard proposed 2 MiB encoded snapshot and 336 hourly windows, plus a bounded
|
|
542
|
+
reviewed version/dimension inventory; enforce whichever bound is reached first.
|
|
543
|
+
Eviction and current retained bounds are explicit. Do not silently merge versions.
|
|
544
|
+
- Do not persist operation handles. Persist only aggregate unfinished counts by
|
|
545
|
+
safe stage if reviewed; after restart they are interrupted/unknown evidence,
|
|
546
|
+
never resumable handles or an invitation to replay work.
|
|
547
|
+
- Clear increments an aggregate epoch and removes only the plugin domain's data;
|
|
548
|
+
pause/disable/clear have independent results. Prevent accepted pre-clear writes
|
|
549
|
+
from resurrecting the earlier epoch. Do not reset credentials, Settings/history
|
|
550
|
+
or existing Auto observations.
|
|
551
|
+
- Missing/unavailable/corrupt storage yields evidence-unavailable, never an empty
|
|
552
|
+
healthy report. No fallback to files, Client storage, logs or another backend.
|
|
553
|
+
|
|
554
|
+
Stage 2 must qualify exact published artifacts and synthetic restart, backend
|
|
555
|
+
failure, queue saturation, bounded load, expiry, clock rollback, clear races and
|
|
556
|
+
corrupt-medium behavior. No storage dependency or route is added in phase 0.
|
|
557
|
+
|
|
558
|
+
## Scheduling qualification
|
|
559
|
+
|
|
560
|
+
[`@deepseek-ai/dsh-schedule`](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/schedule/schedule/src/index.ts)
|
|
561
|
+
is a durable reminder service with public create/list/catalog/history/update/
|
|
562
|
+
delete management and after/at/every/daily/weekly/cron record types. It requires
|
|
563
|
+
Agents, Sessions, tools, storageDomain, Session controller and persistence.
|
|
564
|
+
[Runtime delivery](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/schedule/schedule/src/runtime.ts)
|
|
565
|
+
resolves an Agent, appends a reminder through `followup`, flushes native Session
|
|
566
|
+
persistence and records delivery. It is **not** a public arbitrary callback
|
|
567
|
+
scheduler, nor a promise that a coding session can read the plugin's domain.
|
|
568
|
+
Creating a reminder changes native inbox/history and can lead to model work:
|
|
569
|
+
do not use it as hidden passive monitoring.
|
|
570
|
+
|
|
571
|
+
Before stage 3, select exactly one mechanism, name its owner, approved read
|
|
572
|
+
endpoint/data range, local environment, timezone, missed-run policy, report
|
|
573
|
+
destination and stop/delete path. A Copilot App automation may start a coding
|
|
574
|
+
session, but must separately prove access to the intended live Host's sanitized
|
|
575
|
+
aggregate reader. Service presence, task admission, execution and successful
|
|
576
|
+
data read are four distinct facts. No timer, automation or reminder was created.
|
|
577
|
+
|
|
578
|
+
## Phase-1 acceptance and later decisions
|
|
579
|
+
|
|
580
|
+
The next PR must implement the reviewed codec/controls and bounded in-memory
|
|
581
|
+
account/compaction pilot, not persistence or scheduling:
|
|
582
|
+
|
|
583
|
+
1. Test real Client and Host gateways independently; transport/decoding/stale
|
|
584
|
+
result failures, cache/join/cooldown and successful denominators must differ.
|
|
585
|
+
2. Test settled-once handles, concurrent stages, cancellation/revocation, slow
|
|
586
|
+
pending age, overflow, clock behavior, pause/clear and owner teardown.
|
|
587
|
+
3. Exercise unchanged native compaction start/attempt/commit/end, no-op,
|
|
588
|
+
failed-after-commit, invalid summary, replay scope, capacity and cancellation.
|
|
589
|
+
Stock/custom engine gaps must remain visible; do not patch their internals.
|
|
590
|
+
4. Test privacy with hostile errors, nested causes and arbitrary fields. Neither
|
|
591
|
+
failed input nor sensitive sentinel can appear in reports, logs or storage.
|
|
592
|
+
5. Preserve original operation results and existing UI/native behavior; run the
|
|
593
|
+
complete required CI. Installation and loaded-version acceptance are separate.
|
|
594
|
+
|
|
595
|
+
Phase-2 persistence and phase-3 daily reads require separate qualification and
|
|
596
|
+
review. Stage 4 adds the inventoried request/classifier/search populations.
|
|
597
|
+
Stage 5 compares the same operations, coverage versions, loaded plugin versions,
|
|
598
|
+
windows and denominators. Sample sufficiency and thresholds are declared before
|
|
599
|
+
claiming improvement; no data remains insufficient evidence.
|
|
600
|
+
|
|
601
|
+
Owner for the next decision: the repository maintainer reviewing #347.
|
|
602
|
+
Trigger: approval of this boundary/schema/control proposal before phase-1
|
|
603
|
+
activation. Action: implement the pilot with a linked acceptance PR, or retain
|
|
604
|
+
unavailable seams and narrow the scope. This phase closes only #354, not #347,
|
|
605
|
+
and makes no claim that #346's Checking fault has been reproduced or repaired.
|