@shumkov/orchestra 0.12.0 → 0.12.2

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.
@@ -0,0 +1,259 @@
1
+ # Claude runtime 2.1.322 upgrade preparation
2
+
3
+ ## Current release integration — 2026-11-12
4
+
5
+ Published Codex Orchestra0.12.0 base706dab133bb2c696d34a950d8bdd4eebc22f02f5
6
+ is integrated by signed merge e086896 without conflicts or manual source changes.
7
+ All21upstream non-package changed files match that released base byte-for-byte;
8
+ accepted Claude SDK runtime SHA remains unchanged. Prepared aligned pin commit
9
+ f9ef1b8 follows bounded fix0664a00. Fresh main/npm showed0.12.0, so patch0.12.1
10
+ is selected for the reviewed correction and Claude SDK0.3.322/CLI2.1.322 pair.
11
+ The Orchestra publication hold has ended; PR/CI/OIDC release and exact registry
12
+ artifact verification are authorized and in progress. No deployment is performed.
13
+ Polygram consumer merge/version/publication remains held until coordinator supplies
14
+ its released0.46.0 base, then requires actual0.12.1 consumer artifact validation.
15
+ The accepted matrix23/23, existing runtime/focused receipts and strict focused
16
+ INCONCLUSIVE limits remain unchanged; no provider repeat or new gate is needed.
17
+ The coordinator owns staging and both mandatory24hsoaks. Earlier integration-hold
18
+ statements below are historical and superseded by this checkpoint.
19
+
20
+
21
+ ## Publication and integration checkpoint — 2026-11-12
22
+
23
+ Ivan authorized publication and planned rollout. Tracking issue
24
+ [Polygram #133](https://github.com/shumkov/polygram/issues/133) is OPEN; its complete
25
+ body was authoritatively read back and verified. The accepted matched matrix
26
+ remains 23/23 on signed gate 6cceb3b. Bounded runtime correction is signed commit
27
+ 0664a00dea8b1b4fd1f8c3ff803683171b2c69d8, preserving its exact tested source.
28
+ Local SDK 0.3.322 / CLI 2.1.322 pins and generated lock metadata are now prepared
29
+ and independently reviewed CLEAN by compatibility, isolation and scope reviewers.
30
+ Installed candidate entry/package/binary hashes equal the accepted matrix pair.
31
+ Focused local checks: 425 PASS, 0 FAIL, 19 existing capability skips; full corrected
32
+ runtime suite before the pin metadata change: 1,560 PASS, 19 existing skips.
33
+ No new provider call was made. Strict focused traces remain INCONCLUSIVE within
34
+ the accepted limits and no extra provider loop is mandatory.
35
+
36
+ Codex owns Orchestra 0.12.0. Claude release version/tag/main integration waits
37
+ for its authoritative published base; this worker does not deploy. Orchestra's
38
+ package version remains 0.11.3 only as unreleased branch metadata, never a release
39
+ claim. Consumer dependencies remain the coherent .283 pair until the actual
40
+ subsequent Claude Orchestra artifact exists. The existing consumer contract now
41
+ also verifies installed SDK/CLI metadata and shared physical SDK resolution;
42
+ 3/3 checks pass on that current .283 installation. Artifact-backed .322 consumer
43
+ update and independent diff review, Linux rollback preservation and both 24-hour
44
+ soaks remain. Earlier authorization/pin-status statements below describe their
45
+ historical checkpoints and are superseded by this section.
46
+
47
+
48
+ Historical preparation status: proposed candidate; the SDK and CLI pins MUST remain 0.3.283 / 2.1.283 until the tracking issue exists and the checked old/new matrix passes on one recorded gate commit. A draft issue is not an opened issue. No release, consumer update, activation, or soak is authorized here.
49
+
50
+
51
+ ## Coordinator acceptance and retained limits
52
+
53
+ The coordinator accepts this bounded ownership correction on the completed
54
+ 23/23 matched matrix, all three distinct UUID-owned user completions observed on
55
+ both actual SDK/CLI pairs, observed peer/zero events preserving pending owners,
56
+ reviewed retained-shape RED 2 FAIL -> GREEN 2 PASS, the cancellation/drop
57
+ regressions, and independent clean code reviews. The former strict focused
58
+ oracle required unsupported standalone-report/notification-before-zero behavior
59
+ and its overlap holds were denied. Its INCONCLUSIVE verdicts remain unchanged;
60
+ those extra assumptions are not a release gate. No new live scheduling fixture,
61
+ provider query, or instrumentation loop is required or planned for this correction.
62
+ This accepts explicitly limited coverage; downstream delivery and every overlap
63
+ schedule remain unproven. Tracking-issue publication remains the explicit pre-pin
64
+ prerequisite, and pin/consumer reviews, release/activation authority, staging and
65
+ both 24-hour soaks remain. No runtime or package pin changes are made here.
66
+
67
+ ## Final full unit/integration verification
68
+
69
+ Ran the complete package test command once on the final corrected runtime with
70
+ Node 24.4.0: `node --test --test-force-exit --test-concurrency=1 tests/*.test.js`.
71
+ All 34 test files completed: 1,579 tests, 1,560 PASS, 0 FAIL, 19 existing contract
72
+ capability-N/A skips (17 channels-protocol, 2 Codex-capability), 0 cancelled.
73
+ Duration 103.370 seconds, exit 0. Runtime SHA-256 remains
74
+ `c6f61a85acd139a0c524a7726dc5eead02be34480305bcd3fbdde32005c72184`.
75
+ HOME/CODEX_HOME/TMP/tmux/vendor/versions were private synthetic trees, with an
76
+ allowlisted credential-free environment and disabled installer/updater. The suite
77
+ uses fake processes/bridges and local fixtures; no paid queries were repeated.
78
+ No failures required code changes. This is unit/integration proof, not additional
79
+ provider, downstream delivery, persistence, activation or soak proof. Full log,
80
+ command, times and per-skip receipts:
81
+ `/tmp/orchestra-claude-upgrade-research-3agLJs/compatibility-acceptance-full-suite/`.
82
+
83
+
84
+ ## Current correction and matched-pair result
85
+
86
+ Bounded SdkProcess normal-send serialization, UUID/origin ownership, cancellation
87
+ and drop correction is implemented with retained RED/GREEN tests and independent
88
+ CLEAN design/code reviews. Public interfaces, intentional injection/steering and
89
+ autonomous report output remain. Runtime source SHA-256:
90
+ `c6f61a85acd139a0c524a7726dc5eead02be34480305bcd3fbdde32005c72184`.
91
+
92
+ Actual SDK0.3.283/CLI2.1.283 versus SDK0.3.322/CLI2.1.322 complete matched matrix
93
+ `m-6cce-a` PASSES23/23 scheduled cells on signed gate
94
+ `6cceb3b3544f4efc74330c82f0557d7f1bfb31d6`, manifest SHA-256
95
+ `63bcf4e6f018bcbf689240a472328b73e1ee265af58a4cc7c3175d8320b8e817`.
96
+ The existing old opt-in waiver remains explicit; no candidate waiver was added.
97
+ Documented .292 clear ordering and exact two-result/task/run/session semantics
98
+ are validated on the new matched pair. Historical b796 crossed-pair FAIL and e187
99
+ runner-blocked FAIL remain immutable, not combined into this new PASS.
100
+
101
+ Strict focused provider probes remain INCONCLUSIVE: all3correct UUID-owned user
102
+ completions and observed peer/zero report terminals preserve pending ownership,
103
+ but denied fixture holds and stronger report/notification-order witnesses prevent
104
+ complete scheduling/downstream proof. Reviewed retained-shape replay fails on old
105
+ runtime and passes after correction; this does not relabel provider evidence.
106
+ No unchanged paid retry or wider runtime refactor is proposed. See
107
+ `SDK_PENDING_ATTRIBUTION_COMPATIBILITY_SPEC.md` and
108
+ `/tmp/orchestra-claude-ownership-correction-report.md` for exact evidence and the
109
+ accepted coverage limits. No further focused provider loop is required. Pins
110
+ remain old; issue is unpublished, consumer
111
+ update/release/activation and both24hsoaks remain pending. Claude does not block
112
+ coordinator-owned Codex work.
113
+
114
+ ## Historical provider verification before ownership correction
115
+
116
+ Ivan authorized all paid calls needed for upgrade discovery, full old/new matrix
117
+ and actual-new-SDK/focused followups. Existing access-only OAuth was used in
118
+ synthetic HOME/config/vendor/tmux trees; no real login/refresh state was changed.
119
+ Publication, push, release, issue creation and activation remain unauthorized.
120
+
121
+ Related Polygram child `/Users/ivanshumkov/orca/workspaces/polygram/claude-322-gates`
122
+ has signed gate commit `b796ec57a010edc092a9e03a287a00870dbb891d`, parent
123
+ `b10cdb32a6a11958a8516b24d86beeceabeefa9e`, prepared base `eea29d3`.
124
+ The separate acceptance manifest SHA-256 is
125
+ `bcfa47f6ce435bc3513677bc1325234dd476c523646c16477f9cb7f8eeb45f9a`.
126
+ Its 106 focused tests pass with zero skips. Full unfiltered `gate-b796ec5-full-a`
127
+ definitively FAILS: 23 selected, 15 completed, 14 PASS, one failed candidate
128
+ background MCP, eight not run after failure. All ten old cells and candidate
129
+ CLI twice plus Workflow direct/fallback PASS. All eight post-stop cases PASS in filtered observations on that same commit
130
+ (after short IDs fixed Opus/snapshot fixture path limits). These are supplemental; they cannot make a failed full attempt pass. The earlier full
131
+ `b10cdb3` attempt failed the old instructions assertion; neutral owned instructions
132
+ restored count one on both versions without weakening the old contract. The old
133
+ source of that historical instruction attachment is unproven. Parent piddock,
134
+ trusted-Codex, accepted default matrix and all runtime pins remain unchanged.
135
+
136
+ Candidate discovery exercised all 13 planned invocations across retained batches.
137
+ Five constant-SDK scenarios and all five actual SDK .322 core checks PASS.
138
+ Candidate Opus behavior/anchors and snapshot were exercised; enclosing provisional
139
+ lifecycle checks are distinguished from model success. The first channel row
140
+ has exact parent=false old / true candidate assertions; instruction count zero
141
+ was a clean-fixture hypothesis corrected to one, not accepted version drift.
142
+
143
+ The candidate opt-in MCP fails with constant old SDK. Actual SDK .322 completes
144
+ the task and returns the marker but fails strict ordering: notification occurs
145
+ before membership clear, whereas the contract requires clear before notification.
146
+ It does not require clear before task completion. Both streams also have two
147
+ terminal SDK results, violating the checked exactly-one-result source assumption;
148
+ raw hashes, normalized records and reconstructed native proofs match. No candidate
149
+ waiver was added.
150
+ Real auto-mode queued-prompt attribution fails on both actual old/new pairs;
151
+ .322 additionally emits an empty zero-turn report result consuming pending user
152
+ work. The bounded proposal and intentionally RED manual reproducer are in
153
+ `docs/SDK_PENDING_ATTRIBUTION_COMPATIBILITY_SPEC.md` and
154
+ `scripts/spikes/sdk-pending-attribution-regression.cjs`; runtime is unmodified.
155
+
156
+ Guarded native auth now establishes Channels delivery in both local stubs.
157
+ HTTP 500/401, retry recovery, injection/followup/interrupt/subagent, folded-input
158
+ and mailbox checks PASS on both versions, with eager tools only for deterministic
159
+ local scripting. Default candidate deferred-tool fixtures failed and are retained;
160
+ real-provider matrix defaults are unchanged. The child SQLite binding was rebuilt
161
+ in its own dependencies only. See `docs/CLAUDE_LOCAL_STUB_TOOLS_SPEC.md`.
162
+
163
+ The freshly refreshed existing context was read after prior calls completed;
164
+ profile returned 403, while one supported inference smoke returned definite
165
+ weekly quota exhaustion. No unchanged quota retry occurred. Another existing
166
+ native context completed the current real comparison, without login mutation.
167
+
168
+ Current detailed evidence is retained under
169
+ `/tmp/orchestra-claude-upgrade-research-3agLJs`; the final authorized-phase report
170
+ will be `/tmp/orchestra-claude-upgrade-provider-report.md`. The tracking issue is
171
+ still a local draft. No unit count, provider check or matrix attempt replaces
172
+ that publication gate, separate consumer review, or either mandatory 24h soak.
173
+
174
+ ## Problem and scope
175
+
176
+ Orchestra 0.11.3 at `0b11bbcdd28f309c3f92baa1444fcaad0c0436eb` pins Agent SDK 0.3.283 and CLI 2.1.283. Polygram's CLI adapter consumes private session JSONL, hooks, queue records, readiness text, and prompt attribution. Prepare the next upgrade without inferring compatibility from release notes or unit tests. Preserve Codex and the separately committed trusted-proxy work unchanged.
177
+
178
+ Read-only consumer reference: `/Users/ivanshumkov/orca/workspaces/polygram/piddock`, observed HEAD `960b0be3b191f5a336bab8d5d6577d411c548a3a`. Its `AGENTS.md`, `scripts/spikes/README.md`, matrix runner, manifest, and local stub drivers govern the consumer gates. Do not edit this checkout or its dependencies.
179
+
180
+ ## Candidate and official evidence
181
+
182
+ Registry and official GitHub release metadata checked 2026-11-12:
183
+
184
+ | Surface | Observed value |
185
+ | --- | --- |
186
+ | Agent SDK npm latest / next | 0.3.322 / 0.3.322 |
187
+ | SDK package `claudeCodeVersion` | **2.1.322** |
188
+ | CLI npm latest / next | 2.1.322 / 2.1.322 |
189
+ | CLI npm stable channel | 2.1.311 |
190
+ | GitHub latest CLI and SDK | v2.1.322 / v0.3.322; both `prerelease: false`, `draft: false`, published 2026-11-10 |
191
+
192
+ Select **0.3.322 / 2.1.322 for evaluation**, the latest official non-prerelease pair. This does not mean it passed compatibility, nor that the npm `stable` channel moved. If Ivan intends the conservative `stable` dist-tag specifically, 2.1.311 is a different candidate requiring its own exact matching SDK metadata, attestations, and matrix; never silently substitute it after a failure.
193
+
194
+ Sources: [SDK registry](https://registry.npmjs.org/@anthropic-ai%2fclaude-agent-sdk), [CLI registry](https://registry.npmjs.org/@anthropic-ai%2fclaude-code), [SDK release](https://github.com/anthropics/claude-agent-sdk-typescript/releases/tag/v0.3.322), [CLI release](https://github.com/anthropics/claude-code/releases/tag/v2.1.322), [SDK changelog](https://github.com/anthropics/claude-agent-sdk-typescript/blob/main/CHANGELOG.md), [CLI changelog](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md).
195
+
196
+ Review the full change range after .283, not just .322. Relevant changes include SDK result batching for queued subagent reports (.321), new task attribution fields and notification ordering (.292), enabled fork subagents (.302), opt-in MCP task support (.319), initialization/resume hook timing (.321), new session-write failure signals (.317), settings/permission defaults (.284/.302), plus CLI queue/interrupt/paste and hook execution fixes. These touch `lib/process/sdk-process.js` result-to-pending-turn matching, `lib/process/cli-process.js` hook/ledger/readiness handling, `lib/tmux/log-tail.js`, and Polygram's build-options and stream consumers. No undocumented lifecycle difference may be normalized away without source-bound evidence and independent review.
197
+
198
+ ## Approach and alternatives
199
+
200
+ 1. Preserve the host's old SDK-supplied executable outside updater, vendor GC, node_modules, and disposable test trees; record version, SHA-256, byte size and source. Download the exact candidate platform tarball from the official registry; verify its registry integrity and executable version/hash. No installer or updater runs.
201
+ 2. Review this spec independently for compatibility, scope, and isolation. Then run checked local fixtures against both exact binaries through the independently reviewed corrected Orchestra adapter, in separate synthetic homes and a private tmux socket directory. Put HOME beneath a dedicated mode-0700 user-data fixture root, outside temporary roots: the mailbox IPC correctly rejects a HOME under `/tmp` (including canonical aliases and `os.tmpdir()`). Keep TMPDIR and TMUX_TMPDIR separate from HOME. Use a minimal allowlisted environment. Pure local transport checks keep inference at loopback with external network denial; authorized provider checks use the separately reviewed access-only native context and provider network allowlist. On macOS, changing HOME does not isolate the login Keychain: enforce denial of `security` execution, Keychain file reads/writes and securityd access, and preflight these restrictions before launching either binary. Do not import real settings, sessions or cached feature flags. The authorized provider controller supplies access-only credentials inside the synthetic HOME after genuine account checks, without modifying the real login. Record explicit Channels rejections; never fabricate enrollment.
202
+ 3. Record command, exit, adapter commit, driver hash, binary hash, and content-free verdict for each local check. Private logs and artifacts stay mode 0600 beneath mode-0700 directories. Never use daemon vendor paths. Do not run auth-expired, boot-replay or production boot smoke. The reviewed full provider matrix is authorized within its isolated controller.
203
+ 4. Prepare the exact local issue draft and execute authorized provider gates with retained evidence. Leave version files and lockfile unchanged. Only after the mandatory issue and accepted matrix may a separately reviewed Orchestra pin change, release, and separately reviewed aligned Polygram consumer update proceed.
204
+
205
+ Rejected alternatives: update npm pins first (violates the gate); run the old .220/.283 matrix against .322 (wrong manifest and attestation); copy .283 expectations to .322 as accepted truth (hides drift); use only local unit counts (does not test native lifecycle/model behavior); use live HOME or daemon vendor paths (auth and GC hazards); update Codex alongside this work (separate ownership).
206
+
207
+ ## Gate ownership and data flow
208
+
209
+ At the initial read-only reference commit, the checked default runner compared **2.1.220 -> 2.1.283** with installed SDK **0.3.283** held constant and no .322 expectations. That accepted default remains unchanged. The related Polygram child now has a separate reviewed .283/.322 acceptance manifest with explicit immutable per-side SDK roots; it evaluates actual .283/.283 and .322/.322 pairs on one source commit. The old .283 expectations remain, .220 is absent from this separate manifest, and exact .322 expectations are source-backed and reviewed. Signed6cceb3b completed the full matched matrix23/23PASS. The old opt-in waiver remains explicit and old-only; there is no candidate waiver. Pin edits still wait for the real tracking issue and remaining requirements below.
210
+
211
+ Every scheduled matrix cell currently needs real inference: CLI contract twice per side; Workflow direct and fallback; delayed MCP default and, unless independently justified otherwise, opt-in; SDK PostToolBatch, subagent, resume, compaction and tool-less drain; candidate Opus projection and system-prompt snapshot. The binary Workflow anchors are statically inspectable, but their enclosing Opus projection still makes real calls. Existing snapshot NOT-APPLICABLE and opt-in waiver policy remain exact, evidence-based exceptions, not blanket exemptions.
212
+
213
+ Additional no-provider gates: `cli-api-error-stub.mjs` fail + inject + followup, fail + three injections, flaky recovery, subagent error attribution, retry interruption, 401, and folded input; `mailbox-two-roles.mjs --model stub`. Fixture validation and SDK type/API comparison can run locally. None establishes complete old/new lifecycle equality. The initial constant-old-SDK candidate experiment remains a failed crossed-pair observation. The completed matched matrix already verifies actual SDK0.3.322 before any pin move, using exact per-side resolution and imported-source proof.
214
+
215
+ ## Failure modes and verification
216
+
217
+ - Any unexplained new session/hook/queue/task/Stop/reply/wrapper shape blocks pin movement. Add a concrete red-then-green regression before changing adapters.
218
+ - Fresh HOME may lack account feature enrollment; a local stub gate that cannot reach readiness is blocked, not a compatibility regression and not a pass.
219
+ - A local fixture can prove transport/parsing only. It cannot prove real model choices, native provider tasks, snapshots enabled for an account, persisted consumer state, or deployment.
220
+ - Classify completed failures before another run and fix a definite cause before retrying. Do not repeat an ambiguous paid action without asking. Necessary planned upgrade batches remain authorized; no new batch approval is required.
221
+ - No provider credentials in reviewable files; no real conversations in any artifact. Read preserved binary evidence back after tests.
222
+ - Final independent review checks the actual diff and recorded outcomes. Documentation-only receipt updates add no behavior; the runtime correction retains concrete RED/GREEN regression evidence.
223
+
224
+ Completed: reviewed actual-pair matrix and full accepted23/23run on signed6cceb3b. Remaining mandatory gates: open the issue after publication approval; aligned SDK/CLI Orchestra pin change with tests and independent review; authorized Orchestra release; separately reviewed exact Orchestra + SDK Polygram update; authorized staging and **at least 24h SDK staging soak**, then coordinated VPS activation and **24h CLI soak**. Watch `autosteer-match-miss`, `autonomous-wakeup-message`, and `tool-only-completion`. No local result waives either soak.
225
+
226
+ ## Historical initial preparation results and review receipts
227
+
228
+ This section preserves the initial no-provider preparation record. Authorization,
229
+ execution and source-review facts in the current status above supersede the
230
+ initial outcome and next-call request below. The old reports remain retained.
231
+
232
+
233
+ Independent spec review receipts (built-in, one-shot, read-only): `spec_compatibility` CLEAN; `spec_scope` CLEAN; `spec_isolation` CLEAN after fixing non-temporary HOME and denying actual Keychain Mach services. The latter verified the correction against native lookup preflights, rather than trusting a daemon label. Compatibility review also singled out .321's queued-subagent empty results for explicit later investigation.
234
+
235
+ Research/evidence directory: `/tmp/orchestra-claude-upgrade-research-3agLJs` (mode 0700). Exact source and driver hashes are in `source-hashes.json`; commands and allowlisted fixture environments are in `local-check-results.json` and `focused-units-result.json`. Local harnesses are disposable evidence, not new checked gates or production implementation. No parent checkout was modified; the related child described above was created during followup.
236
+
237
+ | Verification reached | Actual result |
238
+ | --- | --- |
239
+ | Isolated focused Orchestra baseline tests | 250 passed; 0 failed/skipped, covering pin/vendoring, SDK process, CLI process, hooks, log tail and startup gate. Node 26.5.0; unchanged SDK 0.3.283. |
240
+ | Native SDK loopback SSE fixtures | Six PASS: successful one-turn reply and local-500 StopFailure for old pair, constant old SDK + candidate CLI, and candidate pair. No real inference. This is supplemental transport evidence, not the mandatory SDK matrix. |
241
+ | Sandbox preflight | External IP connect denied EPERM; loopback HTTP allowed; `security` execution and Keychain file access denied EPERM; SecurityServer/securityd.xpc/securityd.general lookups denied BOOTSTRAP_NOT_PRIVILEGED (1100). |
242
+ | Native version/help | Both exact versions attest; `--system-prompt-snapshot`, `--agent`, `--effort`, `--settings` still advertised. Flag existence proves no behavior. |
243
+ | Matrix planning functions only | Current checked manifest schedules 22 runs with two declared old-version opt-in waivers. Changing the in-memory pair to .283/.322 fails closed: no .322 expectations. No matrix driver or provider invoked. |
244
+ | Checked CLI API-error stub | BLOCKED, not PASS. With synthetic consent, .283 reaches readiness but Channels are unavailable, makes no `/v1/messages` call, then delivery disconnects. .322 stops at bypass consent when user settings are excluded. Remaining inject/followup, three-inject, flaky, subagent, interrupt, 401 and fold modes were not run after this prerequisite failed. |
245
+ | Checked mailbox stub | BLOCKED, not PASS. Initial attempts exposed Node ABI and IPC path-length setup errors; these were corrected locally with existing Node 24.4.0 and short non-temporary fixture HOME. .283 then starts both roles but disconnects before message delivery; .322 stops at the bypass-consent dialog. No parent native dependency rebuilt. |
246
+
247
+ Fixture corrections were recorded, not hidden: explicit CLAUDE_CONFIG_DIR originally put onboarding config at the wrong path; removing it fixed theme onboarding. Node 26 cannot load the parent's Node-24 better-sqlite3 binary, so mailbox uses the already installed Node 24. Long fixture paths exceed Polygram's 103-byte socket limit, so final mailbox homes use `/Users/ivanshumkov/.local/share/ocg/h-*`. The first supplemental SDK failure oracle wrongly assumed a non-success subtype: both versions emit `subtype: success, is_error: true`, fire StopFailure, then SDK iteration throws. The corrected supplemental probe asserts `is_error`, StopFailure and the SDK exception, and records the success subtype; initial results remain in the evidence directory. No candidate-only SDK transport difference was observed in these six simple probes.
248
+
249
+ The candidate consent result is consistent with the .314 release-note fix that settings excluded by `--setting-sources` no longer supply saved consent. Its bytes show consent migration to user `skipDangerousModePermissionPrompt`, and the stub driver explicitly excludes user settings. A clean fixture needs explicit synthetic consent in an included local/flag settings source; no adapter change or production consent migration is justified by this preparation. Missing feature enrollment is a separate blocker even after consent. Neither blocker was bypassed with real account caches or credentials.
250
+
251
+ Preserved old binary: `/Users/ivanshumkov/.local/share/orchestra-upgrade-preservation/claude-2.1.283-to-2.1.322-darwin-arm64/claude-2.1.283`; 225036032 bytes; SHA-256 `d8cb1e5c79684cc12a8bfc813e3a2073406921b6245744b3009be3ab5651d21e`; executable mode 0700; version `2.1.283 (Claude Code)`. Source was the parent's SDK platform package. Its neighboring `old-binary-attestation.json` and final `old-preservation-readback.json` independently record the same version/hash. This is a Mac arm64 preservation; Linux VPS rollback binaries still need preservation on those hosts before activation.
252
+
253
+ Candidate downloaded from `@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.322` official npm tarball with registry SHA-512 integrity verified: 323702464 bytes; SHA-256 `a9d237949db816a0b7afd88a9a8e1df36b3a597a30f5a41d1c0539eb180a3450`; version `2.1.322 (Claude Code)`; path `/tmp/orchestra-claude-upgrade-research-3agLJs/candidate/package/claude`. The temporary new SDK metadata also reads exactly 0.3.322 / 2.1.322. Neither executable was installed in a production vendor tree.
254
+
255
+ The six supplemental SDK checks call the public SDK directly. They do not exercise Orchestra's SdkProcess pending queue, queued subagent result batching, resume, compaction, provider task behavior or the full SDK matrix.
256
+
257
+ Outcome: preparation only. No runtime code or version pin changed, and no verified lifecycle correction is ready to integrate. All mandatory paid matrix, opened issue, release, consumer review, persistence, activation and both 24h soak gates remain open. The exact bounded next-call request is in `docs/CLAUDE_2_1_322_PROVIDER_GATE_REQUEST.md`; the final report is `/tmp/orchestra-claude-upgrade-report.md`.
258
+
259
+ Final independent diff/evidence review: `spec_isolation` CLEAN; `spec_compatibility` CLEAN after correcting assertion-versus-observation wording; `spec_scope` CLEAN after making the pending provisional-hypothesis bootstrap explicit before any discovery invocation. Reviewers examined the actual three-document diff and local evidence read-only. This initial review covered documents only. The followup adds independently reviewed gate-fixture source changes in the related child; production runtime remains unchanged and candidate compatibility remains unproven.
@@ -0,0 +1,100 @@
1
+ # Deterministic local stub tools
2
+
3
+ ## Current release integration — 2026-11-12
4
+
5
+ Published Codex Orchestra0.12.0 base706dab133bb2c696d34a950d8bdd4eebc22f02f5
6
+ is integrated by signed merge e086896 without conflicts or manual source changes.
7
+ All21upstream non-package changed files match that released base byte-for-byte;
8
+ accepted Claude SDK runtime SHA remains unchanged. Prepared aligned pin commit
9
+ f9ef1b8 follows bounded fix0664a00. Fresh main/npm showed0.12.0, so patch0.12.1
10
+ is selected for the reviewed correction and Claude SDK0.3.322/CLI2.1.322 pair.
11
+ The Orchestra publication hold has ended; PR/CI/OIDC release and exact registry
12
+ artifact verification are authorized and in progress. No deployment is performed.
13
+ Polygram consumer merge/version/publication remains held until coordinator supplies
14
+ its released0.46.0 base, then requires actual0.12.1 consumer artifact validation.
15
+ The accepted matrix23/23, existing runtime/focused receipts and strict focused
16
+ INCONCLUSIVE limits remain unchanged; no provider repeat or new gate is needed.
17
+ The coordinator owns staging and both mandatory24hsoaks. Earlier integration-hold
18
+ statements below are historical and superseded by this checkpoint.
19
+
20
+
21
+ ## Publication and integration checkpoint — 2026-11-12
22
+
23
+ Ivan authorized publication and planned rollout. Tracking issue
24
+ [Polygram #133](https://github.com/shumkov/polygram/issues/133) is OPEN; its complete
25
+ body was authoritatively read back and verified. The accepted matched matrix
26
+ remains 23/23 on signed gate 6cceb3b. Bounded runtime correction is signed commit
27
+ 0664a00dea8b1b4fd1f8c3ff803683171b2c69d8, preserving its exact tested source.
28
+ Local SDK 0.3.322 / CLI 2.1.322 pins and generated lock metadata are now prepared
29
+ and independently reviewed CLEAN by compatibility, isolation and scope reviewers.
30
+ Installed candidate entry/package/binary hashes equal the accepted matrix pair.
31
+ Focused local checks: 425 PASS, 0 FAIL, 19 existing capability skips; full corrected
32
+ runtime suite before the pin metadata change: 1,560 PASS, 19 existing skips.
33
+ No new provider call was made. Strict focused traces remain INCONCLUSIVE within
34
+ the accepted limits and no extra provider loop is mandatory.
35
+
36
+ Codex owns Orchestra 0.12.0. Claude release version/tag/main integration waits
37
+ for its authoritative published base; this worker does not deploy. Orchestra's
38
+ package version remains 0.11.3 only as unreleased branch metadata, never a release
39
+ claim. Consumer dependencies remain the coherent .283 pair until the actual
40
+ subsequent Claude Orchestra artifact exists. The existing consumer contract now
41
+ also verifies installed SDK/CLI metadata and shared physical SDK resolution;
42
+ 3/3 checks pass on that current .283 installation. Artifact-backed .322 consumer
43
+ update and independent diff review, Linux rollback preservation and both 24-hour
44
+ soaks remain. Earlier authorization/pin-status statements below describe their
45
+ historical checkpoints and are superseded by this section.
46
+
47
+
48
+ The guarded native-auth fixtures now reach Channels and loopback model requests
49
+ on both versions. fail and401 pass both. Flaky recovery passes old; candidate
50
+ returns the fixture's fallback "ok" with tools15/has_reply_tool=false, instead of
51
+ receiving the scripted reply tool, so the recovered-reply assertion fails. This
52
+ is a definite fixture-protocol mismatch, not proof of provider/adapter failure.
53
+ The original failed trace stays immutable. Actual real-provider CLI contract
54
+ observations pass candidate reply delivery without changing tool search.
55
+
56
+ Official docs explain the change: tool search is enabled behind a gateway by
57
+ default since2.1.304; before then it was disabled unless explicitly enabled.
58
+ ENABLE_TOOL_SEARCH=false loads all tools upfront. Sources:
59
+ https://code.claude.com/docs/en/mcp#tool-search-through-an-llm-gateway
60
+ https://code.claude.com/docs/en/env-vars.md . This matches old33 vs candidate15
61
+ tools and the missing reply tool, but must still be tested, not assumed.
62
+
63
+ Use a separate private controller derivative for LOCAL model stubs only, adding
64
+ one allowlisted environment constant ENABLE_TOOL_SEARCH=false. Do not change
65
+ checked drivers, runtime, full-matrix environment, OAuth/Channels controls or
66
+ oracles. Keep all credentials native inside owned synthetic HOME and exact
67
+ loopback endpoint; preserve default controller/failed receipts. Mailbox real mode
68
+ remains refused before auth read. Controller's explicit allowlist may include
69
+ existing fold/subagent, inject-count, interrupt-after and agent selectors for the
70
+ README-mandated local cases; unknown/duplicate/real options remain rejected.
71
+
72
+ This tests API-error/retry/queue/IPC plumbing with deterministic eager tool
73
+ registration. It does not establish default deferred-tool discovery compatibility;
74
+ that remains covered only by applicable unchanged real-provider cells. Implementing
75
+ a mock ToolSearch protocol was rejected as unnecessary fixture complexity. A
76
+ blanket runtime setting or feature-success override was rejected because that
77
+ would hide the default protocol behavior. No feature cache/flag enrollment is
78
+ forged, and no new proxy or metering infrastructure is introduced.
79
+
80
+ Validation is red-to-green against the concrete native-candidate-api-flaky-a
81
+ retained FAIL: repeat only after changed supported context, require actual local
82
+ requests to carry reply tool, recover after exactly scripted failures and deliver
83
+ one bridge reply with no StopFailure. Compare old the same way, then execute
84
+ README local cases and mailbox with their existing deadlines. If the different
85
+ tool setting does not restore the request contract, stop and investigate rather
86
+ than relaxing the oracle. All outcomes remain supplemental local fixtures;
87
+ no count replaces the mandatory full old/new acceptance matrix or either soak.
88
+
89
+
90
+ The candidate eager flaky observation now passes (eager-candidate-api-flaky-a):
91
+ actual streaming requests carry33tools with the reply tool, two scripted500s
92
+ recover to200, one bridge reply arrives, StopFailure absent. Same controller old
93
+ flaky passes. This is the retained red-to-green fixture proof; no checked-source
94
+ change or production tool setting was needed. The initial mailbox attempts in
95
+ the child failed before any model turn because its installed12.10.0SQLite native
96
+ binding was missing. npm rebuild better-sqlite3 in the child only restored its
97
+ own matching Node24/ABI137 binding, with in-memory SELECT1 proof and SHA recorded;
98
+ parent's different12.11.1 package was not copied or changed. Old mailbox then
99
+ passes7/7 under defaults; candidate default returns no ask, consistent with the
100
+ missing reply/IPC tool schema. Eager mailbox passes7/7 on both versions. The mandatory inject/followup, three-injection, subagent, interrupt and fold-mode checks also PASS both; original failures remain retained.
@@ -0,0 +1,45 @@
1
+ # Provider-specific Codex authentication correction
2
+
3
+ ## Problem and source cause
4
+
5
+ Base Orchestra 0.12.1 (`8457bd6`) and Polygram 0.46.1 (`06ba700`) retain the reviewed Codex 0.167.2 runtime and current Claude changes. Polygram's proxy renderer sets `requires_openai_auth = true`; Orchestra preflight/receipt and Polygram catalog then require a ChatGPT account even when inference uses CLIProxy. This blocks the intended VPS proxy deployment unless unrelated native credentials are provisioned. The user explicitly corrected that requirement: CLIProxy owns upstream auth; no Mac auth transfer or native login.
6
+
7
+ Pinned official source `openai/codex` tag `rust-v0.167.2` establishes:
8
+
9
+ - `model-provider/src/provider.rs::account_state` returns `account: null, requiresOpenaiAuth: false` for the external provider, independent of native account presence.
10
+ - `model-provider/src/auth.rs::resolve_provider_auth` selects the configured provider bearer before native auth; `bearer_auth_for_provider` accepts the existing private bearer mechanism.
11
+ - `model-provider/src/models_endpoint.rs::supports_api_key_models` and `models-manager/src/manager.rs::should_refresh_models` leave this custom provider on bundled model metadata. `model/list` is runtime capability/catalog evidence, not external credentials or entitlement validation.
12
+
13
+ Current official guidance: https://learn.chatgpt.com/docs/config-file/config-reference and https://learn.chatgpt.com/docs/app-server; pinned source is authoritative for the exact runtime. The existing CLIProxy v8.0.4 route authenticates its own client bearer and owns upstream credentials; no native client token is necessary.
14
+
15
+ ## Smallest correction
16
+
17
+ 1. Polygram renders only its already supported named, loopback Responses CLIProxy provider with `requires_openai_auth = false`, retaining private key-file checks, exact configuration hashing, deployment fingerprint fencing and no fallback.
18
+ 2. Orchestra derives auth expectations from the already attested `expectedConfig.modelProvider`; add no configuration option, auth framework or provider discovery. Native `openai` requires ChatGPT plus `requiresOpenaiAuth: true`. CLIProxy requires exactly null account plus `requiresOpenaiAuth: false`. Missing/malformed/mismatched fields fail before model discovery. The account/read wire projector must require an own `account` field and accept explicit null, not normalize omission to null. This is a local fail-closed requirement matching the pinned Rust emitter and TypeScript type; generated JSON Schema alone does not require the field.
19
+ 3. Preserve native public receipt and spawn-profile identity. External preflight uses the distinct truthful state `auth: { authenticated: false, accountType: null, requiresOpenaiAuth: false }`: no OpenAI account was authenticated and external bearer validity has not been inferred from config/catalog. The existing attestation identifies `cliproxyapi`; spawn identity uses null account type alongside that exact provider/config identity. Receipt creation validates the appropriate tuple and retains the successful-result WeakSet provenance requirement.
20
+ 4. Polygram's catalog accepts/project-preserves exactly that provider-specific tuple, selected against the expected profile and authenticated branded Orchestra receipt. It never relabels an external provider as ChatGPT or claims a catalog is external entitlement proof. Native missing auth and cross-provider receipt/account mismatches still fail and invalidate cache.
21
+ 5. Amend the prior Polygram minimal spec's CLIProxy paragraph and affected runtime compatibility docs to replace the obsolete native-login requirement. Preserve existing limited/trusted policies, skills/instruction binding, native mode, hooks, launcher and process lifecycle contracts. No production configuration, services, login stores, package pins or release versions change here.
22
+
23
+ Alternatives rejected: provision native ChatGPT credentials (contradicts requested routing and transfers unrelated auth); bypass all account checks (loses provider mismatch fencing); add a generic provider-auth framework or new login mechanism (unnecessary); call model/list an authenticated entitlement check (false for the pinned runtime); add a paid turn to ordinary preflight (unnecessary recurring cost).
24
+
25
+ ## Regression and verification
26
+
27
+ Write focused tests first and observe RED on current source: no-native-account CLIProxy preflight/receipt and consumer catalog, plus owned provider config rendering. Then implement and observe GREEN. Existing native success remains byte-compatible; null/missing/wrong account, wrong boolean, cross-profile auth, forged/cloned receipt, static routing/key drift and cache invalidation paths must reject. Reuse existing tests and fixtures, no general harness.
28
+
29
+ After deterministic gates, use existing exact 0.167.2 binary/helper and a private isolated workspace/home with no auth.json or native credential env. Prove synthetic loopback fixture tool execution/routes and failure-without-native-fallback first. Then run ONE fresh real CLIProxy Astra lane, at most two logical turns, using its existing bearer only, safe synthetic root instruction/skill/memory and fresh-process resume. Never transfer native auth or access real business/memory data. Stop on paid failure/ambiguity; report attempts/completions separately. No repeated native/provider/Claude matrix. Source remains uncommitted for coordinator integration, no publication/deployment. Recommended eventual patches: Orchestra 0.12.2 then Polygram 0.46.2 (subject to fresh registry state).
30
+
31
+ ## Independent design review
32
+
33
+ Two read-only reviews (security/failure modes and feasibility/scope/native compatibility) approved the three-field tuple and unchanged native hashing. Both required the explicit-account wire guard plus raw-response regression; this amendment is included above. No general auth framework, separate public auth field or additional inference in preflight is needed.
34
+
35
+ ## Verification result and release handoff
36
+
37
+ Focused regressions were RED on the unchanged bases (Orchestra four failures; Polygram three failures), then GREEN after the provider-specific correction. Final full unit suites on Node 26.5.0: Orchestra 1,618 passed, zero failed, 19 existing capability N/A skips; Polygram 4,829 passed, zero failed, 16 opt-in skips. The actual pinned Darwin ARM64 runtime/helper completed an empty-auth-home loopback tool/resume/steer/event-delivery fixture. A separate synthetic 401 fixture failed closed without native auth: one logical turn, zero successful completions, six internal HTTP attempts. Two independent source reviews cleared the final auth diff; a probe callback cleanup finding was corrected and re-reviewed.
38
+
39
+ The single authorized real CLIProxy Astra lane used the existing private VPS bearer through an owned SSH forward, no native auth source read/copy, isolated HOME/CODEX_HOME and controlled environment. Two provider turns returned successful terminal results. The first proved actual tools, canonical root instruction consumption, discovered skill-body consumption and unprompted synthetic memory. The second proved fresh-process resume and semantic steering, then failed the additional assertion that its final answer contain a memory nonce edited between turns. Overall probe outcome remains **failed**; no paid retry was made. The old harness counter incremented after that assertion and reported one completion; its source-ordered path proves two successful provider completions, and counting now occurs before semantic assertions. Raw and explicitly corrected reports are preserved separately under `/tmp/codex-proxy-auth-evidence/`.
40
+
41
+ The fixture's root instruction says to read shared memory before answering a calibration request. Shumabit's canonical root AGENTS.md likewise requires explicit matching per-chat memo reads at each Telegram turn. Retained evidence establishes omission of the edited nonce, not whether the model reread the file or reused an old value; the synthetic tool/transcript tree was removed during private cleanup. This patch changes provider auth admission only, not instruction binding or memory loading; no patch-caused memory regression is established. Edited-memory freshness remains unproven and is not relabeled PASS.
42
+
43
+ The temporary real bearer, owned credential-bearing test tree and SSH forward were removed; remote bearer hash was unchanged. Native auth contents were never read, and native auth file metadata remained unchanged. No production configuration, services, installed packages or source commits changed.
44
+
45
+ Recommend ordinary patch releases Orchestra **0.12.2**, then Polygram **0.46.2** consuming that exact release (registry still 0.12.1/0.46.1 at handoff). Latest bases retain Claude SDK 0.3.322 and CLI default 2.1.322 unchanged. For a later VPS CLI-only activation that must keep running Claude 2.1.283, use the existing `ORCHESTRA_CLAUDE_BIN=/home/shumabit/.local/share/polygram/claude-bin/2.1.283` override before daemon startup, retaining the existing CLI routing and exact proxy/session launcher. `ensureVendoredClaudeBin` returns this executable override before vendoring/GC/installation, so default .322 selection cannot replace the active .283 path. The actual VPS file still reported 2.1.283 during read-only verification. Verify the selected executable/version, not the startup log's default pin label. Do not enable SDK routing under this path: the new packages contain SDK .322, while no new VPS SDK admission/soak is proved. If preserving the *installed SDK package* at .283 is also mandatory, these latest-base packages cannot meet that additional condition unchanged; an ordinary maintenance backport is needed instead. No such pin changes or deployment are made here.
@@ -96,7 +96,10 @@ stop requiring a reviewed spec amendment, not an extra accepted hash or stripped
96
96
  unknown fields. Native memories remain disabled; shell inherits none, login false,
97
97
  trusted actual service HOME/explicit PATH; limited mode retains its existing synthetic
98
98
  command HOME and controlled PATH. CLIProxy remains optional, loopback Responses, private
99
- bearer, requires_openai_auth=true, supports_websockets=true, no native fallback.
99
+ bearer, requires_openai_auth=false, supports_websockets=true, no native fallback.
100
+ The provider-specific auth correction in CODEX_PROXY_AUTH_FIX_SPEC.md supersedes
101
+ the initial requirement to keep native ChatGPT auth for CLIProxy; native OpenAI
102
+ mode still requires its ChatGPT account.
100
103
 
101
104
  ## Verification and failure handling
102
105
 
@@ -117,9 +120,9 @@ rollout can resume under candidate, retaining an untouched old copy.
117
120
  At least one candidate fixture must traverse production preflight -> spawn receipt
118
121
  -> factory/CodexProcess -> acknowledged on-disk checkpoint sink, with authoritative
119
122
  checkpoint readback; a no-op client sink cannot establish this integration layer.
120
- Credential-free fixture-only providers may set requires_openai_auth=false; that
121
- exception never clears production native ChatGPT-auth admission, which is proved
122
- separately using the exact native/CLIProxy policy.
123
+ Credential-free fixtures and explicit bearer-authenticated CLIProxy set
124
+ requires_openai_auth=false; native OpenAI retains ChatGPT-auth admission.
125
+ Model catalogs alone never establish external provider entitlement.
123
126
  3. Hooks: run existing hooks-on/off production-client gate against candidate; raw
124
127
  inventory characterization before exact verifier update, red/green fixture tests,
125
128
  negative metadata tests, trusted inventory and content-free event dropping.