dsh-github-copilot 0.4.1 → 0.4.2-alpha.10

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.
Files changed (46) hide show
  1. package/AGENTS.md +26 -3
  2. package/CHANGELOG.md +108 -0
  3. package/README.md +61 -21
  4. package/README.zh.md +46 -17
  5. package/deployment-baseline.json +25 -2
  6. package/docs/auto-high-cost.md +20 -8
  7. package/docs/auto-iteration-review.json +12 -12
  8. package/docs/auto-task-routing.md +85 -10
  9. package/docs/copilot-accounts.md +6 -0
  10. package/docs/copilot-compaction.md +1 -1
  11. package/docs/plugin-diagnostics.md +159 -6
  12. package/lib/client.js +774 -52
  13. package/lib/client.js.map +1 -1
  14. package/lib/diagnostics-analysis.js +4 -2
  15. package/lib/diagnostics-types-C1BD6ayS.js +655 -0
  16. package/lib/index.js +1816 -1050
  17. package/lib/manual-compaction-recovery.js +1 -1
  18. package/lib/remote.js +253 -1
  19. package/lib/routed-web.js +1 -1
  20. package/lib/types/auto-allocation-diagnostics.d.ts +126 -0
  21. package/lib/types/auto-assessment-evidence.d.ts +32 -0
  22. package/lib/types/auto-model-host.d.ts +1 -0
  23. package/lib/types/auto-task-assessment.d.ts +1 -0
  24. package/lib/types/auto-task-classifier.d.ts +2 -1
  25. package/lib/types/compaction-continuation.d.ts +1 -1
  26. package/lib/types/config.d.ts +18 -2
  27. package/lib/types/context-evidence.d.ts +4 -4
  28. package/lib/types/copilot-auth.d.ts +2 -1
  29. package/lib/types/copilot-usage-remote.d.ts +1 -1
  30. package/lib/types/diagnostics-analysis.d.ts +3 -2
  31. package/lib/types/diagnostics-card.d.ts +1 -0
  32. package/lib/types/diagnostics-collector.d.ts +14 -0
  33. package/lib/types/diagnostics-host.d.ts +114 -3
  34. package/lib/types/diagnostics-remote.d.ts +11 -9
  35. package/lib/types/diagnostics-types.d.ts +486 -30
  36. package/lib/types/native-settings-style.d.ts +1 -1
  37. package/lib/types/preview-provider.d.ts +8 -2
  38. package/lib/types/preview-route.d.ts +1 -1
  39. package/lib/types/remote.d.ts +1 -1
  40. package/lib/types/request-body-composition.d.ts +17 -0
  41. package/lib/types/request-body-evidence.d.ts +2 -1
  42. package/lib/types/request-diagnostics.d.ts +278 -0
  43. package/lib/types/session-continuation-types.d.ts +2 -2
  44. package/lib/types/turn-selection.d.ts +18 -1
  45. package/package.json +2 -2
  46. package/lib/diagnostics-types-FVf6zjob.js +0 -182
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "feature": "autorouting",
4
- "status": "not-collected",
4
+ "status": "insufficient-sample",
5
5
  "policyVersion": "high-cost-v1",
6
6
  "observation": {
7
- "start": null,
8
- "end": null,
9
- "sampleCount": 0,
10
- "limitations": "No live weighted-allocation dataset collected. Initial synthetic tests do not establish real workload quality, billing, cost savings or live Desktop activation."
7
+ "start": "2026-10-08T00:00:00Z",
8
+ "end": "2026-10-09T23:59:59Z",
9
+ "sampleCount": 63,
10
+ "limitations": "Retained prior aggregate review: producer alpha.2, daily UTC buckets, completeHistory=false, restarts=1. No Session/turn IDs, per-candidate reasons or model capability snapshot. A later user-reported turn says unavailable/not-selected and no adapter start, not timeout; the actual account candidate pool remains unavailable. A read-only local alpha.9 installed-manifest check and diagnostic inventory do not prove loaded turn version or live model metadata. No raw export uploaded."
11
11
  },
12
- "previousReview": "Issue #332 workflow pilot and #333 high-cost requirements; prior category policy used unconditional continuity.",
13
- "findings": "Unconditional continuity prevents allocation opportunities. Hard-prioritizing unmarked peers nearly excludes high-cost candidates; extreme-only gating wrongly couples cost to difficulty.",
14
- "decision": "Implement positive main-turn weights ordinary=1, marked=0.2 and finite previous-model multiplier=1.5 within the fitting supplier category. Capture local bounded opportunities and expected shares. Defer advisor calls until public evidence/authorization/account seams pass their own acceptance.",
15
- "validation": "Focused tests and 19 focused tooling tests passed with a supplemental unchanged pinned resolver; exact commands/counts are in the implementation PR. Native Client/Host gateways and SettingsForms fiber/restart persistence included. Synthetic source-component browser checks passed at widths 1280/390/195 in both themes. Normal pnpm verify blocked by configured mirror HTTP 404 for exact rc.2 dependency. Required full CI/build/tarball/publication results are recorded separately in the implementation PR and Release. This is not live Desktop/model/billing evidence.",
12
+ "previousReview": "Prior allocation review #332/#333, post-delivery review #334, fixed-outcome diagnostics #398, budget/config trial #400 and classifier disable #405.",
13
+ "findings": "Prior 63 decisions: 44 local/unknown, 4 semantic/unknown, 15 semantic/complex. Missing diagnostics prevented causal attribution. Alpha.9 requires exact advertised off before native preparation. Regression confirms a supplier-advertised protocol-native none/disabled candidate is rejected solely by this spelling gate. Missing/empty metadata remains uncertain, not proof of no reasoning. Actual user-account rejection cause is not established.",
14
+ "decision": "User requests classifier availability repair and better root-cause diagnostics. Accept explicit account-advertised off or protocol-native none for Responses/Completions and disabled for Anthropic, with one shared classifier-only predicate and published prepared off support. Do not manufacture capabilities from missing/empty metadata or names. Keep ordinary Chat, one call/no retry, no tools, 128 output tokens, timeouts, account proof and exclusions unchanged. Capture bounded strict request-local candidate first-rejection counts and native-off preparation failure; fixed no-fit Host warning codes only, no content, identities or raw errors and no new persistent diagnostic population. Preserve legacy missing fields as unknown. Do not claim live resolution before actual candidate evidence.",
15
+ "validation": "Regression-first classifier tests failed for protocol-native disable labels and absent candidate observations before implementation. Complete pnpm verify rerun passed: 2757 Vitest tests with 2 expected skips, all 340 tooling tests, source/test types, Agent/baseline checks, clean build and built package smoke. Coverage retains exact off wire tests as well as native none/disabled, and verifies candidate counts/preparation failure in the existing bilingual explanation without fabricating legacy evidence. Initial tooling run caught a review-document evidence omission (No Session/turn IDs); restored that truthful limitation rather than weakening tests. Exact alpha.10 tarball verification is required after final documentation alignment. Required CI remains pending. No actual supplier metadata or inference was obtained; no Desktop restart, profile installation or credential read is part of this repair.",
16
16
  "followUp": {
17
17
  "owner": "Maintainer or Agent assigned to post-delivery review issue #334",
18
- "trigger": "Before the next policy change, or after at least 200 eligible opportunities per compared model across at least 20 Sessions, keeping policy/candidate-set windows separate",
19
- "metric": "Opportunity-adjusted actual versus expected selections, marked replacement/retention, within-pool switching, assessment latency/failures; outcomes and costs only when independently attributable",
20
- "action": "Review local sanitized aggregates, check missing/evicted coverage, and retain/change/defer with reasons. This threshold is not statistical significance. No automatic upload, quality inference from completion, or credit inference from balance deltas."
18
+ "trigger": "Review 200 new decisions with recorded reasons, or any further classifier capability/policy change; first inspect a subsequent no-fit turn's request-local counts.",
19
+ "metric": "Fixed candidate first-rejection counts, native preparation failure, selected/no-fit assessment outcome and auxiliary milestones with producer/version coverage. Missing legacy evidence remains unknown; do not infer Session populations, billing, supplier latency or accuracy from aggregates.",
20
+ "action": "Confirm whether capability, category, exclusions, configuration or budget dominates actual no-fit decisions. If metadata remains unproven, retain diagnostic failure rather than guessing; change only on reviewed public semantics. Continue the linked post-delivery review #334. No automatic upload or live benchmark."
21
21
  }
22
22
  }
@@ -3,7 +3,7 @@
3
3
  Tracking: [#258](https://github.com/cloga/dsh-github-copilot/issues/258) and
4
4
  [evidence refinement #262](https://github.com/cloga/dsh-github-copilot/issues/262).
5
5
 
6
- **Current contract:** source candidate `0.4.0-alpha.99`, targeting official DSH/Windows
6
+ **Current contract:** source candidate `0.4.2-alpha.10`, targeting official DSH/Windows
7
7
  Desktop `0.2.0-rc.2`. Semantic assessment is enabled by default with bounded
8
8
  auxiliary timing/output evidence. Neither publication nor
9
9
  these explanations prove the version loaded in a particular Host.
@@ -22,6 +22,38 @@ namespace; it is not an extra switch on the Web search card. This changes
22
22
  subsequent assessments, not an already-admitted turn. Local known-task rules
23
23
  still work when auxiliary inference is disabled.
24
24
 
25
+ The native plugin configuration exposes these profile-wide settings under
26
+ `github-copilot` (not the Web search routing card):
27
+
28
+ | Setting | Default | Meaning |
29
+ |---|---|---|
30
+ | `autoSemanticAssessmentTimeoutMs` | `30000` | Integer total preparation/response budget from 1000 to 120000 ms. `8000` restores the earlier budget; zero/unlimited is not supported. |
31
+ | `autoSemanticAssessmentModel` | `''` | Empty uses metadata-driven automatic classifier selection. A nonempty value is an exact current-account model ID, not a display name or virtual Auto choice. |
32
+
33
+ For example, keep automatic selection while allowing the new default budget:
34
+
35
+ ```yaml
36
+ github-copilot:
37
+ autoSemanticAssessment: true
38
+ autoSemanticAssessmentTimeoutMs: 30000
39
+ autoSemanticAssessmentModel: ''
40
+ ```
41
+
42
+ These fields require the new plugin release; adding them to an older version
43
+ does not implement the behavior. Changes apply to subsequent assessments,
44
+ not an admitted turn's steps/retries. The 30-second default is a user-approved
45
+ trial, not calibrated latency or proof that past unknown results were timeouts.
46
+ Larger budgets can increase time before the answer begins and auxiliary charges.
47
+ Native Chat/search deadlines and user cancellation are independent.
48
+
49
+ An explicit classifier may use any account-advertised category, but still must
50
+ be an entitled, unexcluded concrete model with text capability, validated protocol
51
+ and the existing input/output headroom. A missing, excluded or unsuitable choice
52
+ produces `COPILOT_AUTO_CLASSIFIER_CONFIGURED_MODEL_UNAVAILABLE`, then the existing
53
+ unknown-demand/unavailable diagnostic; no silent alternate classifier is called.
54
+ Answer selection remains a separate Auto decision. The classifier result does
55
+ not choose its own answer model.
56
+
25
57
  Open the reply's selection explanation for the captured decision. Evidence is
26
58
  Host-lifetime and bounded; after restart or eviction it can be unavailable.
27
59
  Do not infer an old decision from the current picker.
@@ -30,7 +62,7 @@ Do not infer an old decision from the current picker.
30
62
  |---|---|
31
63
  | `uncertain` / unknown demand | The available evidence does not establish task demand; it is not a failed answer or a claim that the conversation is empty. |
32
64
  | `insufficient-evidence` | A local rule or classifier could not justify a demand category. Longer context alone does not guarantee classification. |
33
- | Semantic timeout | No validated result within the 8-second end-to-end budget. Demand remains unknown; Efficiency/Balance target Versatile, Intelligence targets Powerful, subject to eligibility and category fallback. |
65
+ | Semantic timeout | No validated result within the captured configured end-to-end budget (30 seconds by default). Demand remains unknown; Efficiency/Balance target Versatile, Intelligence targets Powerful, subject to eligibility and category fallback. |
34
66
  | Missing auxiliary milestone | That milestone was not observed before assessment settled, not proof the supplier never sent data. |
35
67
  | Selection unknown/unavailable | Captured selection evidence is absent or could not be read, distinct from unknown task demand. |
36
68
 
@@ -38,6 +70,21 @@ There is no assessment retry or automatic deadline extension. Caller cancellatio
38
70
  aborts the turn rather than invoking fallback. Auxiliary calls can add latency
39
71
  and supplier charges outside native answer Usage.
40
72
 
73
+ Classifier capability checks accept only explicit account-advertised disable
74
+ labels: `off`, protocol-native `none` for Responses/Completions, or `disabled`
75
+ for Anthropic. No aliases are applied to ordinary Chat model maps. Missing or
76
+ empty effort metadata does not prove absence of reasoning.
77
+
78
+ Strict request-local `semantic.candidateScan` evidence records at most 512
79
+ candidates, eligible counts and first-rejection counts for exclusions, explicit
80
+ ID mismatch, category, text input, unproven disable capability and budget.
81
+ Counts partition the examined pool, not all possible rejection reasons per model.
82
+ No candidate IDs, prompts or raw metadata are retained in these counts.
83
+ `preparationFailure: native-off-unavailable` separates native off preparation
84
+ from no-fit selection. No-fit Host warnings use fixed codes only. These fields
85
+ are ephemeral selection evidence, not a new persisted diagnostic population;
86
+ absent legacy evidence cannot be reconstructed.
87
+
41
88
  ## Requirements
42
89
 
43
90
  Auto must explain why the initiating turn chose its actual route, not display a
@@ -115,7 +162,7 @@ charges and latency, separate from native chat Usage and without inferred cost.
115
162
 
116
163
  ## Auxiliary latency evidence and bounded output (#272)
117
164
 
118
- The assessment still has one **8-second end-to-end deadline**, including account
165
+ The assessment has one **configured end-to-end deadline, 30 seconds by default**, including account
119
166
  discovery/preparation and the native call. It does not retry on timeout or try a
120
167
  second classifier. The response budget is now 128 output tokens, with compact
121
168
  demand JSON and at most three fixed signals requested. The strict decoder
@@ -131,16 +178,44 @@ this is not a hard real-time guarantee or evidence of a supplier latency cause.
131
178
  The owned timer and abort listener are disposed when assessment settles.
132
179
 
133
180
  Among eligible supplier Lightweight text candidates with the existing input
134
- headroom, prefer advertised reasoning `off`, then deterministic ID ordering.
181
+ headroom and explicit reasoning-disable proof, automatic selection prefers
182
+ unmarked cost, then deterministic ID ordering. An explicit exact-ID setting selects only that
183
+ eligible model, without category or cost re-ranking.
135
184
  This does not infer speed, health or quality from effort or model names, and
136
185
  does not launch a second candidate if native support is absent.
137
186
 
138
- Request `off` reasoning only when both current supplier metadata advertises it
139
- and the public prepared model lists an `off` effort. Supplier metadata alone
140
- does not establish native support: current managed reasoning maps can decline
141
- `off` even when advertised. In that case retain native policy, do not change
142
- shared model maps, guess a wire value or patch Core. No claim that reasoning is
143
- disabled for all classifiers is made.
187
+ Automatic selection is metadata-driven, not an empirical fastest/best model
188
+ search. No additional benchmark requests, adaptive deadlines, per-model health
189
+ ranking, cooldown or cross-turn cache are introduced. Those require separately
190
+ reviewed representative latency/accuracy/cost observations and consent, not a
191
+ guess from model names or a timeout suspicion. Review outcomes under #334 before
192
+ claiming the increased default improves live classification.
193
+
194
+ The classifier is eligible only when current account metadata advertises
195
+ an explicit protocol-compatible disable mode and the isolated, public prepared
196
+ model exposes `off`. It then
197
+ always requests `off`; otherwise assessment fails closed without dispatching
198
+ the classifier. The classifier-only model mapping serializes the native
199
+ disable form supported by the published adapter: Responses
200
+ `reasoning.effort: "none"`, OpenAI-compatible `reasoning_effort: "none"`, or
201
+ Anthropic `thinking.type: "disabled"`. This mapping is not added to shared
202
+ account models, so ordinary Chat behavior remains unchanged.
203
+
204
+ The auxiliary adapter also does not inherit configured Chat reasoning effort:
205
+ its isolated profile omits that default while ordinary Chat retains it. Tools
206
+ and an execution loop are absent. These checks establish the requested wire
207
+ payload in synthetic tests, not that every supplier honors the control
208
+ internally. Models lacking either advertised or native support are not used;
209
+ do not substitute `low` or `minimal`, which can enable reasoning.
210
+
211
+ Tools and an execution loop are absent. Only locally unknown tasks use one
212
+ classifier call per admitted turn; subsequent steps/retries reuse its result.
213
+ Text projection stays bounded to twelve rows, 1600 characters per row and
214
+ 8000 serialized characters; files, images and replay bodies are not included.
215
+ The requested output budget remains 128 tokens. Neither those bounds nor the
216
+ waiting deadline establishes a hard supplier reasoning-token, credit or dollar
217
+ cap. Measure accuracy, elapsed time and auxiliary usage separately before
218
+ reducing context/output or claiming a cheapest/fastest classifier.
144
219
 
145
220
  Captured Host-lifetime selection evidence now includes a bounded public
146
221
  classifier ID, configured waiting budget, total monotonic assessment elapsed
@@ -17,6 +17,12 @@ normal native refresh by another same-account request. Upgrade to 0.4.1 for the
17
17
  narrow plugin-owned refresh exception. This is synthetic regression evidence,
18
18
  not attribution of a particular live error to refresh.
19
19
 
20
+ Separately enabled request diagnostics may now record fixed qualification,
21
+ notification and commit reasons plus bounded live-wire populations; see
22
+ [credential-change decisions](./plugin-diagnostics.md#credential-change-decisions-402).
23
+ Unknown notification source stays unknown. This observes the existing exception,
24
+ not a broader permission to preserve requests or a reconstruction of past failures.
25
+
20
26
  Only a genuine native refresh through the plugin's public credential-store bridge
21
27
  may qualify: normalized account grant, model entitlements and official
22
28
  OAuth-derived endpoint must remain unchanged. Its exact returned object is
@@ -106,7 +106,7 @@ Original serialized value spans partition total bytes into `input`/`messages`, t
106
106
 
107
107
  Responses tool pictures are also image blocks: the native SDK serializes them under `function_call_output.output[]`, separately from ordinary message `content[]`. Older plugin diagnostics incorrectly classified those spans as remaining history, so an old report of zero image bytes does not establish an image-free request. The corrected diagnostic applies only to newly observed failures; stored failures and history are not rewritten. Unknown output arrays remain residual, and the fix changes neither total bytes nor native image admission, offload budgets, replay or transport.
108
108
 
109
- Analysis accepts at most 16 MiB of UTF-8 JSON, with a pre-parse depth/token bound (64 levels / 131072 tokens), followed by at most 65536 values and 128 serialized key characters. Missing, malformed, unsupported, size-limited and work-limited evidence has a named unavailable state with no partial success-shaped totals. Limits bound diagnostic cost and are **not supplier request limits or admission controls**. A reported 9 MiB body may be analyzed, but its size does not establish why a timeout occurred. If image blocks dominate, an explicitly selected smaller `chatMaxRequestImageBytes` can authorize native image offload; if compressible history dominates, explicit native compaction can help. Tool definitions and opaque replay may remain; small failing requests still warrant network/service investigation. Neither choice is performed automatically or guaranteed to reduce 408 frequency.
109
+ Analysis up to 16 MiB retains the existing span validator. Larger verified-408 JSON bodies use a cooperative span scanner up to 32 MiB without allocating a full payload object graph or decoding image/replay content. Its 65,536-character yields, two-second monotonic deadline and four concurrent scan slots bound additional work; both paths retain 64-level depth, 131072-token, 65536-value and 128-serialized-key-character limits. Separately opted-in physical request observations may already have started that same work after Fetch invocation, without holding up ordinary native response delivery. Verified-408 guidance may await it and preserves Fetch-to-header timing measured before analysis. Missing, malformed, unsupported, size/work/time-limited or cancelled evidence remains explicitly unavailable, never partial success-shaped totals. Replay validation and recovery keep the original 16 MiB limits. These limits are **not supplier request limits or admission controls**. A measured approximately 20.4 MiB body does not establish why a timeout occurred. If image blocks dominate, an explicitly selected smaller `chatMaxRequestImageBytes` can authorize native image offload; if compressible history dominates, explicit native compaction can help. Tool definitions and opaque replay may remain; small failing requests still warrant network/service investigation. Neither choice is performed automatically or guaranteed to reduce 408 frequency.
110
110
 
111
111
  This implementation is preventive, not a general rescue summarizer. A manual summary whose full input already exceeds the hard budget fails before model transport. It does not silently trim, fabricate a partial checkpoint, or claim that refusing the request recovered the history. Giant fixed prefixes or an indivisible latest unit can also prevent useful reduction.
112
112
 
@@ -1,4 +1,4 @@
1
- # Local diagnostics: account and compaction pilot
1
+ # Local diagnostics: account, compaction, Auto allocation and requests
2
2
 
3
3
  Roadmap: [#347](https://github.com/cloga/dsh-github-copilot/issues/347).
4
4
  Phase 0: [#354](https://github.com/cloga/dsh-github-copilot/issues/354).
@@ -22,16 +22,96 @@ through native path-level Settings CAS and confirm readback. This enables
22
22
  collection **and bounded local aggregate persistence**, not exports or uploads.
23
23
  The normal installation does not change this default-off setting.
24
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
+
25
40
  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**
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**
28
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.
29
109
  The coding session does not automatically gain access to the running Host.
30
110
  Pause preserves retained evidence and closes active observations as interrupted.
31
111
  It remains available for a configured-on collector when storage is unavailable;
32
112
  enabling still requires ready storage.
33
113
  Clear requires a separate confirmation, advances an epoch and removes this
34
- domain's aggregates without changing the enabled setting, accounts or history.
114
+ domain's aggregates and request observations without changing the enabled settings, accounts or history.
35
115
  An uncertain write is not automatically replayed by the UI.
36
116
 
37
117
  ## Storage and limits
@@ -101,7 +181,8 @@ signal evidence; arbitrary native error text cannot establish cancellation.
101
181
 
102
182
  Stock/custom-engine physical summaries, recovery opt-out/native-only summary
103
183
  branches, OAuth Add/reauthorization/removal, quota, ordinary model refresh,
104
- managed chat/search/classifier transport and unwrapped RPCs remain uncovered.
184
+ canonical/custom transport and unwrapped RPCs remain uncovered. Managed native
185
+ adapter HTTP dispatches have only the separately enabled coverage below.
105
186
  Native checkpoint observation is not filesystem durability evidence. Reporting
106
187
  loss, crashes, disabled intervals and paging/coverage gaps must never be treated
107
188
  as zero failures. No automatic daily analysis, issue creation, account/model
@@ -118,6 +199,74 @@ factory in its own isolated realm, sharing the actual public Cordis identity.
118
199
  It does not substitute tagged source for published bytes or attach to a live
119
200
  Client module registry; factory qualification is not Desktop activation proof.
120
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
+
121
270
  ## Explicit offline analysis (#368)
122
271
 
123
272
  The package provides a separate, read-only analyzer for one explicitly selected
@@ -141,7 +290,11 @@ must identify the file and profile. The tool never searches DSH homes,
141
290
  enumerates storage units, opens a storage-domain writer or RPC, reads Settings,
142
291
  credentials or history, or falls back between modes.
143
292
 
144
- Both modes reuse the collector's strict Zod snapshot/view vocabulary. The
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
145
298
  reader rejects symlinks and non-files, caps input at 8 MiB, opens only for
146
299
  reading, decodes fatal UTF-8, and checks file identity, size and modification
147
300
  metadata before and after reading. These checks bound and detect ordinary