dsh-github-copilot 0.1.0-alpha.1.dsh.0.2.1.alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/AGENTS.md +439 -0
  2. package/CHANGELOG.md +875 -0
  3. package/CONTRIBUTING.md +55 -0
  4. package/LICENSE +21 -0
  5. package/README.md +366 -0
  6. package/README.zh.md +341 -0
  7. package/SECURITY.md +29 -0
  8. package/cordis.patch.yml +16 -0
  9. package/deployment-baseline.json +1580 -0
  10. package/docs/account-management-experience.md +143 -0
  11. package/docs/agent-readiness.md +110 -0
  12. package/docs/auto-high-cost.md +255 -0
  13. package/docs/auto-iteration-review.json +22 -0
  14. package/docs/auto-review-sampling.md +60 -0
  15. package/docs/auto-task-routing.md +341 -0
  16. package/docs/automatic-model-routing.md +236 -0
  17. package/docs/copilot-accounts.md +424 -0
  18. package/docs/copilot-compaction.md +148 -0
  19. package/docs/copilot-usage.md +133 -0
  20. package/docs/dual-model.md +66 -0
  21. package/docs/evidence-driven-iteration.md +86 -0
  22. package/docs/image-input-compatibility.md +64 -0
  23. package/docs/images/copilot-accounts-credits.png +0 -0
  24. package/docs/images/copilot-accounts.png +0 -0
  25. package/docs/images/copilot-current-provenance.json +39 -0
  26. package/docs/images/copilot-model-preferences.png +0 -0
  27. package/docs/images/copilot-search-routing.png +0 -0
  28. package/docs/images/copilot-session-continuation.png +0 -0
  29. package/docs/images/dual-model-desktop.png +0 -0
  30. package/docs/images/dual-model-mobile.png +0 -0
  31. package/docs/images/dual-model-provenance.json +35 -0
  32. package/docs/images/parent-model-follow.png +0 -0
  33. package/docs/manual-compaction-recovery.md +109 -0
  34. package/docs/mockups/copilot-account-dropdown.html +71 -0
  35. package/docs/mockups/copilot-account-management.html +393 -0
  36. package/docs/model-compatibility-acceptance.md +182 -0
  37. package/docs/npm-distribution.md +202 -0
  38. package/docs/official-first-016-alpha2.md +66 -0
  39. package/docs/official-first-020-rc1.md +32 -0
  40. package/docs/official-first-020-rc2.md +17 -0
  41. package/docs/official-first-021-alpha4.md +157 -0
  42. package/docs/official-first-021-alpha5.md +83 -0
  43. package/docs/plugin-diagnostics.md +605 -0
  44. package/docs/session-continuation.md +141 -0
  45. package/docs/session-search-routing.md +133 -0
  46. package/docs/single-route-migration.md +131 -0
  47. package/docs/web-lifecycle-rc2.md +55 -0
  48. package/lib/client.js +13236 -0
  49. package/lib/client.js.map +1 -0
  50. package/lib/copilot-identity-DRZY_d2X.js +15 -0
  51. package/lib/diagnostics-analysis-io.js +78 -0
  52. package/lib/diagnostics-analysis.js +427 -0
  53. package/lib/diagnostics-types-CF-qg8Do.js +708 -0
  54. package/lib/index.js +15661 -0
  55. package/lib/manual-compaction-recovery.js +485 -0
  56. package/lib/remote.js +1507 -0
  57. package/lib/request-budget-DLY_aRq0.js +87 -0
  58. package/lib/routed-web.js +120 -0
  59. package/lib/search-routing-CV2hs8as.js +792 -0
  60. package/lib/types/account-dropdown.d.ts +22 -0
  61. package/lib/types/account-model-auth.d.ts +15 -0
  62. package/lib/types/account-model-catalog.d.ts +70 -0
  63. package/lib/types/account-model-source.d.ts +85 -0
  64. package/lib/types/agent-compaction.d.ts +4 -0
  65. package/lib/types/authorization-code-clipboard.d.ts +4 -0
  66. package/lib/types/authorization-controller.d.ts +121 -0
  67. package/lib/types/auto-allocation-card.d.ts +9 -0
  68. package/lib/types/auto-allocation-diagnostics.d.ts +126 -0
  69. package/lib/types/auto-allocation-evidence.d.ts +44 -0
  70. package/lib/types/auto-allocation.d.ts +47 -0
  71. package/lib/types/auto-assessment-evidence.d.ts +111 -0
  72. package/lib/types/auto-model-host.d.ts +30 -0
  73. package/lib/types/auto-model-intent.d.ts +36 -0
  74. package/lib/types/auto-model-presentation.d.ts +57 -0
  75. package/lib/types/auto-model-routing.d.ts +64 -0
  76. package/lib/types/auto-review-sampling.d.ts +6 -0
  77. package/lib/types/auto-selection-explanation.d.ts +9 -0
  78. package/lib/types/auto-task-assessment.d.ts +49 -0
  79. package/lib/types/auto-task-classifier.d.ts +10 -0
  80. package/lib/types/background-compaction.d.ts +30 -0
  81. package/lib/types/client.d.ts +129 -0
  82. package/lib/types/compact-account.d.ts +42 -0
  83. package/lib/types/compaction-continuation-ui.d.ts +29 -0
  84. package/lib/types/compaction-continuation.d.ts +48 -0
  85. package/lib/types/compaction-input-estimate.d.ts +28 -0
  86. package/lib/types/compaction-pressure.d.ts +23 -0
  87. package/lib/types/compaction-replay.d.ts +18 -0
  88. package/lib/types/compatibility.d.ts +17 -0
  89. package/lib/types/composer-notice-style.d.ts +7 -0
  90. package/lib/types/config.d.ts +141 -0
  91. package/lib/types/content-file.d.ts +10 -0
  92. package/lib/types/context-evidence-ui.d.ts +28 -0
  93. package/lib/types/context-evidence.d.ts +256 -0
  94. package/lib/types/context-usage.d.ts +4 -0
  95. package/lib/types/copilot-account-presentation.d.ts +7 -0
  96. package/lib/types/copilot-accounts-card.d.ts +43 -0
  97. package/lib/types/copilot-accounts-host.d.ts +93 -0
  98. package/lib/types/copilot-accounts-remote.d.ts +85 -0
  99. package/lib/types/copilot-accounts-types.d.ts +43 -0
  100. package/lib/types/copilot-auth.d.ts +31 -0
  101. package/lib/types/copilot-grant.d.ts +11 -0
  102. package/lib/types/copilot-identity.d.ts +11 -0
  103. package/lib/types/copilot-request.d.ts +11 -0
  104. package/lib/types/copilot-stream-liveness.d.ts +23 -0
  105. package/lib/types/copilot-usage-card.d.ts +51 -0
  106. package/lib/types/copilot-usage-host.d.ts +61 -0
  107. package/lib/types/copilot-usage-normalize.d.ts +9 -0
  108. package/lib/types/copilot-usage-remote.d.ts +63 -0
  109. package/lib/types/copilot-usage-types.d.ts +20 -0
  110. package/lib/types/copilot-usage-ui.d.ts +4 -0
  111. package/lib/types/current-provider.d.ts +59 -0
  112. package/lib/types/deepseek-search-fallback.d.ts +11 -0
  113. package/lib/types/diagnostics-analysis-io.d.ts +23 -0
  114. package/lib/types/diagnostics-analysis.d.ts +298 -0
  115. package/lib/types/diagnostics-card.d.ts +12 -0
  116. package/lib/types/diagnostics-client.d.ts +13 -0
  117. package/lib/types/diagnostics-collector.d.ts +50 -0
  118. package/lib/types/diagnostics-host.d.ts +183 -0
  119. package/lib/types/diagnostics-remote.d.ts +113 -0
  120. package/lib/types/diagnostics-types.d.ts +893 -0
  121. package/lib/types/dual-model-host.d.ts +119 -0
  122. package/lib/types/dual-model-remote.d.ts +63 -0
  123. package/lib/types/dual-model-types.d.ts +34 -0
  124. package/lib/types/external-link.d.ts +3 -0
  125. package/lib/types/failure.d.ts +38 -0
  126. package/lib/types/http.d.ts +48 -0
  127. package/lib/types/image-input-admission.d.ts +5 -0
  128. package/lib/types/index.d.ts +39 -0
  129. package/lib/types/manual-compaction-recovery.d.ts +67 -0
  130. package/lib/types/migration-status.d.ts +50 -0
  131. package/lib/types/model-exclusions.d.ts +15 -0
  132. package/lib/types/model-preferences-card.d.ts +9 -0
  133. package/lib/types/model-protocol.d.ts +31 -0
  134. package/lib/types/native-select-style.d.ts +4 -0
  135. package/lib/types/native-settings-style.d.ts +10 -0
  136. package/lib/types/parent-model-follow-card.d.ts +32 -0
  137. package/lib/types/parent-model-follow.d.ts +44 -0
  138. package/lib/types/pi-provider-bridge.d.ts +22 -0
  139. package/lib/types/plan.d.ts +148 -0
  140. package/lib/types/pre-step-pressure.d.ts +8 -0
  141. package/lib/types/preview-provider.d.ts +77 -0
  142. package/lib/types/preview-route.d.ts +76 -0
  143. package/lib/types/probe.d.ts +39 -0
  144. package/lib/types/remote-codec.d.ts +10 -0
  145. package/lib/types/remote.d.ts +202 -0
  146. package/lib/types/replay-recovery-host.d.ts +28 -0
  147. package/lib/types/replay-recovery-remote.d.ts +14 -0
  148. package/lib/types/replay-recovery-types.d.ts +24 -0
  149. package/lib/types/replay-recovery-ui.d.ts +28 -0
  150. package/lib/types/replay-recovery.d.ts +17 -0
  151. package/lib/types/request-body-composition.d.ts +17 -0
  152. package/lib/types/request-body-evidence.d.ts +37 -0
  153. package/lib/types/request-body-timeout-marker.d.ts +2 -0
  154. package/lib/types/request-body-timeout.d.ts +4 -0
  155. package/lib/types/request-budget.d.ts +58 -0
  156. package/lib/types/request-diagnostics.d.ts +278 -0
  157. package/lib/types/request-upload-evidence.d.ts +23 -0
  158. package/lib/types/response-error-body.d.ts +3 -0
  159. package/lib/types/responses-reasoning-text.d.ts +24 -0
  160. package/lib/types/responses-reasoning.d.ts +7 -0
  161. package/lib/types/responses-replay-compat.d.ts +31 -0
  162. package/lib/types/responses-request-compression.d.ts +33 -0
  163. package/lib/types/route-ownership.d.ts +70 -0
  164. package/lib/types/routed-web.d.ts +50 -0
  165. package/lib/types/search-backend.d.ts +16 -0
  166. package/lib/types/search-routing-host.d.ts +19 -0
  167. package/lib/types/search-routing-policy.d.ts +18 -0
  168. package/lib/types/search-routing-remote.d.ts +20 -0
  169. package/lib/types/search-routing.d.ts +43 -0
  170. package/lib/types/search-tool-routing.d.ts +22 -0
  171. package/lib/types/serialize.d.ts +106 -0
  172. package/lib/types/session-accounts-controller.d.ts +20 -0
  173. package/lib/types/session-accounts-host.d.ts +33 -0
  174. package/lib/types/session-accounts-remote.d.ts +114 -0
  175. package/lib/types/session-accounts.d.ts +38 -0
  176. package/lib/types/session-continuation-host.d.ts +45 -0
  177. package/lib/types/session-continuation-remote.d.ts +22 -0
  178. package/lib/types/session-continuation-types.d.ts +62 -0
  179. package/lib/types/session-continuation-ui.d.ts +49 -0
  180. package/lib/types/session-continuation.d.ts +14 -0
  181. package/lib/types/settings-reader.d.ts +16 -0
  182. package/lib/types/sse.d.ts +28 -0
  183. package/lib/types/temporary-models.d.ts +25 -0
  184. package/lib/types/tool-schema-compat.d.ts +17 -0
  185. package/lib/types/traditional-search.d.ts +17 -0
  186. package/lib/types/turn-model-provenance.d.ts +45 -0
  187. package/lib/types/turn-request-models.d.ts +55 -0
  188. package/lib/types/turn-selection-card.d.ts +24 -0
  189. package/lib/types/turn-selection-host.d.ts +35 -0
  190. package/lib/types/turn-selection-remote.d.ts +17 -0
  191. package/lib/types/turn-selection.d.ts +186 -0
  192. package/lib/types/turn-usage-evidence.d.ts +66 -0
  193. package/lib/types/turn-usage-notice.d.ts +7 -0
  194. package/lib/types/types.d.ts +69 -0
  195. package/lib/types/usage.d.ts +26 -0
  196. package/lib/types/watchdog.d.ts +22 -0
  197. package/lib/types/web-delegate.d.ts +12 -0
  198. package/lib/types/web-search-routing-card.d.ts +16 -0
  199. package/lib/types/web-search-routing-config.d.ts +12 -0
  200. package/lib/types/wire-anthropic.d.ts +37 -0
  201. package/lib/types/wire.d.ts +56 -0
  202. package/lib/web-delegate.js +9 -0
  203. package/output/auto-model-mockup/index.html +207 -0
  204. package/package.json +261 -0
  205. package/scripts/analyze-diagnostics.mjs +91 -0
  206. package/scripts/check-search-composition.mjs +191 -0
  207. package/scripts/iteration-review.mjs +53 -0
  208. package/scripts/release-policy.mjs +353 -0
  209. package/scripts/select-core-release.mjs +11 -0
@@ -0,0 +1,143 @@
1
+ # Copilot account management and continuation experience
2
+
3
+ Approved account switching reference: [dropdown mock](./mockups/copilot-account-dropdown.html).
4
+ The [Chat account selection mock](./mockups/copilot-chat-account-selection.html)
5
+ supersedes its Chat menu: only configured accounts appear in the list, with
6
+ following controlled separately.
7
+ The [complete continuation mock](./mockups/copilot-account-management.html) retains
8
+ the earlier search-form presentation as historical context; the dropdown replaces it.
9
+ Open the HTML locally; append `?scenario=off-switch` to start with continuation
10
+ disabled and an account switch awaiting confirmation. All accounts, quota,
11
+ authorization, messages and model availability in this mock are synthetic.
12
+ It performs no network requests and persists no credentials or settings.
13
+
14
+ ## Chat: quick selection, not a second settings page
15
+
16
+ The Credits control opens a compact current-account summary and Switch button.
17
+ Do not render all saved accounts until Switch is opened. A compact anchored dropdown
18
+ marks the effective current account and supports bounded internal scrolling.
19
+ List every configured account, not a hard-coded two-account limit. A separate
20
+ **Follow global default** checkbox clears the Session override when enabled;
21
+ disabling it freezes the currently effective account. Choosing any account,
22
+ including today's default, disables following and creates an explicit override.
23
+ Both paths use the same continuation confirmation, revision readback and CAS,
24
+ and remain disabled while selection is unknown, confirming or saving. Cancelled
25
+ confirmation retains the confirmed checkbox state; failed writes show uncertainty.
26
+ Add accounts only in Models, never in the Chat dropdown. Do not add an account search field or repeat Switch
27
+ buttons per row. Escape closes only the dropdown and restores its trigger; arrows,
28
+ Home and End navigate enabled options. Outside interaction dismisses the list.
29
+ Adding an account in Models does not select it. Quota is account billing-cycle data, not
30
+ context occupancy or Session cost; missing and pooled data retain their semantics.
31
+
32
+ Selection applies to subsequent turns of the viewed Session. An active turn
33
+ keeps its admitted account and policy. Save failures retain their real uncertainty
34
+ and never imply that a change succeeded. Session explicit choices do not change
35
+ other Sessions or the global default.
36
+
37
+ The composer Credits/usage pill opens a popover that includes a collapsible
38
+ **Visible-history continuation** disclosure only while the viewed Session is
39
+ open and its effective selection is the managed account-discovered Copilot
40
+ route. Expand it and choose **On** under **Session policy** to explicitly enable
41
+ an existing Session; the loss disclosure appears before the choice. The
42
+ canonical/native route does not show this control. Saving sets a persistent
43
+ Session policy, not the new-Session default: it applies to subsequent turns and
44
+ managed native compaction in that Session, including when the account does not
45
+ change. The active turn retains its admitted policy. No message is sent or
46
+ retried by enabling it.
47
+ See the [synthetic composer capture](./images/copilot-session-continuation.png);
48
+ it shows the control's appearance, not a live Session or policy read.
49
+
50
+ The separate **New Session continuation default** is managed in Models under
51
+ GitHub Copilot → Manage. Full account management belongs in Models; show a
52
+ "Manage accounts and models" entry only with a working public navigation
53
+ callback. Do not show a disabled link or unavailable-navigation paragraph.
54
+ Opening and closing Settings must not discard the composer draft or change the
55
+ selected Session. Direct navigation and automatic expansion depend on published
56
+ navigation APIs; absent support leaves navigation to ordinary Settings, never
57
+ parent DOM manipulation or a nonfunctional entry.
58
+
59
+ ## Models: one Manage disclosure, two responsibilities
60
+
61
+ The existing native Settings layout and provider controls remain. The collapsed
62
+ Copilot contribution shows current default identity, model status, cache age and
63
+ one Manage button. Manage expands:
64
+
65
+ - Account management: current default account, Switch dropdown/add, identity
66
+ refresh, reauthorization, guarded removal, and new-Session continuation default.
67
+ - Model preferences: cross-account shared exclusions, model search and filters,
68
+ account-specific availability, discovery diagnostics and model refresh.
69
+
70
+ Removal requires explicit confirmation. It removes only locally saved account
71
+ authorization, not GitHub-side access, conversations or shared model preferences.
72
+ Preserve existing canonical/default/in-use removal guards; do not silently choose
73
+ another account.
74
+
75
+ Keep saved-account reauthorization/removal in a separate collapsed management
76
+ disclosure, not in the switching menu. The dropdown remains an account choice,
77
+ not another settings page. Global switching retains its explicit confirmation;
78
+ Chat retains the continuation confirmation when the current policy is off.
79
+
80
+ Model preferences are shared by exact model ID. Availability and capability
81
+ evidence remain account-specific. Missing models retain saved preferences;
82
+ returning models reuse them without becoming selected. Newly discovered models
83
+ are enabled unless excluded, but must satisfy authenticated metadata and admission
84
+ checks. Unknown/stale availability is not verified availability or definitive
85
+ absence. Do not discover every account solely to render a union catalog.
86
+ Fixed unavailable selections require explicit user correction; Auto uses only
87
+ eligible unexcluded models of the admitted account.
88
+
89
+ ## Continuation and explicit-off recovery
90
+
91
+ The approved default is lossy visible-history continuation enabled for new
92
+ Sessions, with the loss disclosed beside the control. Existing Sessions and
93
+ seeded/forked histories must not silently inherit a new loss authorization.
94
+ Global changes do not retroactively rewrite a Session's captured initial policy.
95
+ Session overrides, including explicit off, persist and are reversible.
96
+
97
+ Every new admitted turn omits pre-existing encrypted reasoning items and their
98
+ embedded summaries, including on the same account. Visible messages, tool
99
+ calls/results and stored history remain unchanged. Current-turn reasoning stays
100
+ available for tool steps and native retries. This does not solve quota, HTTP 408
101
+ or oversized context and does not guarantee supplier acceptance.
102
+
103
+ This is a persistent Session policy, not only a one-time summary consent. Its
104
+ enabled state is captured at new-turn admission and also governs summaries
105
+ inside an observed managed native compaction bracket. Explicit visible-history
106
+ consent does not send or retry chat; the user must separately invoke native
107
+ Retry when appropriate.
108
+
109
+ When continuation is off and the user switches accounts, stop before saving the
110
+ selection and disclose the potential replay risk. Offer persistent enable and
111
+ switch, keep off and switch, or cancel. Do not offer next-turn-only authorization.
112
+ Account differences alone do not prove supplier rejection. Never guess encrypted
113
+ item origin or silently filter history.
114
+
115
+ After an exact supplier replay rejection, retain the native failed turn and
116
+ surface the same persistent Session policy: when off, disclose loss and offer
117
+ Enable/Cancel; when on, show diagnostic guidance without repeated authorization.
118
+ Do not show duration radios or unavailable Models navigation. Failure-evidence
119
+ expiry does not disable the persistent policy. Authorization never sends or retries. The user explicitly retries
120
+ the task through the native mechanism. Mock assistant answers are demonstrations,
121
+ not evidence of real cross-account success. Do not fabricate durable messages,
122
+ errors, replay or assistant content to imitate the mock.
123
+
124
+ ## Theme and accessibility
125
+
126
+ Use native theme tokens for surfaces, text, borders, focus and errors. Native
127
+ select popup options must remain readable in dark and light themes; do not inherit
128
+ light popup backgrounds with dark-theme white text. Dropdowns and long account lists
129
+ must remain keyboard-operable, bounded and usable on narrow viewports. Explicit
130
+ loading, unknown, stale, failed-save and cancellation states are required.
131
+
132
+ The shared Models/Chat account dropdown must composite translucent native menu
133
+ tokens over an opaque system Canvas, so underlying settings and quota text never
134
+ bleed through. Dropdown and Credits panel elevation uses a dark shadow, not
135
+ CanvasText (which becomes a white glow in dark mode). Theme acceptance must
136
+ include translucent tokens, both themes/surfaces and narrow viewports; fixtures
137
+ that replace the token with opaque Canvas alone cannot establish this behavior.
138
+
139
+ ## Implementation status
140
+
141
+ This document records the approved target, not a release or runtime attestation.
142
+ Implementation, native gateway/settings persistence, request admission,
143
+ dark/light interaction checks and required CI must qualify it before delivery.
@@ -0,0 +1,110 @@
1
+ # Agent readiness audit
2
+
3
+ > **Historical audit:** dated follow-ups preserve plans and validation blockers
4
+ > at the time, not current setup requirements or release status. Start with
5
+ > [AGENTS.md](../AGENTS.md), current README and the
6
+ > [rc.2 review](./official-first-020-rc2.md).
7
+
8
+ Tracking: [#73](https://github.com/cloga/dsh-github-copilot/issues/73). Audited baseline: `d9d0954` (2026-09-05). This is an evidence inventory, not a blanket certification of live Copilot behavior.
9
+
10
+ ## Scope and method
11
+
12
+ Read the instruction entrypoints, source ownership boundaries, test/TypeScript configuration, tooling, packaging, CI/release workflows and public Remote contracts. Two independent native DSH reviewers examined verification/release and runtime/diagnostics. All reproduction uses synthetic fixtures. No production credential inspection, sign-in, sign-out, model/search calls, profile installation or DSH restart is part of this audit.
13
+
14
+ The existing project already has useful architecture boundaries, strict Remote codecs, exact Core pins, credential normalization, broad unit tests, bilingual docs and an immutable-release policy. The gaps were mostly between what an agent could observe and what it was allowed to claim.
15
+
16
+ ## Improvements with executable evidence
17
+
18
+ | Area | Audit evidence at baseline | Change / acceptance check |
19
+ |---|---|---|
20
+ | Onboarding/discovery | Commands scattered across prose; no structured task-to-files map | `agent-contract.json`, `scripts/agent.mjs describe/plan`, `verify:agent` check real paths and scripts |
21
+ | Safe preflight | `status()` and `inspectGitHubCopilotProviderProfile()` sound read-only but reconcile settings | Separate repository-only `agent:doctor`; output lists `notChecked`, actionable checks and stable exit codes; Node tooling tests cover missing dependencies |
22
+ | Attribution | AGENTS/CONTRIBUTING required unspecified co-author; historical bot was copied | Actual-tool `Assisted-by`; DSH example does not invent a bot email; contract validator guards against mandatory copied co-author policy |
23
+ | Runtime floor | Declared Node >=22.0.0 but locked pi-ai requires >=22.19.0 | Align package/baseline to >=22.19.0; recommend Node 24 LTS; CI still uses 24, so the minimum is a dependency floor, not a live Node22 certification |
24
+ | Compiler evidence | `tsconfig.json` included only src; expanded compilation found 17 diagnostics in tests/configs | `typecheck:tests`, accurate mock/brand/narrowing fixes; no blanket ignores; real Core fixture remains checked only in its pinned checkout |
25
+ | Vacuous assertion | Cordis DisposableList was indexed as an array, allowing undefined UID comparisons | Use iterable conversion and assert defined identity before equality in loader tests |
26
+ | Build evidence | verify:package checked Host existence, then claimed built Host verified | Import real built Host without the Vitest Typert alias; assert exported contract and label the evidence as import-only |
27
+ | Archive delivery | Pack/checksum did not check actual exported files or README media; images were omitted | `verify:tarball` inspects bounded tar data without extraction; rejects paths/links/duplicates/unexpected files/trailing payload; compares the full normalized manifest and every packed file to the checkout/build; checks exports and README media; CI/release run it after packing |
28
+ | Desktop shared-package ownership | Alpha.18-alpha.20 tarballs privately declared Host-owned authorization and schema packages, so native Desktop profile validation rejected the graph | Alpha.21 makes both required peers with development-only copies; the packed-manifest gate audits every runtime/peer declaration against hash-pinned 0.1.5 actual descriptor and 0.1.6 generated package-set projections |
29
+ | Client external ownership | Alpha.21 left React as a required nonshared Node peer, so packaged Desktop with `autoInstallPeers: false` stopped before receipts/state | Alpha.22 declares `dsh.client.external: [\"react\"]`, removes the root React peer, retains a dev copy, and verifies the actual built Client requests exactly the shell-owned React singleton |
30
+ | External verifier safety | Fixed fixture path could overwrite then delete a pre-existing upstream file | Exclusive create, pinned clean tracked sources, physical-path containment, identity/byte-guarded cleanup and bounded child; twelve synthetic failure/sentinel tests including a Windows junction |
31
+ | Release prerequisite | Tag workflow could run independently of complete platform/Core matrix | Reuse CI through workflow_call; publish job needs matrix success on tag revision; contract verifier checks the dependency |
32
+ | Session model correctness | Inline preflight checked provider but plan sends default-route candidate.model | Historical guard matched provider AND model and delegated mismatches; alpha.8 replaces default-derived planning with initiating-owner/request identity (see #99 below) |
33
+ | Documentation freshness | Contribution/PR/bug forms omitted alpha.1; build/activation/install evidence blurred | Updated templates, exact approval boundaries, evidence matrix and retry/rollback guidance |
34
+ | Workspace hygiene | Broad lib ignore hid scripts/lib; root packs/.env not ignored | Root-anchor generated /lib, ignore tarballs/secrets; .editorconfig specifies new-file formatting without rewriting history |
35
+
36
+ Run `pnpm verify` for the local checks. Then `pnpm pack --pack-destination artifacts` and `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.tgz`. The task planner emits the actual path from package.json. Consult the PR's final results for commands actually executed and current CI status; this document does not hard-code a perpetual passing test count.
37
+
38
+ ## Evidence ladder
39
+
40
+ 1. **Source markers** prove required seams/test names are present, not semantics.
41
+ 2. **Typechecks and synthetic tests** verify local assumptions, not installed account eligibility.
42
+ 3. **Built import/loader checks** prove modules load without test aliases; they do not call apply().
43
+ 4. **Pinned upstream config fixtures** prove configuration against those sources, not the entire companion Host on every runtime.
44
+ 5. **Archive/checksum inspection** proves shipped bytes and packaging consistency, not authenticated requests.
45
+ 6. **Explicit live acceptance** must separately check installed versus loaded version, actual session model, normal stream/tools, and selected search provider. A page returning HTTP 200 proves only reachability.
46
+
47
+ Missing evidence is `notChecked`, not success. Repository CLI plans do not grant permission to merge, publish, change credentials or install.
48
+
49
+ ## Runtime lifecycle follow-up (#75)
50
+
51
+ - **Read-only status delivered:** `status()` and `describeGitHubCopilotProviderProfile()` now share pure planning and return minimal authentication/catalog/route state without mutation, OAuth refresh or network. Explicit `reconcile()` and its UI control perform stored-snapshot repair. Errors preserve configured authentication and expose classified route diagnostics. Tests prove repeated reads are write/network-free, repair is explicit, and conflicts/failures do not leak raw errors.
52
+ - **Proof invalidation delivered:** both search surfaces listen to the exact Copilot credential key and evict successful/failed plans lazily. Attach/settings/events make no network requests. Cancellation and generation-bound candidates prevent stale in-flight proof, account replacement during final auth, fallback-spelling clones and delayed streams from using another generation's authorization. Disposal aborts pending probes and prevents further spelling attempts. Tests use actual synthetic grant changes, not only event emission.
53
+ - **Ownership checks delivered:** raw settings preimages/postimages, validated version-2 journal, revision-checked writes, exact created-profile shape checks, and leaf-only header cleanup protect user additions/edits. Resolved schema defaults do not count as user edits. Tests cover interrupted writes, manual edits, marker loss, legacy markers, process restart and same-process registration resets.
54
+ - **Deliberate recovery limit:** Core does not expose durable registration identity or a cross-namespace transaction. Revision integers/recorded process epochs cannot authorize replay after a namespace reload. Therefore a later invocation never reapplies an unresolved prepared activation/restoration; it keeps the journal and reports conflict for review. Steady postimages may prepare fresh restoration; already-restored targets may clear a marker without rewriting the route. Legacy journals and custom model preimages also fail conservatively rather than guessing ownership. Post-write marker checks detect interference but do not create atomic route/marker/credential commits.
55
+
56
+ ## Provider-integrated account controls follow-up (#93)
57
+
58
+ The provider integration introduced in `0.4.0-alpha.5` replaces the older independent-footer-only layout, not the underlying route architecture. The lifecycle from `0.4.0-alpha.6` (#95) remains unchanged in planned `0.4.0-alpha.7`; #97 adds only last-success timestamp presentation:
59
+
60
+ - **Surface ownership:** when an existing configured canonical `github-copilot` provider card is mounted, embed login/status/**Refresh models**/**Manage** there and suppress the separate footer account controller. If no such row is mounted, keep footer fallback usable; old Core retains its settings section. The shared account-state owner, including its in-flight authorization state, survives transfer only while another eligible surface remains mounted. Last-surface unmount or nonoverlapping declaration replacement stops polling. A later controller reads status and separately ensures missing/idle/stale/error/loading signed-in metadata without replaying the old forced-login action. Manual **Refresh models** now lives in **Manage**; errors retain a visible **Retry**.
61
+ - **Discovery triggers (#95):** successful explicit UI **Start sign-in**/account switch forces one bounded discovery after immediate or polled completion. Opening Models separately calls non-forcing `ensureModels()` once for missing/idle/stale/error/loading signed-in metadata; error re-entry retries only after shared cooldown with no same-mount loop; loading joins the existing Host flight to observe completion without extra network. Fresh ready cache needs no request, and true unavailable/empty models do not auto-retry. Status/details remain network-free, not the entire opening flow. Background credential/reset events clear Client state and read status, not force discovery on every token event; next open/use ensures metadata.
62
+ - **Freshness and authority (#95):** `github-copilot` settings default to `accountModelTtlMs: 86400000` (24h maximum reuse) and `accountModelFailureCooldownMs: 300000` (5min failure cooldown). One shared Host flight serves callers; no periodic metadata polling timer (the timestamp's display-only timer is separate). Last same-account metadata may display during TTL refresh/loading/error but never authorize requests. Credential/account/permission invalidation or proof expiry revokes request evidence immediately; the TTL does not extend tokens. Definitive `UNKNOWN_MODEL` triggers one bounded metadata refresh without message replay/model switching; generic HTTP/network errors are not guessed into that category.
63
+ - **Last-success display (#97):** `snapshot.discoveredAt` appears beside the model count outside **Manage**, without a duplicate inside. Past times use English relative text; the tooltip and accessible semantic `time` expose the full local date, time and time zone. Missing/invalid timestamps or no account hide it; future times use an absolute label. One mounted 60-second display-only timer updates the relative text without RPC/status/discovery, and is disposed when the timestamp disappears or the view unmounts. Pending/failed refresh keeps the last success time; successful refresh replaces it and sign-out clears it. Cache/discovery and authorization rules are unchanged.
64
+ - **Honest integration limit:** the published provider-card slot is additive and cannot replace Core **Edit/Delete**. Normal plugin discovery needs no manual model definitions, but the native editor stays available. Embedding account controls does not merge/remove canonical `github-copilot` and managed `github-copilot-preview`, copy credentials, rewrite configuration/history or migrate selection. Any optional real route removal still requires the [separate reviewed migration](./single-route-migration.md).
65
+ - **Acceptance still required:** test missing/idle/stale/error/loading open-time ensure versus fresh-cache no-request, shared Host flight, TTL/cooldown boundaries, display-only stale data, immediate revocation, definitive unknown-model refresh without replay, Manage-only manual refresh and visible Retry. Retain provider/footer/old-Core fallback, overlapping-owner transfer, final-unmount cleanup and once-per-explicit-login tests. Read the implementation PR's actual results before claiming these checks passed; documentation is not runtime or live OAuth evidence.
66
+ - **Browser/media evidence:** `copilot-search-routing.png` shows the current built plugin-detail routing card in isolated Edge with synthetic providers. It is presentation evidence only, not proof of live credentials, provider availability, search success or Desktop activation. Host TTL/cooldown timing and account-control lifecycle remain unit-test evidence rather than screenshot evidence.
67
+
68
+ ## Session-scoped Copilot follow-up (#99, planned alpha.8)
69
+
70
+ - **V3 ownership:** one global Host account and shared metadata source supply many models; explicitly selected/history-backed Sessions retain independent model context. Search facts use the captured initiating Session's effective request-header/config or explicit `GenerateOptions`, not another Session or future default C. Plans are cached per owner to prevent A/B different-model reuse/cancellation. No global current-model/search-status card is added.
71
+ - **Cold entrypoints:** Chat picker and `/model` `listModels()` ensure the shared managed source without visiting Settings first. Actual cold managed search performs a non-forcing shared ensure before deriving facts. The same 24h maximum TTL, 5min cooldown, account generation and capability/probe checks remain.
72
+ - **Native API limits:** a new Copilot draft warns that saving a native profile adds another real group, not another account. Add cannot be vetoed and Save cannot be disabled through the public additive slot. Public `session.selectModel` also writes the future global default; unselected empty Sessions can inherit it. Do not claim enforced one-route registration or immutable empty Sessions.
73
+ - **Delivery boundary:** code does not auto-migrate configuration, credentials, selections or history. After release, the operator must resolve approved Session/default choices separately; the config-only v1 Ops command performs no automated selection writes, then may compare-and-swap only the reviewed user-native profile path after ruling out base/journal conflicts, and read back registration. Any search allowlist change to `github-copilot-preview` is a separate reviewed Ops edit, never silent broadening. See [migration](./single-route-migration.md).
74
+ - **Request-context correction:** `Agent.options` remains Core's activation seed, not selected-model evidence. Real `installModelSelection` overrides request/assembly; the Session records effective `requestHeader().config` before tools. Capture the initiating Session's proven request context or use explicit `GenerateOptions`; otherwise traditional search is unavailable. Pending new selection before its next request must not expose the prior header as current prompt guidance.
75
+ - **Acceptance/evidence:** use real `installModelSelection` to check concurrent A/B models against unchanged activation/default seed C, reject unproven or stale-header prompt guidance after a pending selection, cold Chat and `/model` discovery, cold search/probe, owner invalidation, missing initiator, Add warning with Save retained, and CAS-conflict refusal/readback. README screenshots do not prove these behaviors or a completed migration; consult the implementation and operations evidence separately.
76
+
77
+ ## Live migration evidence follow-up (#101, planned alpha.9)
78
+
79
+ - **Entry point:** no-argument `githubCopilot.migrationStatus()` reads public live leaves synchronously. Generic `session/list` may be stale and inventory lacks loaded-version evidence. The new result carries loaded build `plugin.name`/`plugin.version`, protocol 1, observation time, five structural capability flags and `complete.sessions/defaultSelection/routes`; unknown/incomplete required selection or route evidence must fail the maintenance gate, not be treated as absence. Idle Agents normally have `activeRequestSelection: null`.
80
+ - **Session scope:** pending model projection → recorded request-header config → current default only for genuinely empty live Sessions with known projection state. Each row has selection provenance; a running Agent's separate `activeRequestSelection` is its latest recorded header, not proof of an in-flight LLM call. `routes.nativeConfigured`, `nativeRegistered` and `managedRegistered` distinguish effective config from registry state.
81
+ - **Read-only boundary:** no authorization status/discovery, credential access, network, settings/Session mutations, normal UI or global model/search card. Seven ordinary authorization Remotes retain their existing codec; the eighth Remote uses its own strict `GitHubCopilotMigrationStatus` codec. Source ownership is `src/migration-status.ts` plus the controller/Remote bridge; focused evidence is `tests/migration-status.spec.ts`.
82
+ - **Limits and Ops handoff:** `historyScope: live-agents-only` excludes cold history. Require operator acknowledgement that older conversations may need explicit selection on resume. Version/capability self-reports are not full Desktop/Core byte attestation or an atomic cross-namespace guarantee; recheck just before CAS. The separate planned Ops `tools/migrate-copilot-managed-route.ps1` in `cloga/dsh-windows-ops` is config-only v1, with no automatic Session/default writes, plugin install, restart or full Desktop-baseline acceptance. This document does not establish its publication, installation or a completed live migration.
83
+ - **Acceptance:** verify loaded identity, missing/malformed seams and incomplete evidence, fresh live-Agent enumeration, pending-versus-recorded selections, truly empty defaults, running-header caveats, effective-config/registry distinction, bounded strict codec and zero side effects. Read actual test/Ops results rather than treating this checklist as a passing report.
84
+
85
+ ## Core alpha2 compatibility follow-up (#105, planned alpha.11)
86
+
87
+ - **Exact targets:** retain rc.2, rc.1 development dependencies, `0.1.3-alpha.1` (`d347e703908d0406b7a7ef80e3a0e594d86b2215`) and `0.1.5-alpha.1` (`5dda764ed3aa172535a7967b06ff95d9cbfe536a`); add current `0.1.5-alpha.2` (`b2e3b2a0125854567a4a5fcba75782e42fe84901`), `0.1.5-rc.1` (`183f08e9c6dde7e36cd2318eaee70b0da08fb35e`) and `0.1.5-rc.2` (`fb2c4b9e698e30edb738bca4cf0618587db7d203`). Peer admission is not full runtime proof.
88
+ - **Actual break and narrow fix:** alpha2 `ResolvedPiAiProviderProfile` adds required `modelErrors`, optional `piProvider` and optional `catalogError`. `PiAiAdapter.modelOf` unconditionally calls `profile.modelErrors.get(model)`. The plugin-owned profile now supplies an empty `Map<string, string>` because only already validated account models enter its provider. It retains an actual `piProvider`, so no fabricated `catalogError` is needed. Unknown/rejected models remain fail-closed. No upstream provider, prototype, model catalog or dependency artifact is patched.
89
+ - **Runtime regression:** the existing unchanged tagged-source resolver attests exact Git HEAD, clean tracked sources, public package/export paths and real Context/LlmRuntime/PiAiAdapter class identity. `preview-route.spec.ts` resolves, prepares and synthetically streams an account model through the actual selected adapter, not a stub; the same suite runs against all three alpha pins and the rc.1 development adapter. Session/projection and eight strict Remote fixtures run on both 0.1.5 alphas. File projection and opaque replay remain native-owned.
90
+ - **Other consumed seams audited:** alpha1-to-alpha2 settings mutation/CAS and section installation, credential/authorization APIs, Agent/default-model selection, Session request header and model-selection projection, public gateway, provider-card slot props and Chat assistant-node registration retain the consumed contract. Core adds optional provider-directory `error`, repair UI and Add gating; these do not authorize plugin route migration or alter the account-controller ownership. SessionController file reveal/desktop APIs and API-remotes feedback contributions are additive and unconsumed. Chat file-link closing gains a session argument, but this plugin delegates native rendering and does not call that seam.
91
+ - **In-band system authority:** the broader 0.1.5 audit found newer system-role messages would be demoted by the legacy Anthropic inline serializer. The preflight now delegates any such Anthropic request unchanged to Core before auth/probe/wire; leading and nonleading positions are covered. This deliberately limits inline hosted search, does not rewrite histories, and leaves the legacy Responses inline mapping of system content to user input text unchanged (not filtering). Managed requests always delegate to native transport.
92
+ - **Evidence boundary:** CI extends the Windows/Linux pinned matrix and release rechecks the current tagged runtime before packing. Local tests use synthetic credentials/network and unchanged Core source fixtures only; no Core implementation changes/build, live install, OAuth, provider calls, Desktop restart or GitHub publication is implied. Consult the task's exact command results for passes/skips; documentation and static markers alone cannot certify runtime or live behavior.
93
+
94
+ ## DSH 0.1.6 compatibility adaptation (#125, planned alpha.19)
95
+
96
+ - **Exact target:** add official `dsh-v0.1.6-alpha.1` at `0a15e36e7f82b6ed45af6fa9759f29b40dcd965d`, retaining every earlier source pin and the exact `0.1.2-rc.1` development dependency set. The package also declares the same range in `engines.dsh`; neither declaration proves a loaded runtime.
97
+ - **Agent and Session:** the tagged fixture awaits the 0.1.6 `AgentRegistry.register()` publication boundary and verifies that its asynchronous serial `agent/created` listener has completed before migration evidence reads `agents.list()`, `Session.requestHeader()` and model-selection projections. Production code adds no `eventAt()`, `snapshotEvents()` or `ownEvents()` dependency.
98
+ - **Unowned service audit:** static source markers pin MCP SDK v2 resource list/template cursors, the `@deepseek-ai/dsh-ptc-runtime` and `@deepseek-ai/dsh-workflow-ptc` names, isolated Node PTC's empty model environment, cancellable asynchronous Sandbox/Shell preparation, consumer-owned optional-plugin startup failures, attachment request-cache separation from normalized objects, and Team task cursor/limit behavior. The plugin imports none of those service packages.
99
+ - **Tool and attachment behavior:** provider-scoped Copilot filtering removes unavailable `sandbox_permissions` and `justification` fields from the new `run_code` schema as it already does for shell/filesystem tools, while leaving Team pagination untouched. The managed adapter continues to expose only the normalized attachment object's execution-world path; it does not expose DSH request-version cache paths. When the 0.1.6 adapter returns `IMAGE_OFFLOAD_REQUIRED`, the first call remains failed; the exact tagged fixture applies the public durable `image/offload` projection and proves the retry sends mapped placeholder text without image bytes.
100
+ - **Evidence boundary and blocker:** CI and the release workflow use the unchanged exact tagged source on Windows and Linux. This proves source compatibility and synthetic behavior only. The Draft PR remains blocked on the coordinator's Windows Ops 0.1.5 baseline and must not be merged, installed, or published until explicitly unblocked.
101
+
102
+ ## Remaining limitations and follow-up acceptance criteria
103
+
104
+ - **Initiator compatibility:** planned alpha.8 derives search from the captured initiating Session's effective request-header/config or explicit `GenerateOptions`, never a global default. Without `agents.currentInitiator`, traditional hosted search reports a named unavailable diagnostic. Explicit marked `GenerateOptions` still supports guarded inline routing, possibly uncached when no owner exists. An OAuth credential notification during initial lazy discovery is indistinguishable from external account change via public status: the first search fails closed with `WEB_PROVIDER_UNAVAILABLE` before probe/wire; a later user/driver request may retry, never automatically. Do not claim seamless first-attempt credential refresh. Verify the initiating-context seam on each pinned Core before extending compatibility claims. Capability/probe and route allowlists still gate search; owner isolation is not unrestricted search support.
105
+ - **Live evidence:** readonly status describes the stored account snapshot, not fresh entitlement or a successful request. A credential update during an in-flight search fails closed; a new explicit request can retry with fresh proof. There is intentionally no automatic retry loop.
106
+ - **Browser acceptance:** pure React element tests and synthetic screenshots do not establish clipboard permissions, keyboard focus, narrow layouts, pending RPC unmount behavior or a loaded Client update. Add mounted/browser tests with synthetic codes before calling those behaviors fully certified.
107
+ - **Minimum runtime/full baseline activation:** local and CI Node24 plus source/config checks are not full Node22.19/live-plugin certifications. Run those explicitly before expanding deployment claims.
108
+ - **Security-sensitive diagnostics:** any suspected credential/session/endpoint exposure requires private triage under SECURITY.md with synthetic-sentinel tests. No real secret exposure was established by this audit; do not publish raw logs or provider bodies as evidence.
109
+
110
+ No attempt is made here to rewrite old commits/tags, auto-enable account models, alter live profile-wide Web provider selection, or introduce a second LLM adapter. The runtime guard can be reverted independently; the tooling and documentation remain useful without installing a plugin release.
@@ -0,0 +1,255 @@
1
+ # High-cost Auto: requirements and evidence
2
+
3
+ Tracking: #333. Evidence-review workflow: #332.
4
+ Post-delivery review: [#334](https://github.com/cloga/dsh-github-copilot/issues/334).
5
+ Advisor qualification: [#335](https://github.com/cloga/dsh-github-copilot/issues/335).
6
+
7
+ ## Product contract
8
+
9
+ High cost is a user-owned exact-model-ID preference, not a supplier category,
10
+ quality rating, price quote or difficulty level. The setting is shared across
11
+ accounts, like exclusions. It applies to Lightweight, Versatile and Powerful
12
+ models, including newly advertised IDs without implementation changes.
13
+ Unmarked new models have ordinary weight. Unavailable saved markings survive
14
+ and apply when the ID returns. Exclusion and high cost are independent.
15
+
16
+ The existing Model preferences row gains a High cost checkbox. Changes save
17
+ immediately through a narrow public SettingsForms CAS and confirmed readback;
18
+ they never select a model, discover models, enumerate Sessions or change the
19
+ global default. Unknown preference state is read-only, not an empty marking
20
+ list. Fixed selection is unaffected. An admitted Auto turn retains its captured
21
+ decision across steps, retries and subsequent preference changes.
22
+
23
+ The snapshot is taken when Auto allocates a model, after bounded assessment and
24
+ model loading, not necessarily at `turn/start`. Once allocated, the same turn
25
+ cannot be reweighted by a later save. The current checkbox/configuration is not
26
+ historical evidence of a previous decision. A retained observation window can
27
+ contain several different turns and models; its end timestamp is not the
28
+ timestamp of the selected message's decision.
29
+
30
+ For #348, read-only native header evidence identifies the reported Astra
31
+ selection at 06:25:58 local time, while the second allocation around 06:42:18
32
+ selected a different model. The retained pre-install configuration had no mark,
33
+ and a later configuration contains it. Whole-file modification time does not
34
+ prove the high-cost leaf's save time. No decision-time saved revision or exact
35
+ save receipt was retained, so the historical cause remains unconfirmed.
36
+
37
+ `tests/fixtures/copilot-accounts-persistence-core.fixture.ts` now exercises the
38
+ native SettingsForms save, preserved volatile configuration, the production Auto
39
+ Host's captured candidate weight/share, and profile restart using synthetic
40
+ models and settings only. It proves saved marks reach new allocations in that
41
+ unchanged official Core fixture, not that the affected live Host read the mark
42
+ before the historical Astra decision. Do not hardcode a model, change live
43
+ preferences or rewrite a frozen explanation to manufacture a repair.
44
+
45
+ ## Routing policy v4 (#414)
46
+
47
+ 1. Account ownership, metadata validity, exclusion, input modality and input
48
+ headroom are hard requirements.
49
+ 2. Assess each new turn using existing contextual local/semantic evidence.
50
+ Preserve existing demand categories as the target, not a hard pool filter.
51
+ 3. Retain every eligible fitting candidate across categories. Multiply each
52
+ model's cost/recency weight by its category factor: target 1, second 0.25,
53
+ third 0.05, unknown 0.02. The order is Powerful/Versatile/Lightweight for a
54
+ Powerful target, Lightweight/Versatile/Powerful for Lightweight, and
55
+ Versatile/Powerful/Lightweight for Versatile. Unknown stays explicit, never
56
+ inferred from names or capacities. Missing protocol/capability proof remains
57
+ a hard admission failure, not an unknown-category opportunity.
58
+ Ordinary candidates have weight 1 and an eligible previous ordinary model
59
+ receives multiplier 1.5. Marked candidates have base weight 0.2; the previous
60
+ marked model decays tenfold to 0.02 instead of receiving a continuity bonus.
61
+ 4. Select from cumulative positive weights using a stable Agent/turn seed.
62
+ Capture the selected ID, each candidate's actual category and category factor,
63
+ final weights and conditional expected shares.
64
+ No additional model calls are made to give candidates a chance.
65
+ 5. When no model fits, retain the largest-input-budget native recovery path.
66
+ Cost cannot justify choosing a model that cannot fit.
67
+
68
+ V4 corrects v3's hard category exclusion: a fitting non-target category now has
69
+ positive opportunity, even while the target has fitting models. Category factors
70
+ are deliberately biased but uncalibrated trial coefficients; task-quality,
71
+ switching-cost and real workload acceptance remain unverified. More models in
72
+ a category increase its total opportunity; these are per-model factors, not
73
+ fixed category probability quotas. A category with only high-cost models can
74
+ have lower total probability than an ordinary non-target category.
75
+
76
+ V3 corrected v2's over-strong hard deferral after the user clarified that high
77
+ cost should have rare opportunity and strongly decay after selection, not become
78
+ permanently unavailable. The 10x repeat penalty is a declared trial, not a
79
+ calibrated optimum. It uses existing previous-route evidence only; there is no
80
+ hidden multi-turn counter, persistent penalty, time cooldown or failed-task guess.
81
+ If the same marked model repeats, it remains at 0.02 rather than recursively
82
+ shrinking. A different model's turn resets it to 0.2. Other marked models retain
83
+ base weight. A lone fitting marked model is selected and an all-marked pool
84
+ remains usable. Fit and supplier
85
+ category cannot prove peers can solve the task; no automatic escalation, extra
86
+ calls or in-turn switch is introduced. V4 intentionally permits non-target
87
+ categories; it does not infer they can solve the task.
88
+ Every fitting candidate has positive opportunity. In an isolated same-category
89
+ two-model pool, with one ordinary
90
+ peer, a marked model has share 2/17 (11.8%) when the ordinary model was previous,
91
+ then 1/51 (2.0%) when it was itself previous. The independent-draw approximation
92
+ for a predeclared pair is 2/867 (0.23%), not the probability of any streak in a
93
+ long Session or a guarantee against repeats. Stable seeds do not prove
94
+ independent random trials. Conditional shares are not observed billing.
95
+
96
+ Historical v1 retains mixed-pool weights and marked continuity; v2 retains hard
97
+ cost-tier deferral and its deferred count; v3 retains hard category filtering
98
+ with positive cost/recency weights. All remain readable unchanged.
99
+ Persistent cohorts retain original policy versions.
100
+ The Session summary separates incompatible policy cohorts and reports omitted
101
+ decisions instead of relabeling them or merging different opportunities.
102
+
103
+ Read-only October 11 alpha.10 aggregates showed 3 Astra selections against
104
+ 2.868 summed expected selections across 18 opportunities, without Session or
105
+ sequence identity. The requested local Session's bounded native metadata showed
106
+ five Sol turns followed by two Astra turns; its last 178 messages belonged to
107
+ one frozen turn. This does not establish a distribution violation. A conditional
108
+ two-peer seeded reproduction matches the two Astra choices, but the exact
109
+ historical pool was not retained. V2 implements the user's stricter preference,
110
+ not a claimed repair to a proven random-number defect. V3 supersedes v2's hard
111
+ exclusion with positive recency-decayed opportunity, without a live performance
112
+ claim.
113
+
114
+ The auxiliary semantic classifier is a separate call, not another main-turn
115
+ allocation. It prefers an unmarked eligible Lightweight classifier; if only
116
+ marked classifiers qualify, the existing bounded call remains available.
117
+ Within that cost tier it retains advertised-off preference and stable ID order.
118
+ Its model selection must disclose its own policy and charge limits;
119
+ never count it as an ordinary Auto decision or hide auxiliary costs in Chat
120
+ Usage.
121
+
122
+ ## Measurements and acceptance
123
+
124
+ ### Reproducible v4 distribution trial
125
+
126
+ From a source checkout with dependencies installed and Node 24:
127
+
128
+ ```sh
129
+ node --experimental-transform-types scripts/simulate-auto-distribution.mjs
130
+ ```
131
+
132
+ This calls the real selector for 19 scenarios, 100000 draws each, using one
133
+ synthetic Session and ascending turns. Six synthetic models have two per
134
+ category; only Powerful A is marked. All capacities are 128000 with 8000 output
135
+ unless a scenario explicitly changes fit. IDs are fixtures, not an account
136
+ catalog. No credentials, discovery, model calls or profile mutation occur.
137
+ Rows report counts, averaged conditional expected share and observed frequency;
138
+ every positive-share row must be observed and differ by less than 0.5 percentage
139
+ points. Seed determinism does not establish independent random trials.
140
+
141
+ With no previous model, the twelve task/preference combinations collapse to
142
+ these three distinct pools. Observed percentages for 100000 draws each:
143
+
144
+ | Preferred target | Powerful A marked | Powerful B ordinary | Versatile A | Versatile B | Lightweight A | Lightweight B |
145
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: |
146
+ | Lightweight | 0.355 | 1.985 | 9.793 | 9.619 | 39.001 | 39.247 |
147
+ | Versatile | 2.157 | 10.346 | 41.589 | 41.725 | 2.058 | 2.125 |
148
+ | Powerful | 11.080 | 55.708 | 13.830 | 13.776 | 2.750 | 2.856 |
149
+
150
+ The respective theoretical percentages are:
151
+ Lightweight 0.390625/1.953125/9.765625/9.765625/39.0625/39.0625;
152
+ Versatile 2.083333/10.416667/41.666667/41.666667/2.083333/2.083333;
153
+ Powerful 11.111111/55.555556/13.888889/13.888889/2.777778/2.777778.
154
+ The task/preference target matrix still applies; it biases these probabilities.
155
+
156
+ For a Powerful target, fixed previous ordinary gives the marked model theoretical
157
+ 8.6957%, observed 8.663%; fixed previous marked gives 1.2346%, observed 1.296%.
158
+ The sequential simulation updates previous after every draw: marked 8.577%,
159
+ ordinary Powerful 61.215%, Versatile 12.705%/12.632%, Lightweight 2.410%/2.461%,
160
+ with 93 adjacent marked pairs. These are fixture frequencies, not predictions
161
+ for current account pools. The script also covers both Powerful models marked,
162
+ one/both Powerful models failing input fit and mixed image support.
163
+ Hard-ineligible rows retain zero opportunity; there is no guaranteed finite
164
+ waiting time for any model.
165
+
166
+ Review the previous policy report before changing weights or continuity.
167
+ Synthetic acceptance covers ordinary/marked/all-marked/single pools, every
168
+ supplier category, exclusions, capacity, category changes, stable seeds,
169
+ preference changes and admitted-turn freezing. Distribution checks use large
170
+ declared seed sets and compare actual allocation with conditional expected
171
+ shares, including marked previous models, all-marked/single pools, sequential
172
+ previous-route updates and backward-compatible v1/v2 evidence.
173
+
174
+ Runtime evidence must distinguish a selected decision from native attempted,
175
+ delivered, finished, failed and cancelled calls. Count a decision once per
176
+ Agent/turn, not per tool step. For every final-pool candidate retain its effective
177
+ weight, opportunity and expected share; compare only equivalent policy versions
178
+ and eligibility windows. No-fit decisions have no fitting-pool distribution.
179
+ Report category, assessment source, switching/continuity and marking state at
180
+ decision time, never reconstructed from today's settings.
181
+
182
+ The turn-selection dialog continues to expose bounded Host-lifetime evidence.
183
+ Separately, default-off Local diagnostics persists daily profile-local
184
+ allocation aggregates in the reviewed public storage domain when collection is
185
+ enabled. It records plugin/policy version, target/selected category,
186
+ demand/assessment source, model, high-cost/continuity flags, weight,
187
+ opportunities, conditional expected selections, actual selections and no-fit
188
+ counts. Retain at most 1,024 strata for 14 days under the shared 2 MiB snapshot
189
+ limit; expose restart, expiration, drops and truncation. There are no
190
+ Session/turn IDs, prompt/content, execution or task-outcome records, custom
191
+ Core history events, automatic uploads or tuning. The shared Local diagnostics
192
+ switch controls account/Checking and compaction aggregates; Auto allocation
193
+ collection has its own hidden volatile, default-off setting and can be enabled
194
+ without collecting those other populations. Missing history is unknown, not
195
+ zero usage or success, and selection remains distinct from execution, quality
196
+ and billing.
197
+
198
+ `autoAllocationEvidence: false` stops future Host-lifetime candidate captures
199
+ without changing selection; it does not disable the separately controlled
200
+ persistent Local diagnostics aggregates. The read-only exports perform no
201
+ automatic file writes/upload.
202
+
203
+ No prompt, answer, tool content, replay, credential, account name or raw Session
204
+ ID belongs in an aggregate review. Keep evidence local; no automatic upload.
205
+ Do not infer credits from token estimates or account-balance deltas. Completion
206
+ is not task success. Any quality comparison requires independently defined
207
+ validation or user feedback, with missing outcomes counted explicitly.
208
+
209
+ After delivery, the next Auto-policy issue owner reviews a declared sample
210
+ target: initially at least 200 eligible opportunities per compared model,
211
+ across at least 20 Sessions, with policy/candidate-set changes separated.
212
+ This is an initial review threshold, not statistical significance. Retain,
213
+ change or defer with reasons and revised collection action if data is missing.
214
+ Review before the next weight change even if the target has not been reached.
215
+
216
+ ## Controlled assistance: approved direction, separate acceptance
217
+
218
+ A main model may explicitly request one bounded advisor analysis by naming a
219
+ goal, a specific bottleneck, distinct attempted approaches and references to
220
+ their validation results. Host verification must use public current-Agent/turn
221
+ records, not trust a model's claim that it failed twice. Repeated identical
222
+ attempts and network/auth/permission/quota problems do not establish a reasoning
223
+ bottleneck. Verified failed checks do not prove model incapability.
224
+
225
+ Require per-request user confirmation or a separately explicit standing
226
+ assistance authorization with a budget. Confirming the feature direction alone
227
+ does not authorize live paid calls during development. Verify the following
228
+ public seams before shipping: tool registration, evidence lookup/ownership,
229
+ confirmation and safe resumption, frozen-account binding and native adapter
230
+ composition. Unsupported seams require an explicit limitation or narrower
231
+ user-triggered mode; no Core patch, private registry or second wire.
232
+
233
+ Deduplicate by Agent/turn and bottleneck; one request has one tracked outcome.
234
+ Send only reviewed relevant material, with input/output/time limits and the
235
+ parent cancellation signal. Use a concrete admitted model on the frozen account,
236
+ respect exclusions/capabilities, and prohibit advisor tools, recursive Auto,
237
+ recursive assistance, automatic replay and new retry loops. High-cost marking
238
+ does not establish expertise or guarantee a different model is better.
239
+
240
+ Return advice as a tool result to the unchanged main turn. The main model
241
+ validates the recommendation before applying it. A future next-turn upgrade is
242
+ a separate policy, not an in-turn model switch. Log request, verification status,
243
+ authorization, call outcome, adoption and validation separately. Unverified
244
+ evidence stays unverified; advice returned or a normal finish is not success.
245
+ Extra calls and attributable usage must be disclosed independently, never
246
+ fabricated as native Chat Usage or actual credits.
247
+
248
+ ## Delivery boundaries
249
+
250
+ The first implementation targets marking, weighted main-turn allocation and
251
+ reviewable local evidence. It does not claim an advisor tool, autonomous
252
+ escalation, persistent telemetry, calibrated quality, actual cost savings or
253
+ live model success until their own acceptance evidence exists.
254
+ Rollback removes markings or restores the prior reviewed allocation policy
255
+ through a normal versioned change; never rewrite selections or histories.
@@ -0,0 +1,22 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "feature": "autorouting",
4
+ "status": "insufficient-sample",
5
+ "policyVersion": "high-cost-v4",
6
+ "observation": {
7
+ "start": "2026-10-08T00:00:00Z",
8
+ "end": "2026-10-09T23:59:59Z",
9
+ "sampleCount": 63,
10
+ "limitations": "The declared 63-sample window is the prior alpha.2 review, not the newer cohort. Separate alpha.10 read-only profile aggregates on October 11 show Astra 3 selections across 18 conditional opportunities, summed expected selections 2.868. No Session IDs or sequence in aggregates. Bounded native metadata from the requested local Session shows five Sol turns followed by two Astra turns; the last has 178 steps under one frozen allocation. Tail scan is limited, not full history. Actual per-turn pool/weights are not durably retained. Two user-reported valid unknown classifier results are not a population unknown rate. No content, credentials or raw export uploaded."
11
+ },
12
+ "previousReview": "Prior #332/#333/#334, alpha.11 #411 and alpha.12 #413. User clarified on October 11 that every eligible fitting model should retain positive opportunity across categories, not just within one category (#414). No newer live v3 outcome sample is available; retain #334.",
13
+ "findings": "Prior 63 decisions cannot attribute later incidents. Valid unknown is not a timeout. Projection regressions establish avoidable anchor loss/incidental-omission downgrade, not the actual task root cause. The reported Astra streak is two allocations, not 178 independent choices. Under an explicitly assumed two-model category pool, production Session/turn seeds reproduce both Astra choices at conditional shares 11.8% then 23.1%; this is conditional reproduction, not recovered decision evidence. A 20000-turn synthetic fixed-previous v1 scan yields 4563 Astra hits and 1014 adjacent pairs, showing runs are possible, not proving actual distribution conformity. No observed aggregate inflation is established. V1 intentionally grants marked continuity; the user now requests a stricter cost preference, not a statistically proven RNG repair.",
14
+ "decision": "High-cost-v4 replaces hard category filtering with positive per-model category factors: target 1, second 0.25, third 0.05 in the existing category order, unknown explicitly 0.02. Multiply by v3 ordinary/previous/high-cost/previous-high-cost weights 1/1.5/0.2/0.02. All hard-eligible fitting models participate; exact exclusions, current account/capability proof, input modality and headroom remain hard guards. These are uncalibrated biased trial coefficients, not optimal probabilities, quality evidence or fixed category quotas. Candidate population affects category totals. Intentionally permit non-target draws without task-failure inference, extra calls or in-turn switches. No-fit native recovery and auxiliary classifier policy remain unchanged. Capture candidate category/factor; preserve strict v1/v2/v3 historical explanations/cohorts and no-evidence opt-out. No new persistent population or measured quality/cost claim.",
15
+ "validation": "Five regression-first cross-category tests failed under v3. V3 and v4 actual selectors each ran 19 synthetic scenarios with 100000 Session/turn seeds per scenario. V4 retained positive observed opportunity for all fitting candidates; every expected/observed share differed by less than 0.5 percentage points. The six-model sequential v4 fixture selected marked Powerful 8577 times and recorded 93 adjacent marked pairs; ordinary Powerful 61215, Versatile 12705/12632, Lightweight 2410/2461. This is implementation evidence, not independent production probability or quality. Checked-in scripts/simulate-auto-distribution.mjs reproduces the matrix. Full pnpm verify passed: 2788 Vitest tests, 2 expected skips, 340 tooling tests, types/build/package smoke. Final exact-weight codec refinement passed 21 focused tests. Correct candidate-category aggregation, strict factor validation, legacy v1/v2/v3 codecs and evidence opt-out are covered. Native gateways and saved-mark/restart run in required CI, pending before merge. Local pack/tarball passed; recheck the final candidate after this review update. No real model calls, credentials, live metadata reads, profile changes or Desktop restart.",
16
+ "followUp": {
17
+ "owner": "Maintainer or Agent assigned to post-delivery review issue #334",
18
+ "trigger": "Review 200 new decisions with recorded reasons, or any further classifier capability/context/policy change; first inspect a successful unknown turn's projection and decoded-demand fields.",
19
+ "metric": "By producer/policy and target/actual candidate category, compare selected/no-fit counts, opportunities and conditional expected selections. Split marked previous/base weights and population changes. Adjacent-turn rates require observed sequence, never daily aggregates. Track labeled outcomes of non-target selections before interpreting selection diversity as success, quality or savings. Legacy absence remains unknown.",
20
+ "action": "Review cross-category opportunity and task-quality regressions before retaining or tuning the declared factors; keep v1/v2/v3/v4 separate. No automatic parameter tuning, upload or live benchmark. Revert soft-category policy if reviewed outcomes reject the trial; retain genuine uncertainty and linked #334."
21
+ }
22
+ }
@@ -0,0 +1,60 @@
1
+ # Native Auto reviewer sampling compatibility
2
+
3
+ The plugin automatically omits `temperature` only from the official DSH
4
+ exact `0.2.0-rc.2`, `0.2.1-alpha.4` or `0.2.1-alpha.5` Auto reviewer root's account-proven managed `openai-responses`
5
+ requests. No user opt-in is required. Concurrent ordinary Chat, even on the same
6
+ Session/model, retains its requested sampling. No supplier capability is inferred
7
+ from `supports.thinking`; the policy addresses the reported unsupported-temperature
8
+ reviewer rejection, not a claim about all supplier models.
9
+
10
+ ## Public ownership proof
11
+
12
+ At official commit `639ed015397290b3745d163aafe02ffee4aa3f84`:
13
+
14
+ - `vendor/cordis/src/events.ts:344-345` documents the exported `internal/get`
15
+ service-read waterfall, including the calling Context.
16
+ - `vendor/cordis/src/fiber.ts:9-13` exports `Context.fiber`;
17
+ `vendor/cordis/src/registry.ts:135-142` documents the public runtime callback as
18
+ executable identity.
19
+ - `vendor/loader/src/index.ts:52-54` exports `Fiber.entry`;
20
+ `vendor/loader/src/config/entry.ts:46-50,221-234` exposes the entry's root fiber
21
+ and imports the configured plugin; `config/tree.ts:10,112-124` exposes its
22
+ resolution context and importer.
23
+ - `packages/boot/app-boot/src/profile-resolution/service.ts:17-35,90-105`
24
+ publishes profile-aware `PluginPackages.packageOf` package ownership.
25
+
26
+ The plugin requires exact entry-root equality, the official package/version,
27
+ matching manifest ownership in the Loader tree and plugin import contexts, and
28
+ independently imported public `apply` equality with the caller's runtime callback.
29
+ It rechecks root/liveness after asynchronous resolution. Names alone are not
30
+ identity. Importing the public module does not apply/register another reviewer.
31
+
32
+ A reversible plugin-owned facade delegates every exposed service property except
33
+ scoped `stream` unchanged. For a proven managed Responses route, it clones the
34
+ frozen caller options and omits temperature before native normalization/dispatch.
35
+ There is no source-option WeakSet, prompt/error/model-name matching, shared
36
+ prototype mutation, new wire, retry, verdict rewrite or permission change.
37
+ Native account/initiator routing and cancellation remain owners of request access.
38
+ Plugin disposal revokes its listener and in-flight scoped dispatch.
39
+
40
+ ## Scope and evidence limits
41
+
42
+ Canonical Core-owned Copilot, other providers/protocols, aliases, descendants,
43
+ impostor callbacks and unresolved identity remain native. Unqualified reviewer
44
+ identity reports bounded fixed-code Host diagnostics, not a broad omission
45
+ fallback. Missing optional reviewer packages do not prevent ordinary startup.
46
+ Future official versions need qualification; the exact rc.2 check is intentional.
47
+
48
+ The independent legacy `responsesOmitTemperature` setting remains default false.
49
+ Explicit true still changes **all** managed Responses sampling; it is not needed
50
+ for this automatic reviewer-only policy and is not silently enabled or migrated.
51
+
52
+ The fixture uses the unchanged native reviewer, LLM normalization and adapter with
53
+ synthetic credentials/metadata/HTTP responses. Published artifacts exercise the
54
+ actual native Loader importer; tagged source uses the public-export TypeScript
55
+ fixture resolver. Both runners explicitly include the reviewer fixture and reject
56
+ missing, skipped or wrong-count suites. Canonical/other-provider negatives use
57
+ test-owned native adapter stubs, not live canonical transport. No qualification
58
+ claim proves live supplier acceptance, installed/loaded state or paid inference.
59
+ The earlier published `.fixture.ts` CLI filter was excluded by the ordinary
60
+ `.spec.ts` include; its execution claims remain retracted on issues #374/#378.