dsh-github-copilot 0.4.2-alpha.3 → 0.4.2-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 CHANGED
@@ -52,7 +52,7 @@ projection may diagnose concrete failed-zero or invalid-sample incidents; ordina
52
52
  request progress and absent fresh sampling stay quiet. Never filter shared native
53
53
  usage, replace Core's meter, infer current occupancy/percentages or rewrite history.
54
54
  See [quota boundaries](./docs/copilot-usage.md).
55
- 12. Default-off local account/Checking/compaction diagnostics through public storage-domain and strict additive Remotes. Keep fixed-dimension Client/Host and logical/physical populations separate, with bounded handles/rows, 14-day retention, explicit loss/uncertainty and native commit evidence. Isolate the home-wide backend by public profile context, never account/Session identity; one writer per profile is required. No content, raw errors, identities/hashes, credential/history reads, ad-hoc files, Settings logs, upload, daily task or automatic repair. Enable/pause uses only the hidden volatile `diagnosticsEnabled` CAS leaf; clear is a separately confirmed epoch fence. Missing/corrupt storage remains unavailable, never healthy empty data. Publication does not enable collection. See [local diagnostics](./docs/plugin-diagnostics.md).
55
+ 12. Default-off local account/Checking/compaction diagnostics through public storage-domain and strict additive Remotes. Keep fixed-dimension Client/Host and logical/physical populations separate, with bounded handles/rows, 14-day retention, explicit loss/uncertainty and native commit evidence. Isolate the home-wide backend by public profile context, never account/Session identity; one writer per profile is required. No content, raw errors, identities/hashes, credential/history reads, ad-hoc files, Settings logs, upload, daily task or automatic repair. Aggregate and Auto controls remain independent. Separately consented `requestDiagnosticsEnabled` collects at most 128 content-free managed-adapter physical requests for 24 hours within the shared 2 MiB cap. Random stream groups/dispatch indices are not Session/turn identity or Core retry counts. Local body-write completion does not prove supplier receipt; abort attribution needs actual signal evidence, not EOF text. Never change transport/retries/Usage to obtain diagnostics. All controls use hidden volatile CAS leaves with exact readback; clear is a separately confirmed epoch fence. Missing/corrupt storage remains unavailable, never healthy empty data. Publication does not enable collection. See [local diagnostics](./docs/plugin-diagnostics.md).
56
56
 
57
57
  ## Session-policy compaction replay consent (#349, #352)
58
58
 
@@ -128,7 +128,7 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
128
128
  - `src/serialize.ts`, `src/sse.ts`, `src/failure.ts`: protocol conversion and bounded error handling.
129
129
  - `src/response-error-body.ts`, `src/request-body-timeout.ts`, `src/request-upload-evidence.ts`: bounded clone-only HTTP error evidence and safe managed upload-timeout guidance. Request-scoped public Node diagnostic events supply numeric local body-write/header/ALPN evidence only after an exact verified `408/user_request_timeout`; absent events, multiple native requests and work limits stay explicit. Always dispose subscriptions when Fetch settles, without changing its arguments, Response/errors, dispatcher, proxy or retry owner. Local body-write completion is not upload duration, kernel ACK, supplier receipt or execution; its absence does not prove incomplete upload. Native failure classification/retry metadata stay unchanged; final JSON bytes are not tokens or a payload limit. A separate explicit opt-in compression setting is default-off and never activated by a 408; never infer overflow, auto-compact, trim history, switch models or add retries from a 408.
130
130
  - `src/responses-request-compression.ts`: asynchronous `node:zlib` gzip at `Z_BEST_SPEED` only for exact account-proven official Copilot HTTPS `/responses` JSON POSTs through the existing public Fetch seam. `github-copilot.responsesRequestCompression` defaults false; enforce the 256 KiB minimum, 32 MiB compression-work bound and both 5%/4 KiB savings thresholds. Skips retain the original request with a fixed reason, and cancellation/account/deadline fences run before dispatch. No custom Fetch, other protocol, explicit `auto`/WebSocket, DNS/proxy/dispatcher changes, context-admission or replay changes, resend after an encoding rejection, or new retry. Gzip is wire encoding, not compaction or proof of supplier receipt.
131
- - `src/request-body-evidence.ts`: verified-408-only, bounded numeric original-JSON span accounting through the existing fetch hook. Conversation/tool definitions/top-level system/residual partition total bytes; structural image and opaque replay spans are disjoint conversation subsets, never decoded contents. Unknown/limited evidence stays explicit. Fetch-to-header time excludes clone inspection and is not upload duration. With gzip, report original JSON composition and prepared HTTP-body bytes separately; neither establishes delivered bytes. No success-path analysis, retained body, automatic mitigation or supplier-limit claim.
131
+ - `src/request-body-evidence.ts`, `src/request-body-composition.ts`: bounded numeric original-JSON spans for verified 408s and separately consented request observations. Keep replay validation/recovery at 16 MiB; only diagnostic composition may use the 32 MiB cooperative scanner with 64 Ki-character yields, a two-second monotonic deadline and four scan slots. Do not build a full payload object graph or decode image/replay values. Conversation/tool definitions/top-level system/residual partition total bytes; structural image and opaque replay spans are disjoint conversation subsets. Unknown/limited/cancelled evidence stays explicit. Opted-in large scans start after Fetch invocation without delaying ordinary native delivery; retained numeric rows may update after settlement only behind consent/clear/retention/eviction fences. Retain source strings only for bounded in-flight counting, never in storage/logs. Fetch-to-header time excludes analysis and is not upload duration. With gzip, report original JSON and prepared HTTP-body bytes separately; neither establishes delivered bytes. No automatic mitigation, timeout/retry changes or supplier-limit claim.
132
132
  - `src/copilot-stream-liveness.ts`: request-local HTTP/SSE byte-idle observation, paired with the public native adapter's bounded assistant-chunk deadline. Default five-minute byte idle and ten-minute semantic silence; no fake assistant output, private watchdog access, new retry or Core patch. Consumer think time is excluded; explicit WebSocket/auto stays native-only. `chatStreamLiveness: false` restores native-only timing. `chatMaxRequestImageBytes` retains Core's 20 MiB default; smaller explicit settings authorize only native image offload, not hidden history trimming or a guessed supplier limit. Synthetic heartbeat evidence is not production heartbeat proof.
133
133
  - `tests/`: unit and integration evidence; mirror the source area being changed.
134
134
  - `deployment-baseline.json`: declared machine-readable compatibility and capability evidence inventory.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.2-alpha.5 (prepared)
4
+
5
+ - Measure large request JSON composition up to 32 MiB with a cooperative,
6
+ bounded span scanner instead of a full payload object graph. Preserve
7
+ disjoint image/replay byte subsets, native original spans and explicit
8
+ cancellation/time/work limits; replay validation keeps its 16 MiB boundary.
9
+ - Start opted-in large-body counting after Fetch invocation without holding
10
+ up ordinary response/stream delivery. Fence late numeric updates to their
11
+ own retained row across pause/re-enable, clear, teardown and eviction.
12
+ - Reuse bounded composition work in exact verified-408 guidance. Preserve
13
+ native bytes, response/error, retries, Usage, timeout and default-off gzip;
14
+ composition evidence does not establish a proxy or supplier fault.
15
+
16
+ ## 0.4.2-alpha.4 (prepared)
17
+
18
+ - Add independently opt-in, content-free managed-adapter physical request
19
+ observations to Local diagnostics: model/protocol, JSON/wire byte counts,
20
+ bounded composition, local transport timings, HTTP status and strict terminal
21
+ categories. Existing aggregate collection does not enable this scope.
22
+ - Retain at most 128 request rows for 24 hours within the shared 2 MiB snapshot.
23
+ Expose dropped/expired/pending/reopen gaps, independent pause and confirmed
24
+ clear, a native-style request table and explicit reviewed-JSON scope.
25
+ - Preserve native request bytes, retry decisions, stream results and accounting.
26
+ Body-write completion is not supplier receipt; missing terminal text is not
27
+ abort evidence. This improves investigation, not HTTP408/EOF/context recovery.
28
+ - Keep the offline account/compaction analyzer aggregate-only, with an explicit
29
+ gap when separately collected request observations are omitted.
30
+
3
31
  ## 0.4.2-alpha.3 (prepared)
4
32
 
5
33
  - Put daily Auto allocation aggregate rows in the primary Local diagnostics view, with UTC date, policy, model, decision cohort, opportunities, expected selections, selected counts and no-fit decisions. Keep cohorts distinct and state that these counts do not prove execution, quality or billing.
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  GitHub Copilot account discovery, contextual Auto routing and hosted search for DSH. The plugin reuses DSH's published native adapter, retaining a profile-wide account default with independent Session next-turn choices; it does not patch Core or maintain a second model catalog.
10
10
 
11
- **Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.3`.** `0.4.2-alpha.1` was not published: its release preflight failed, and its immutable tag will not be reused. Supported host: official DSH / Windows Desktop `0.2.0-rc.2`. The stable version is also published on npm's `latest` dist-tag; prereleases remain on their channel tags. Stability-channel promotion does not expand the qualified host baseline or prove live account, model, search or Desktop health. Earlier DSH pins are historical evidence, not supported installation targets. Published, installed in a profile and loaded by a running Host are separate states.
11
+ **Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.5`.** `0.4.2-alpha.1` was not published: its release preflight failed, and its immutable tag will not be reused. Supported host: official DSH / Windows Desktop `0.2.0-rc.2`. The stable version is also published on npm's `latest` dist-tag; prereleases remain on their channel tags. Stability-channel promotion does not expand the qualified host baseline or prove live account, model, search or Desktop health. Earlier DSH pins are historical evidence, not supported installation targets. Published, installed in a profile and loaded by a running Host are separate states.
12
12
 
13
13
  **Upgrade from 0.4.0:** that first stable release can interrupt concurrent managed requests with `COPILOT_PREVIEW_CREDENTIAL_CHANGED` during normal same-account native OAuth renewal. In 0.4.1, a proven plugin-owned refresh with unchanged account, endpoint and entitlements preserves already-dispatched HTTP streams; subsequent requests use freshly validated auth and metadata. Unknown/external credential notifications, revocation, cancellation and provider rejections remain explicit—not a promise of invisible recovery or automatic retry. See [the refresh boundary](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385).
14
14
 
@@ -43,7 +43,18 @@ and loading the published build, open the plugin detail settings page →
43
43
  **Local diagnostics → Read status → Enable local collection**. This enables
44
44
  local account/Checking and compaction persistence, not uploads or scheduled
45
45
  analysis. Enable **Auto allocation observation** separately to collect only
46
- Auto allocation aggregates. The package also has an explicit offline analyzer
46
+ Auto allocation aggregates. **Enable request observations** is a third, independent,
47
+ default-off control: up to 128 content-free managed-adapter physical requests
48
+ for 24 hours, with model, JSON/wire byte counts, timings, HTTP status and terminal
49
+ categories. No bodies, headers, credentials or Session/turn IDs are collected.
50
+ Local body-write completion does not prove supplier receipt; these diagnostics
51
+ do not fix timeouts or alter retry/Usage behavior.
52
+ Large JSON bodies up to 32 MiB can receive bounded, cooperative composition
53
+ counts without a full payload parse; the approximately 20.4 MiB class no longer
54
+ necessarily hits the old 16 MiB diagnostic blind spot. Time/work/cancellation
55
+ limits remain explicit, and settled rows may acquire counts on a later read.
56
+ No gzip, history trimming or extra retry is enabled. See [request observations](./docs/plugin-diagnostics.md#content-free-physical-request-observations-392).
57
+ The package also has an explicit offline analyzer
47
58
  for a caller-selected persisted unit or reviewed aggregate view; it writes only
48
59
  to a new local report file and never scans, uploads or changes collection. Pause
49
60
  preserves evidence; Clear requires separate confirmation. Client/Host
@@ -105,10 +116,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
105
116
  For a **standalone named profile**:
106
117
 
107
118
  ```sh
108
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/dsh-github-copilot-0.4.2-alpha.3.tgz
119
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.5/dsh-github-copilot-0.4.2-alpha.5.tgz
109
120
  ```
110
121
 
111
- For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.3`; stable versions publish on npm's `latest` dist-tag and prereleases on their channel tags. The official rc.2 **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
122
+ For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.5`; stable versions publish on npm's `latest` dist-tag and prereleases on their channel tags. The official rc.2 **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
112
123
 
113
124
  After an approved reload/restart:
114
125
 
@@ -284,14 +295,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
284
295
  GitHub Releases and npm distribute the same original verified tarball. Pin a version; verify Release SHA-256 or npm `dist.integrity`. Never repack an immutable release or move/reuse its tag.
285
296
 
286
297
  ```sh
287
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/dsh-github-copilot-0.4.2-alpha.3.tgz
288
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/SHA256SUMS
298
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.5/dsh-github-copilot-0.4.2-alpha.5.tgz
299
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.5/SHA256SUMS
289
300
  sha256sum --check SHA256SUMS
290
301
  ```
291
302
 
292
303
  ```powershell
293
304
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
294
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
305
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.5.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
295
306
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
296
307
  ```
297
308
 
package/README.zh.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  为 DSH 提供 GitHub Copilot 账号模型发现、上下文 Auto 选模和 hosted search。插件复用 DSH 公开的原生适配器,保留 profile 全局默认账号,并支持 Session 后续 turn 指定独立账号;不修改 Core,也不维护第二套模型目录。
10
10
 
11
- **稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布预览版:`0.4.2-alpha.3`。** `0.4.2-alpha.1` 的发布预检失败,因此未发布;其不可变 tag 不会复用。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。稳定版也发布到 npm 的 `latest` dist-tag;预发布版本仍使用各自渠道 tag。稳定渠道不扩大已验证的宿主基线,也不证明实时账号、模型、搜索或 Desktop 健康状态。较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。
11
+ **稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布预览版:`0.4.2-alpha.5`。** `0.4.2-alpha.1` 的发布预检失败,因此未发布;其不可变 tag 不会复用。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。稳定版也发布到 npm 的 `latest` dist-tag;预发布版本仍使用各自渠道 tag。稳定渠道不扩大已验证的宿主基线,也不证明实时账号、模型、搜索或 Desktop 健康状态。较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。
12
12
 
13
13
  **从 0.4.0 升级:**首个正式版在同账号正常原生 OAuth 刷新时,可能以 `COPILOT_PREVIEW_CREDENTIAL_CHANGED` 中止并行托管请求。0.4.1 仅在插件拥有的原生刷新被精确验证,且账号、端点与权限连续时,保留已发出的 HTTP 流;后续请求重新验证认证与模型元数据。未知/外部凭据通知、撤销、取消与供应商拒绝仍明确报错,不承诺所有刷新无感,也不自动重试。参见[刷新边界](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385)。
14
14
 
@@ -34,7 +34,15 @@ Session/turn ID、对话内容,也不推断执行/结果,不自动调参
34
34
  汇总,**默认关闭**。安装并加载已发布版本后,进入插件详情设置页 →
35
35
  **Local diagnostics → Read status → Enable local collection**,开启本地持久化;
36
36
  仅用于账号/Checking 与压缩汇总,不上传或启用每日分析。另行启用
37
- **Auto allocation observation** 才会单独收集 Auto 分配汇总。包内另提供显式离线分析器,
37
+ **Auto allocation observation** 才会单独收集 Auto 分配汇总。第三个独立、默认关闭的
38
+ **Enable request observations** 开关保留最多 128 条托管适配器的物理请求观测,保留 24 小时:
39
+ 仅包含模型、JSON/传输字节数、耗时、HTTP 状态和终止分类,不记录正文、headers、
40
+ 凭据或 Session/turn ID。本地写出完成不证明供应方收到了请求;诊断不会修复超时,
41
+ 也不改变重试或 Usage。最高 32 MiB 的大 JSON 请求可通过有界、协作式扫描获得组成计数,
42
+ 不完整解析 payload 对象图;约 20.4 MiB 的请求不再必然落入旧 16 MiB 诊断盲区。
43
+ 耗时/工作量/取消限制仍明确可见,已结束的记录可能在之后读取时才补齐计数。
44
+ 不自动启用 gzip、截断历史或增加重试,参见[请求观测](./docs/plugin-diagnostics.md#content-free-physical-request-observations-392)。
45
+ 包内另提供显式离线分析器,
38
46
  只处理调用者指定的持久化单元或经审阅的聚合视图,并且只新建本地报告文件;不会扫描、
39
47
  上传或更改采集设置。暂停保留证据,清除需单独确认。Client/Host 分开统计,未覆盖路径、
40
48
  报告丢失与存储故障明确显示。描述性计数不是历史重建、错误率,也不表示优化效果已被验证。诊断页默认显示按 UTC 日期、
@@ -91,10 +99,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
91
99
  **独立具名 profile**:
92
100
 
93
101
  ```sh
94
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/dsh-github-copilot-0.4.2-alpha.3.tgz
102
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.5/dsh-github-copilot-0.4.2-alpha.5.tgz
95
103
  ```
96
104
 
97
- **Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.3`;稳定版发布到 npm `latest` dist-tag,预发布版使用对应渠道 tag。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
105
+ **Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.5`;稳定版发布到 npm `latest` dist-tag,预发布版使用对应渠道 tag。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
98
106
 
99
107
  经批准 reload/restart 后:
100
108
 
@@ -270,14 +278,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
270
278
  GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
271
279
 
272
280
  ```sh
273
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/dsh-github-copilot-0.4.2-alpha.3.tgz
274
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.3/SHA256SUMS
281
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.5/dsh-github-copilot-0.4.2-alpha.5.tgz
282
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.5/SHA256SUMS
275
283
  sha256sum --check SHA256SUMS
276
284
  ```
277
285
 
278
286
  ```powershell
279
287
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
280
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
288
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.5.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
281
289
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
282
290
  ```
283
291
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.2-alpha.3"
11
+ "version": "0.4.2-alpha.5"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -296,6 +296,11 @@
296
296
  "sourceMarkers": [
297
297
  {"file": "src/diagnostics-types.ts", "marker": "DIAGNOSTICS_MAX_BYTES = 2 * 1024 * 1024"},
298
298
  {"file": "src/diagnostics-collector.ts", "marker": "noteClientGaps"},
299
+ {"file": "src/request-diagnostics.ts", "marker": "REQUEST_DIAGNOSTICS_MAX_ROWS = 128"},
300
+ {"file": "src/request-body-composition.ts", "marker": "bytes: 32 * 1024 * 1024"},
301
+ {"file": "src/request-body-composition.ts", "marker": "concurrent: 4"},
302
+ {"file": "src/request-diagnostics.ts", "marker": "REQUEST_DIAGNOSTICS_RETENTION_MS = 24 * 60 * 60 * 1000"},
303
+ {"file": "src/config.ts", "marker": "requestDiagnosticsEnabled: z.boolean().default(false).hidden().volatile()"},
299
304
  {"file": "src/diagnostics-host.ts", "marker": "diagnosticsDomainForProfile"},
300
305
  {"file": "src/diagnostics-client.ts", "marker": "createClientDiagnosticsScope"},
301
306
  {"file": "src/remote.ts", "marker": "...diagnosticsRemote.descriptors"},
@@ -304,6 +309,11 @@
304
309
  ],
305
310
  "tests": [
306
311
  {"file": "tests/diagnostics-collector.spec.ts", "name": "is disabled until enabled, records success denominators and settles once"},
312
+ {"file": "tests/request-diagnostics.spec.ts", "name": "requires independent consent, captures status/timing and never infers upload or retry count"},
313
+ {"file": "tests/request-body-composition.spec.ts", "name": "partitions a 20.4 MiB request without parsing its payload object graph"},
314
+ {"file": "tests/preview-transport-failures.spec.ts", "name": "does not wait for large-request composition before native success and updates the exact settled row"},
315
+ {"file": "tests/request-diagnostics.spec.ts", "name": "updates only its own retained record after native settlement, never across clear/pause/eviction"},
316
+ {"file": "tests/preview-transport-failures.spec.ts", "name": "records verified 408 once without changing the native error, serialized input or dispatch count"},
307
317
  {"file": "tests/diagnostics-client.spec.ts", "name": "rejects stale status responses and settles an unmounted Checking operation once"},
308
318
  {"file": "tests/diagnostics-card.spec.ts", "name": "requires a confirmed durable enable and a separate destructive clear confirmation"},
309
319
  {"file": "tests/fixtures/diagnostics-storage-core.fixture.ts", "name": "isolates profiles on the home-wide backend and preserves memory on a real publish failure"},
@@ -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, compaction and Auto allocation
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).
@@ -45,17 +45,23 @@ not contain Session/turn identifiers, prompts, outcomes, execution or billing
45
45
  attribution. Aggregate rows are capped at 1,024, retained for 14 days and
46
46
  included in the existing 2 MiB snapshot limit; expired, dropped, truncated,
47
47
  saturated and restart evidence remains explicit. There is no per-turn export,
48
- automatic tuning or upload. The two controls can be paused independently;
49
- **Clear local aggregates** clears both diagnostics populations.
50
-
51
- **Read status** returns a strict aggregate snapshot; **Review aggregate-only JSON → Prepare current JSON**
48
+ automatic tuning or upload. The aggregate controls can be paused independently.
49
+ The separate **Enable request observations** control uses the hidden volatile
50
+ `github-copilot.requestDiagnosticsEnabled` leaf with path-level CAS and exact
51
+ readback. Existing aggregate consent never enables request observations.
52
+ **Clear local diagnostics** clears all three populations, including request
53
+ observations, without changing the three enabled/paused controls.
54
+
55
+ **Read status** returns a strict snapshot; **Review aggregate-only JSON → Prepare current JSON**
52
56
  prepares a read-only copy for explicit review/sharing, never a download or upload.
57
+ When retained request observations exist, the disclosure is instead named
58
+ **Review local diagnostics JSON** and includes that separately consented scope.
53
59
  The coding session does not automatically gain access to the running Host.
54
60
  Pause preserves retained evidence and closes active observations as interrupted.
55
61
  It remains available for a configured-on collector when storage is unavailable;
56
62
  enabling still requires ready storage.
57
63
  Clear requires a separate confirmation, advances an epoch and removes this
58
- domain's aggregates without changing the enabled setting, accounts or history.
64
+ domain's aggregates and request observations without changing the enabled settings, accounts or history.
59
65
  An uncertain write is not automatically replayed by the UI.
60
66
 
61
67
  ## Storage and limits
@@ -125,7 +131,8 @@ signal evidence; arbitrary native error text cannot establish cancellation.
125
131
 
126
132
  Stock/custom-engine physical summaries, recovery opt-out/native-only summary
127
133
  branches, OAuth Add/reauthorization/removal, quota, ordinary model refresh,
128
- managed chat/search/classifier transport and unwrapped RPCs remain uncovered.
134
+ canonical/custom transport and unwrapped RPCs remain uncovered. Managed native
135
+ adapter HTTP dispatches have only the separately enabled coverage below.
129
136
  Native checkpoint observation is not filesystem durability evidence. Reporting
130
137
  loss, crashes, disabled intervals and paging/coverage gaps must never be treated
131
138
  as zero failures. No automatic daily analysis, issue creation, account/model
@@ -142,6 +149,74 @@ factory in its own isolated realm, sharing the actual public Cordis identity.
142
149
  It does not substitute tagged source for published bytes or attach to a live
143
150
  Client module registry; factory qualification is not Desktop activation proof.
144
151
 
152
+ ## Content-free physical request observations (#392)
153
+
154
+ This independent, default-off pilot observes physical Fetch dispatches composed
155
+ by the plugin-managed native adapter. It does not intercept canonical routes,
156
+ change request bodies, timeout settings, retry decisions or native accounting.
157
+ It retains at most 128 completed observations and 128 live handles for 24 hours
158
+ within the same 2 MiB snapshot ceiling. Expiry, capacity drops and sampled
159
+ pending counts are explicit. Pause settles live observations as interrupted;
160
+ clear fences late completions. Saved pending counts become interrupted-on-reopen
161
+ counts, not fabricated request rows. Abrupt loss can still lose the unflushed
162
+ tail and requests that began since the last saved sample.
163
+
164
+ Rows contain plugin version, request time, bounded model/protocol metadata,
165
+ original JSON and dispatched wire byte counts, encoding, bounded composition
166
+ partitions, local header/elapsed timing, HTTP status and fixed terminal/reason
167
+ categories. Existing public native upload observations add ALPN, local body-write
168
+ timing and writable-buffer bytes only when available. Unsupported/ambiguous
169
+ transport evidence stays explicitly unavailable. Bodies up to 16 MiB retain the
170
+ existing synchronous span validator. Larger JSON bodies, including the reported
171
+ approximately 20.4 MiB class, use a cooperative span scanner up to 32 MiB without
172
+ building a payload object graph or decoding image/replay values. It yields every
173
+ 65,536 scanned characters, checks a two-second monotonic work deadline and caps
174
+ concurrent scans at four. Both paths retain 64-level depth, 65,536-value,
175
+ 131,072-token and 128-serialized-key-character limits. Size, work, time and
176
+ cancellation limits remain named unavailable states without partial totals.
177
+ These are diagnostic work limits, not provider request limits.
178
+
179
+ For opted-in observations, large-body counting starts after Fetch invocation
180
+ and does not delay ordinary native response/stream delivery. A retained row can
181
+ receive its numeric composition after terminal settlement; until then its
182
+ initial `size-limit` remains explicit. Refresh/read/export obtains the currently
183
+ available evidence, not a promise of completion. Pause/re-enable, clear,
184
+ teardown, retention and eviction fence late updates, and the counting work
185
+ retains its source string only for that bounded scan. Actual caller cancellation
186
+ can stop it. Verified-408 guidance may await that same bounded work; without
187
+ request consent only an exact verified failure starts the larger scan.
188
+ Replay validation/recovery keeps its original 16 MiB boundary unchanged.
189
+
190
+ Random stream UUIDs group only dispatches within one native SDK stream.
191
+ `dispatchIndex` is physical Fetch order, **not** Core's retry number or an
192
+ end-to-end Session/turn correlation. No account/Session/turn IDs or hashes,
193
+ URLs, headers, raw errors, prompts, tool parameters/results, attachment or replay
194
+ content, credentials or token accounting are retained. Review timestamps/model
195
+ metadata before explicit sharing; nothing is uploaded automatically.
196
+ Comparing JSON/wire sizes and partitions within a stream can reveal repeated
197
+ large payload sizes or growth, not duplicate contents, a Core retry count,
198
+ delivery to a proxy/supplier or the reason for a rejection. No request hashes
199
+ are collected and no automatic size-based mitigation is introduced.
200
+
201
+ An exact verified HTTP408 `user_request_timeout` is classified as
202
+ `request-body-timeout`; other provider/transport errors remain fixed unknown
203
+ categories. Real caller, branded plugin-owned and byte-idle abort signals retain
204
+ their strict attribution. Missing terminal/`terminated` text is not reinterpreted
205
+ as a signal abort. `stream-done` means native terminal observation, not execution,
206
+ billing or recovery success. Local body-write completion and zero writable buffer
207
+ do **not** prove TCP acknowledgement, proxy forwarding or supplier receipt.
208
+ These observations can distinguish a repeated large-body timeout from an
209
+ actual cancellation; they do not identify the remote fault owner or fix
210
+ HTTP408, EOF, retries or the native context meter.
211
+
212
+ The collapsed **Physical request observations** table exposes latest retained
213
+ timings/status/bytes. Detailed composition, transport evidence and random group
214
+ IDs remain in reviewed JSON. Capture failures log only the fixed
215
+ `COPILOT_REQUEST_DIAGNOSTICS_FAILED` code and never replace the native result.
216
+ Synthetic native-SDK tests exercise HTTP408, missing terminal, real abort,
217
+ concurrent stream isolation and unchanged request/error delivery without network
218
+ or live account use.
219
+
145
220
  ## Explicit offline analysis (#368)
146
221
 
147
222
  The package provides a separate, read-only analyzer for one explicitly selected
@@ -165,7 +240,11 @@ must identify the file and profile. The tool never searches DSH homes,
165
240
  enumerates storage units, opens a storage-domain writer or RPC, reads Settings,
166
241
  credentials or history, or falls back between modes.
167
242
 
168
- Both modes reuse the collector's strict Zod snapshot/view vocabulary. The
243
+ Both modes reuse the collector's strict Zod snapshot/view vocabulary. Request
244
+ observations are validated but deliberately not included in the account/compaction
245
+ aggregate report; `request-observations-not-analyzed` marks their omission.
246
+ Review the source JSON separately for transport investigation; absence of
247
+ aggregate candidates says nothing about request failures. The
169
248
  reader rejects symlinks and non-files, caps input at 8 MiB, opens only for
170
249
  reading, decodes fatal UTF-8, and checks file identity, size and modification
171
250
  metadata before and after reading. These checks bound and detect ordinary