Repository navigation
feat(sdk)!: expose native worker spawn attempts separately - #2679
Open
mldangelo-oai wants to merge 13 commits into
Open
mldangelo-oai wants to merge 13 commits into
mldangelo-oai wants to merge 13 commits into
Conversation
Build on the spawn observer in #2607. Preserve the observed-session callback, and parse native parent spawn items only when an SDK caller opts in. BREAKING CHANGE: exhaustive onObserverError name handlers must handle onWorkerSpawn. Co-authored-by: Aditya-linux <[email protected]>
(cherry picked from commit 5ce7e7c)
mldangelo-oai
marked this pull request as ready for review
November 15, 2026 15:26
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expose native worker spawn attempts through a separate SDK observer. This is a parallel proposal to #2607. The reliable file-review timing signal requested in #956 remains open. Callers can continue to use
onWorkerEventto observe persisted worker sessions.Changes
onWorkerSpawncallback and exportScanWorkerSpawnEvent. Dispatch and subsequent failure share an attempt number; a completed call can supply the first notification when its start was missed.ScanWorkerEventinterface, and document both callbacks in the SDK guide and package-consumer fixture. Maintainers can use the updated example on the published SDK callback guide.Testing
Current head
4c614a43merges current main. Relative to tested head172024f5, only two upstream workflow installer pins changed. The product source, package inputs and dependency manifests are unchanged. The affected actionlint and zizmor checks passed on the new head; unchanged example-workflow and shell-script checks retain their earlier results with identical inputs and tools.Validation previously run on
172024f5used pnpm 11.25.0, Bun 1.4.4 and Node 22.13.0:build:ciandbuild:pluginpassed. Canonicaltest:mcppassed: 2,004 passed, 38 skipped, zero failures.12345, followed bytypes,formatand the default-ordertest:cirun, passed. Each full run reported 13,267 passed, 176 skipped, one todo and zero failures across 345 files. The default run used seed781026880and produced JUnit and coverage reports.pnpm packand the two-argument package-content check passed for all 1,249 archive files. The one-argument installed-package checks passed on Linux with Node 22.13.0, 24.0.0, 24.22.3, 26.0.0 and 26.13.1; Node 22.13.0 also exercised Deep Scan retry.These results are reused after comparing the consumed source, tools, dependencies and retained reports. They were not rerun for the main-branch merge. Source CI on
172024f5also passed, including the Linux, macOS and Windows installed-package consumers and production audit. Its consumed merge4c1eb9f9has the same source tree as172024f5.The local
audit:prodattempt returned HTTP 405 from the configured registry; that failure remains separate from the successful hosted audit. No registry configuration was changed. Hosted checks and audit for the new head remain required after publication.Historical acceptance on
a2c58356used Codex 0.167.1 and a synthetic loopback provider. It covered native v1 dispatch and rejection, v2 parent-stream silence, hook denial, observer isolation, concurrent scans and the post-scan boundary; missing-start and duplicate-item coverage used replay. This was an earlier runtime acceptance run. The current dependency is Codex 0.171.0.Earlier source CI consumed merge commit
36425c03, whose source tree equalse229aa1f. The initial Windows shard 3 job passed its main shard and then failed a separate UNC-path check at its timeout. Attempt 2 reran that job and the aggregate successfully. Other jobs retain their attempt 1 results. The later172024f5CI run passed the same UNC-path check.Risk and rollout
Delivery is best effort. A v1 attempt can fail, and v2 can accept or reject a child without emitting the parent-stream item. The callback cannot confirm that file review started or veto dispatch. A phase-qualified signal that file review has started, with bounded delivery or ordering, remains open in #956.
This is a breaking type-level change for consumers that exhaustively switch on
onObserverErrorsource names:onWorkerSpawnis now a possible source. Existing worker-session callback payloads remain unchanged. No public CLI surface changes.Public disclosure review
The available logs, artifacts and service outputs were inspected. One replaced Windows report and 24 original Code Quality SARIF outputs were unavailable, so their contents are not claimed reviewed. The separately available Code Scanning exports were inspected.