dsh-github-copilot 0.4.2-alpha.4 → 0.4.2-alpha.6
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 +6 -1
- package/CHANGELOG.md +25 -0
- package/README.md +16 -7
- package/README.zh.md +15 -8
- package/deployment-baseline.json +9 -1
- package/docs/auto-iteration-review.json +12 -12
- package/docs/copilot-compaction.md +1 -1
- package/docs/plugin-diagnostics.md +34 -4
- package/lib/client.js +24 -6
- package/lib/client.js.map +1 -1
- package/lib/diagnostics-analysis.js +1 -1
- package/lib/{diagnostics-types-CpyhNCSg.js → diagnostics-types-BDIc78T4.js} +24 -4
- package/lib/index.js +309 -7
- package/lib/manual-compaction-recovery.js +1 -1
- package/lib/remote.js +17 -1
- package/lib/types/auto-allocation-diagnostics.d.ts +25 -1
- package/lib/types/diagnostics-collector.d.ts +1 -0
- package/lib/types/diagnostics-host.d.ts +4 -2
- package/lib/types/diagnostics-types.d.ts +54 -2
- package/lib/types/request-body-composition.d.ts +17 -0
- package/lib/types/request-body-evidence.d.ts +2 -1
- package/lib/types/request-diagnostics.d.ts +8 -2
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -54,6 +54,11 @@ usage, replace Core's meter, infer current occupancy/percentages or rewrite hist
|
|
|
54
54
|
See [quota boundaries](./docs/copilot-usage.md).
|
|
55
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
|
+
Auto aggregate assessment outcomes are fixed codes only; keep legacy missing reasons
|
|
58
|
+
unrecorded and separate from new cohorts. Count decisions by selected/no-fit counts,
|
|
59
|
+
not repeated candidate opportunities. Never change assessment policy, deadline or
|
|
60
|
+
context safety merely to populate diagnostics; retain the shared storage/row bounds.
|
|
61
|
+
|
|
57
62
|
## Session-policy compaction replay consent (#349, #352)
|
|
58
63
|
|
|
59
64
|
`/copilot-compact visible-history` explicitly authorizes one lossy managed Responses
|
|
@@ -128,7 +133,7 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
|
|
|
128
133
|
- `src/serialize.ts`, `src/sse.ts`, `src/failure.ts`: protocol conversion and bounded error handling.
|
|
129
134
|
- `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
135
|
- `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
|
|
136
|
+
- `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
137
|
- `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
138
|
- `tests/`: unit and integration evidence; mirror the source area being changed.
|
|
134
139
|
- `deployment-baseline.json`: declared machine-readable compatibility and capability evidence inventory.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2-alpha.6 (prepared)
|
|
4
|
+
|
|
5
|
+
- Retain fixed assessment outcomes in existing opted-in daily Auto allocation
|
|
6
|
+
aggregates and their diagnostic table: timeout, disabled, unavailable, invalid
|
|
7
|
+
result, failed, omitted context, and known/unknown local or semantic assessment.
|
|
8
|
+
- Preserve legacy missing reasons as unrecorded, keep outcome cohorts separate
|
|
9
|
+
through strict gateways and storage reopen, and distinguish task counts from
|
|
10
|
+
repeated candidate opportunities. No prompts, error bodies or Session IDs added.
|
|
11
|
+
- Leave classification, routing, eight-second assessment budget, conservative
|
|
12
|
+
context handling and collection consent unchanged. Historical unknown causes
|
|
13
|
+
remain unproven; review new outcome data before changing policy.
|
|
14
|
+
|
|
15
|
+
## 0.4.2-alpha.5 (prepared)
|
|
16
|
+
|
|
17
|
+
- Measure large request JSON composition up to 32 MiB with a cooperative,
|
|
18
|
+
bounded span scanner instead of a full payload object graph. Preserve
|
|
19
|
+
disjoint image/replay byte subsets, native original spans and explicit
|
|
20
|
+
cancellation/time/work limits; replay validation keeps its 16 MiB boundary.
|
|
21
|
+
- Start opted-in large-body counting after Fetch invocation without holding
|
|
22
|
+
up ordinary response/stream delivery. Fence late numeric updates to their
|
|
23
|
+
own retained row across pause/re-enable, clear, teardown and eviction.
|
|
24
|
+
- Reuse bounded composition work in exact verified-408 guidance. Preserve
|
|
25
|
+
native bytes, response/error, retries, Usage, timeout and default-off gzip;
|
|
26
|
+
composition evidence does not establish a proxy or supplier fault.
|
|
27
|
+
|
|
3
28
|
## 0.4.2-alpha.4 (prepared)
|
|
4
29
|
|
|
5
30
|
- Add independently opt-in, content-free managed-adapter physical request
|
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.
|
|
11
|
+
**Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.6`.** `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
|
|
|
@@ -49,6 +49,11 @@ for 24 hours, with model, JSON/wire byte counts, timings, HTTP status and termin
|
|
|
49
49
|
categories. No bodies, headers, credentials or Session/turn IDs are collected.
|
|
50
50
|
Local body-write completion does not prove supplier receipt; these diagnostics
|
|
51
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).
|
|
52
57
|
The package also has an explicit offline analyzer
|
|
53
58
|
for a caller-selected persisted unit or reviewed aggregate view; it writes only
|
|
54
59
|
to a new local report file and never scans, uploads or changes collection. Pause
|
|
@@ -58,7 +63,11 @@ Descriptive counts are not reconstructed history, failure rates or proof of an
|
|
|
58
63
|
improvement. The diagnostics page opens on a daily Auto allocation table by UTC
|
|
59
64
|
date, policy, model and cohort, with opportunities, expected selections, selected
|
|
60
65
|
counts and no-fit decisions. Compare expected and selected counts only within
|
|
61
|
-
matching cohorts.
|
|
66
|
+
matching cohorts. New cohorts distinguish assessment timeouts, unavailable/invalid
|
|
67
|
+
results, omitted context, disabled assessment and genuinely unknown local/semantic
|
|
68
|
+
results; legacy reasons remain **not recorded**. Count tasks with Selected plus
|
|
69
|
+
No-fit, not candidate opportunities. This is diagnostic coverage, not a routing
|
|
70
|
+
change or proof of the supplier root cause. Account/Checking and compaction reports, collection controls,
|
|
62
71
|
and detailed scope, limits and JSON are in collapsed disclosures; clearing still
|
|
63
72
|
requires separate confirmation.
|
|
64
73
|
|
|
@@ -111,10 +120,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
111
120
|
For a **standalone named profile**:
|
|
112
121
|
|
|
113
122
|
```sh
|
|
114
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
123
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.6/dsh-github-copilot-0.4.2-alpha.6.tgz
|
|
115
124
|
```
|
|
116
125
|
|
|
117
|
-
For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.
|
|
126
|
+
For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.6`; 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.
|
|
118
127
|
|
|
119
128
|
After an approved reload/restart:
|
|
120
129
|
|
|
@@ -290,14 +299,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
290
299
|
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.
|
|
291
300
|
|
|
292
301
|
```sh
|
|
293
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
294
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
302
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.6/dsh-github-copilot-0.4.2-alpha.6.tgz
|
|
303
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.6/SHA256SUMS
|
|
295
304
|
sha256sum --check SHA256SUMS
|
|
296
305
|
```
|
|
297
306
|
|
|
298
307
|
```powershell
|
|
299
308
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
300
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
309
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.6.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
301
310
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
302
311
|
```
|
|
303
312
|
|
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.
|
|
11
|
+
**稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布预览版:`0.4.2-alpha.6`。** `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
|
|
|
@@ -38,12 +38,19 @@ Session/turn ID、对话内容,也不推断执行/结果,不自动调参
|
|
|
38
38
|
**Enable request observations** 开关保留最多 128 条托管适配器的物理请求观测,保留 24 小时:
|
|
39
39
|
仅包含模型、JSON/传输字节数、耗时、HTTP 状态和终止分类,不记录正文、headers、
|
|
40
40
|
凭据或 Session/turn ID。本地写出完成不证明供应方收到了请求;诊断不会修复超时,
|
|
41
|
-
也不改变重试或 Usage
|
|
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
|
+
包内另提供显式离线分析器,
|
|
42
46
|
只处理调用者指定的持久化单元或经审阅的聚合视图,并且只新建本地报告文件;不会扫描、
|
|
43
47
|
上传或更改采集设置。暂停保留证据,清除需单独确认。Client/Host 分开统计,未覆盖路径、
|
|
44
48
|
报告丢失与存储故障明确显示。描述性计数不是历史重建、错误率,也不表示优化效果已被验证。诊断页默认显示按 UTC 日期、
|
|
45
49
|
策略、模型和 cohort 划分的 Auto 分配每日汇总表,包含候选机会、预期选择、实际选择及
|
|
46
|
-
no-fit 决策;只能在匹配 cohort
|
|
50
|
+
no-fit 决策;只能在匹配 cohort 内比较预期与实际选择。新 cohort 区分评估超时、不可用/无效
|
|
51
|
+
结果、上下文缺失、评估关闭及本地/语义判断确实未知;旧数据原因保持 **not recorded**,
|
|
52
|
+
不倒推。按 Selected 加 No-fit 计任务数,不按候选机会计数。这是诊断覆盖,不改变选模策略,
|
|
53
|
+
也不证明供应商根因。账号/Checking 和压缩报告、采集控制、
|
|
47
54
|
详细范围/限制/JSON 位于折叠区;清除仍需单独确认。
|
|
48
55
|
|
|
49
56
|
在已构建的包或源码 checkout 内,显式分析已核验的文件:
|
|
@@ -95,10 +102,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
95
102
|
**独立具名 profile**:
|
|
96
103
|
|
|
97
104
|
```sh
|
|
98
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
105
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.6/dsh-github-copilot-0.4.2-alpha.6.tgz
|
|
99
106
|
```
|
|
100
107
|
|
|
101
|
-
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.
|
|
108
|
+
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.6`;稳定版发布到 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 或删除配置。
|
|
102
109
|
|
|
103
110
|
经批准 reload/restart 后:
|
|
104
111
|
|
|
@@ -274,14 +281,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
274
281
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
275
282
|
|
|
276
283
|
```sh
|
|
277
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
278
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
284
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.6/dsh-github-copilot-0.4.2-alpha.6.tgz
|
|
285
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.6/SHA256SUMS
|
|
279
286
|
sha256sum --check SHA256SUMS
|
|
280
287
|
```
|
|
281
288
|
|
|
282
289
|
```powershell
|
|
283
290
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
284
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
291
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.6.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
285
292
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
286
293
|
```
|
|
287
294
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.4.2-alpha.
|
|
11
|
+
"version": "0.4.2-alpha.6"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -296,7 +296,10 @@
|
|
|
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/auto-allocation-diagnostics.ts", "marker": "assessmentOutcome: assessmentOutcome.optional()"},
|
|
299
300
|
{"file": "src/request-diagnostics.ts", "marker": "REQUEST_DIAGNOSTICS_MAX_ROWS = 128"},
|
|
301
|
+
{"file": "src/request-body-composition.ts", "marker": "bytes: 32 * 1024 * 1024"},
|
|
302
|
+
{"file": "src/request-body-composition.ts", "marker": "concurrent: 4"},
|
|
300
303
|
{"file": "src/request-diagnostics.ts", "marker": "REQUEST_DIAGNOSTICS_RETENTION_MS = 24 * 60 * 60 * 1000"},
|
|
301
304
|
{"file": "src/config.ts", "marker": "requestDiagnosticsEnabled: z.boolean().default(false).hidden().volatile()"},
|
|
302
305
|
{"file": "src/diagnostics-host.ts", "marker": "diagnosticsDomainForProfile"},
|
|
@@ -307,7 +310,12 @@
|
|
|
307
310
|
],
|
|
308
311
|
"tests": [
|
|
309
312
|
{"file": "tests/diagnostics-collector.spec.ts", "name": "is disabled until enabled, records success denominators and settles once"},
|
|
313
|
+
{"file": "tests/auto-allocation-diagnostics.spec.ts", "name": "separates assessment outcomes without changing model opportunities or exposing errors"},
|
|
314
|
+
{"file": "tests/auto-allocation-diagnostics.spec.ts", "name": "keeps legacy reasons unrecorded and captures no-fit and successful assessment outcomes"},
|
|
310
315
|
{"file": "tests/request-diagnostics.spec.ts", "name": "requires independent consent, captures status/timing and never infers upload or retry count"},
|
|
316
|
+
{"file": "tests/request-body-composition.spec.ts", "name": "partitions a 20.4 MiB request without parsing its payload object graph"},
|
|
317
|
+
{"file": "tests/preview-transport-failures.spec.ts", "name": "does not wait for large-request composition before native success and updates the exact settled row"},
|
|
318
|
+
{"file": "tests/request-diagnostics.spec.ts", "name": "updates only its own retained record after native settlement, never across clear/pause/eviction"},
|
|
311
319
|
{"file": "tests/preview-transport-failures.spec.ts", "name": "records verified 408 once without changing the native error, serialized input or dispatch count"},
|
|
312
320
|
{"file": "tests/diagnostics-client.spec.ts", "name": "rejects stale status responses and settles an unmounted Checking operation once"},
|
|
313
321
|
{"file": "tests/diagnostics-card.spec.ts", "name": "requires a confirmed durable enable and a separate destructive clear confirmation"},
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"feature": "autorouting",
|
|
4
|
-
"status": "
|
|
4
|
+
"status": "insufficient-sample",
|
|
5
5
|
"policyVersion": "high-cost-v1",
|
|
6
6
|
"observation": {
|
|
7
|
-
"start":
|
|
8
|
-
"end":
|
|
9
|
-
"sampleCount":
|
|
10
|
-
"limitations": "No
|
|
7
|
+
"start": "2026-10-08T00:00:00Z",
|
|
8
|
+
"end": "2026-10-09T23:59:59Z",
|
|
9
|
+
"sampleCount": 63,
|
|
10
|
+
"limitations": "Read-only strict profile-local aggregate review, daily UTC buckets rather than exact event times. Producer 0.4.2-alpha.2; not current loaded-version proof. No Session/turn IDs, sequence, lower-category pool fit or classifier diagnostic retained. completeHistory=false, restarts=1, dropped/expired/saturated=0 in this snapshot. Cannot recover failure causes, transition matrix, execution, quality, billing or savings; no raw export uploaded."
|
|
11
11
|
},
|
|
12
|
-
"previousReview": "
|
|
13
|
-
"findings": "
|
|
14
|
-
"decision": "
|
|
15
|
-
"validation": "
|
|
12
|
+
"previousReview": "Issues #332/#333 prior allocation review and post-delivery review #334; diagnostic-only follow-up #398.",
|
|
13
|
+
"findings": "63 decisions: 44 local/unknown, 4 semantic/unknown and 15 semantic/complex, all powerful target/selection. Sol selected 57 and Astra 6; 47 marked previous-model retention, not a transition matrix. Local/unknown may include disabled/unavailable/timeout/failed/invalid-result fallbacks. Semantic/unknown may include omitted-context conservatism. Persisted aggregates discarded those diagnostics, so historical causes cannot be established.",
|
|
14
|
+
"decision": "Retain classification, category routing, positive weights, continuity, eight-second deadline, context safety and existing consent. Add only fixed content-free assessment outcomes to daily candidate/no-fit strata and their existing table. Keep legacy absent reasons explicitly unrecorded. Do not force downgrades, increase the timeout or infer classifier/network failure from unknown demand.",
|
|
15
|
+
"validation": "Regression-first collector tests reproduced diagnostic cohort collapse and merging fresh rows with legacy unrecorded rows. 70 focused assessment/classifier/routing/collector/UI tests, source/test types and four public gateway/storage fixture tests including reopen passed. The complete 130-file low-concurrency suite passed 2724 tests with two expected skips; the default-concurrency full gate hit an existing 5000ms allocation stress-test timeout. No timeout or assertion weakened. Tooling/package and required Windows/Linux delivery gates are recorded separately in the implementation PR; this document does not claim live activation.",
|
|
16
16
|
"followUp": {
|
|
17
17
|
"owner": "Maintainer or Agent assigned to post-delivery review issue #334",
|
|
18
|
-
"trigger": "
|
|
19
|
-
"metric": "
|
|
20
|
-
"action": "
|
|
18
|
+
"trigger": "Review assessment outcomes after 200 new decisions with recorded reasons, or before the next assessment policy change. Retain the prior allocation trigger of 200 opportunities per model across 20 Sessions only if independently evidenced; aggregates cannot count Sessions.",
|
|
19
|
+
"metric": "Selected plus no-fit counts by fixed assessment outcome, producer version, source and demand; explicit unrecorded/truncated/dropped/expired/saturated/restart coverage. Keep candidate opportunities and actual versus expected selections separate from task counts.",
|
|
20
|
+
"action": "Use local sanitized aggregates to fix an evidenced dominant assessment failure or retain the conservative fallback; unknown or insufficient evidence defers tuning. No automatic upload, transition reconstruction, quality inference or credit inference. Track implementation in #398 and the open post-delivery review in #334."
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -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
|
|
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
|
|
|
@@ -46,6 +46,16 @@ 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
48
|
automatic tuning or upload. The aggregate controls can be paused independently.
|
|
49
|
+
New rows also distinguish fixed assessment outcomes: local-known/local-unknown,
|
|
50
|
+
semantic-known/semantic-unknown, disabled, unavailable, timeout, failed,
|
|
51
|
+
invalid-result and context-omitted. Missing legacy outcomes remain **not recorded**,
|
|
52
|
+
never reconstructed from demand/source. Count decisions using Selected plus
|
|
53
|
+
No-fit, not candidate opportunities (one decision may have many candidates).
|
|
54
|
+
These outcomes explain classifier settlement, not network root cause or model
|
|
55
|
+
execution; no error bodies, signals, prompts or Session/turn IDs are added.
|
|
56
|
+
Classification, its eight-second budget and conservative omitted-context guard
|
|
57
|
+
are unchanged. Older strict plugin versions may reject new snapshot fields on
|
|
58
|
+
rollback; do not delete or silently rewrite retained evidence to make them parse.
|
|
49
59
|
The separate **Enable request observations** control uses the hidden volatile
|
|
50
60
|
`github-copilot.requestDiagnosticsEnabled` leaf with path-level CAS and exact
|
|
51
61
|
readback. Existing aggregate consent never enables request observations.
|
|
@@ -166,10 +176,26 @@ original JSON and dispatched wire byte counts, encoding, bounded composition
|
|
|
166
176
|
partitions, local header/elapsed timing, HTTP status and fixed terminal/reason
|
|
167
177
|
categories. Existing public native upload observations add ALPN, local body-write
|
|
168
178
|
timing and writable-buffer bytes only when available. Unsupported/ambiguous
|
|
169
|
-
transport evidence stays explicitly unavailable.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
179
|
+
transport evidence stays explicitly unavailable. Bodies up to 16 MiB retain the
|
|
180
|
+
existing synchronous span validator. Larger JSON bodies, including the reported
|
|
181
|
+
approximately 20.4 MiB class, use a cooperative span scanner up to 32 MiB without
|
|
182
|
+
building a payload object graph or decoding image/replay values. It yields every
|
|
183
|
+
65,536 scanned characters, checks a two-second monotonic work deadline and caps
|
|
184
|
+
concurrent scans at four. Both paths retain 64-level depth, 65,536-value,
|
|
185
|
+
131,072-token and 128-serialized-key-character limits. Size, work, time and
|
|
186
|
+
cancellation limits remain named unavailable states without partial totals.
|
|
187
|
+
These are diagnostic work limits, not provider request limits.
|
|
188
|
+
|
|
189
|
+
For opted-in observations, large-body counting starts after Fetch invocation
|
|
190
|
+
and does not delay ordinary native response/stream delivery. A retained row can
|
|
191
|
+
receive its numeric composition after terminal settlement; until then its
|
|
192
|
+
initial `size-limit` remains explicit. Refresh/read/export obtains the currently
|
|
193
|
+
available evidence, not a promise of completion. Pause/re-enable, clear,
|
|
194
|
+
teardown, retention and eviction fence late updates, and the counting work
|
|
195
|
+
retains its source string only for that bounded scan. Actual caller cancellation
|
|
196
|
+
can stop it. Verified-408 guidance may await that same bounded work; without
|
|
197
|
+
request consent only an exact verified failure starts the larger scan.
|
|
198
|
+
Replay validation/recovery keeps its original 16 MiB boundary unchanged.
|
|
173
199
|
|
|
174
200
|
Random stream UUIDs group only dispatches within one native SDK stream.
|
|
175
201
|
`dispatchIndex` is physical Fetch order, **not** Core's retry number or an
|
|
@@ -177,6 +203,10 @@ end-to-end Session/turn correlation. No account/Session/turn IDs or hashes,
|
|
|
177
203
|
URLs, headers, raw errors, prompts, tool parameters/results, attachment or replay
|
|
178
204
|
content, credentials or token accounting are retained. Review timestamps/model
|
|
179
205
|
metadata before explicit sharing; nothing is uploaded automatically.
|
|
206
|
+
Comparing JSON/wire sizes and partitions within a stream can reveal repeated
|
|
207
|
+
large payload sizes or growth, not duplicate contents, a Core retry count,
|
|
208
|
+
delivery to a proxy/supplier or the reason for a rejection. No request hashes
|
|
209
|
+
are collected and no automatic size-based mitigation is introduced.
|
|
180
210
|
|
|
181
211
|
An exact verified HTTP408 `user_request_timeout` is classified as
|
|
182
212
|
`request-body-timeout`; other provider/transport errors remain fixed unknown
|
package/lib/client.js
CHANGED
|
@@ -6526,6 +6526,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6526
6526
|
const dayMs = 864e5;
|
|
6527
6527
|
const integer$2 = number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
6528
6528
|
const version$2 = string().max(64).regex(/^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?$/);
|
|
6529
|
+
const assessmentOutcome = _enum([
|
|
6530
|
+
"local-known",
|
|
6531
|
+
"local-unknown",
|
|
6532
|
+
"semantic-known",
|
|
6533
|
+
"semantic-unknown",
|
|
6534
|
+
"disabled",
|
|
6535
|
+
"unavailable",
|
|
6536
|
+
"invalid-result",
|
|
6537
|
+
"timeout",
|
|
6538
|
+
"failed",
|
|
6539
|
+
"context-omitted"
|
|
6540
|
+
]);
|
|
6529
6541
|
const allocationRow = object({
|
|
6530
6542
|
day: integer$2.multipleOf(dayMs),
|
|
6531
6543
|
version: version$2,
|
|
@@ -6549,6 +6561,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6549
6561
|
"unknown"
|
|
6550
6562
|
]),
|
|
6551
6563
|
assessmentSource: _enum(["local", "semantic"]),
|
|
6564
|
+
assessmentOutcome: assessmentOutcome.optional(),
|
|
6552
6565
|
method: _enum(["weighted-distribution", "only-candidate"]),
|
|
6553
6566
|
fallback: boolean(),
|
|
6554
6567
|
highCost: boolean(),
|
|
@@ -6580,6 +6593,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6580
6593
|
"unknown"
|
|
6581
6594
|
]),
|
|
6582
6595
|
assessmentSource: _enum(["local", "semantic"]),
|
|
6596
|
+
assessmentOutcome: assessmentOutcome.optional(),
|
|
6583
6597
|
decisions: integer$2.min(1)
|
|
6584
6598
|
}).strict();
|
|
6585
6599
|
const AutoAllocationDiagnosticsSchema = object({
|
|
@@ -6614,7 +6628,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6614
6628
|
"size-limit",
|
|
6615
6629
|
"work-limit",
|
|
6616
6630
|
"invalid-json",
|
|
6617
|
-
"unsupported-shape"
|
|
6631
|
+
"unsupported-shape",
|
|
6632
|
+
"cancelled",
|
|
6633
|
+
"time-limit"
|
|
6618
6634
|
]),
|
|
6619
6635
|
totalBytes: integer$1.optional()
|
|
6620
6636
|
}).strict()]);
|
|
@@ -7174,7 +7190,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7174
7190
|
};
|
|
7175
7191
|
//#endregion
|
|
7176
7192
|
//#region package.json
|
|
7177
|
-
var version = "0.4.2-alpha.
|
|
7193
|
+
var version = "0.4.2-alpha.6";
|
|
7178
7194
|
//#endregion
|
|
7179
7195
|
//#region lib/types/diagnostics-client.js
|
|
7180
7196
|
let owner;
|
|
@@ -7420,6 +7436,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7420
7436
|
row.category,
|
|
7421
7437
|
row.demand,
|
|
7422
7438
|
row.assessmentSource,
|
|
7439
|
+
row.assessmentOutcome,
|
|
7423
7440
|
row.method,
|
|
7424
7441
|
row.fallback,
|
|
7425
7442
|
row.highCost,
|
|
@@ -7428,7 +7445,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7428
7445
|
day: row.day,
|
|
7429
7446
|
policy: row.policyVersion,
|
|
7430
7447
|
model: row.modelId,
|
|
7431
|
-
cohort: `${row.targetCategory} → ${row.category} · ${row.demand} · ${row.assessmentSource} · ${row.method}` + (row.fallback ? " · fallback" : "") + (row.highCost ? " · high-cost" : "") + (row.previous ? " · continuity" : ""),
|
|
7448
|
+
cohort: `${row.targetCategory} → ${row.category} · ${row.demand} · ${row.assessmentSource} · assessment: ${row.assessmentOutcome ?? "not recorded"} · ${row.method}` + (row.fallback ? " · fallback" : "") + (row.highCost ? " · high-cost" : "") + (row.previous ? " · continuity" : ""),
|
|
7432
7449
|
opportunities: row.opportunities,
|
|
7433
7450
|
expected: row.expectedSelections,
|
|
7434
7451
|
selected: row.selections,
|
|
@@ -7441,12 +7458,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7441
7458
|
row.targetCategory,
|
|
7442
7459
|
row.category,
|
|
7443
7460
|
row.demand,
|
|
7444
|
-
row.assessmentSource
|
|
7461
|
+
row.assessmentSource,
|
|
7462
|
+
row.assessmentOutcome
|
|
7445
7463
|
]),
|
|
7446
7464
|
day: row.day,
|
|
7447
7465
|
policy: row.policyVersion,
|
|
7448
7466
|
model: "—",
|
|
7449
|
-
cohort: `${row.targetCategory} → ${row.category} · ${row.demand} · ${row.assessmentSource} · no fit`,
|
|
7467
|
+
cohort: `${row.targetCategory} → ${row.category} · ${row.demand} · ${row.assessmentSource} · assessment: ${row.assessmentOutcome ?? "not recorded"} · no fit`,
|
|
7450
7468
|
opportunities: null,
|
|
7451
7469
|
expected: null,
|
|
7452
7470
|
selected: null,
|
|
@@ -7528,7 +7546,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7528
7546
|
} }, row.noFit ?? "—")))))) : null, auto?.status === "observed" && autoRows.length === 0 ? (0, react.createElement)("p", { style: { margin: 0 } }, "No retained strata in this snapshot; this does not mean there were no decisions.") : !auto ? (0, react.createElement)("p", { style: { margin: 0 } }, "Auto allocation aggregates are unavailable in this snapshot.") : view && auto.status !== "observed" && view.state !== "ready" ? (0, react.createElement)("p", { style: { margin: 0 } }, "Storage is not ready; retained Auto observation status is unknown.") : view && auto.status !== "observed" ? (0, react.createElement)("p", { style: { margin: 0 } }, "No retained observations yet.") : null, autoRows.length ? (0, react.createElement)("p", { style: {
|
|
7529
7547
|
...nativeCaptionStyle,
|
|
7530
7548
|
margin: 0
|
|
7531
|
-
} }, `${autoOpportunities} candidate opportunities · ${autoExpected.toFixed(3)} expected selections · ${autoSelections} actual selections · ${autoNoFit} no-fit decisions. Compare expected and selected counts only within matching cohorts; these are not execution, quality or billing evidence.`) : null), view ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Physical request observations"), (0, react.createElement)("p", { style: { margin: 0 } }, requests ? `${requests.rows.length} retained requests · ${requests.pending ?? 0} sampled pending · ${requests.dropped} dropped · ${requests.evicted} expired/evicted · ${requests.interruptedOnReopen ?? 0} interrupted on reopen` : "No retained request observations. This does not establish zero failures or enabled collection."), (0, react.createElement)("p", { style: {
|
|
7549
|
+
} }, `${autoOpportunities} candidate opportunities · ${autoExpected.toFixed(3)} expected selections · ${autoSelections} actual selections · ${autoNoFit} no-fit decisions. Compare expected and selected counts only within matching cohorts; these are not execution, quality or billing evidence. Assessment outcomes explain classification only, not the supplier root cause. Legacy reasons are not recorded; sum Selected or No-fit, not candidate opportunities, when counting decisions by outcome.`) : null), view ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Physical request observations"), (0, react.createElement)("p", { style: { margin: 0 } }, requests ? `${requests.rows.length} retained requests · ${requests.pending ?? 0} sampled pending · ${requests.dropped} dropped · ${requests.evicted} expired/evicted · ${requests.interruptedOnReopen ?? 0} interrupted on reopen` : "No retained request observations. This does not establish zero failures or enabled collection."), (0, react.createElement)("p", { style: {
|
|
7532
7550
|
...nativeCaptionStyle,
|
|
7533
7551
|
margin: 0
|
|
7534
7552
|
} }, "Managed native adapter dispatches only. Local body-write completion is not supplier receipt. Stream-done is a native terminal observation, not tool execution or billing success. No Core retry count or Session/turn attribution is inferred."), requests?.rows.length ? (0, react.createElement)("div", { style: {
|