Repository navigation
fix(sdk): report worker sessions without model progress markers - #962
Conversation
Add a bounded onWorkerEvent observer with shared scan-local worker numbers and dispatch deduplication. Keep marker-derived phase status compatible and document its best-effort delivery. Requires the corresponding Codex runtime event release before shipping.
|
@codex review Please review head |
Codex Review SummaryThis 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. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
zcrab-oai
left a comment
There was a problem hiding this comment.
Reviewed the diff and relevant surrounding code at 1b7111e, with an independent second pass. No obvious correctness or regression issues found. Full local platform suites were not rerun. CI still has failed, canceled, or unfinished checks; those results remain separate from this source-review approval.
Summary
SDK callers need to know when a scan has delegated work to additional Codex sessions, even when the model emits no progress markers. Add an optional
onWorkerEventcallback that reports worker sessions discovered in saved session data, using the existing session tracker and bundled Codex version.Changes
ScanWorkerEventand deliver{ kind: "observed", worker: number }once per discovered session per run. The scan-local worker number matches activity and session callbacks.onObserverErrorwithout stopping the scan, and stop observing workers before post-scan instructions run.Testing
Recorded SDK checks at
1b7111eduse fixtures that create saved worker metadata without status markers or usage records, then verify one event per worker even after duplicate files and repeated polls. Model text resembling session metadata and sessions belonging to another scan produce no worker events. Separate cases cover concurrent scans, resume, nested workers and consistent numbering across callbacks.Orchestration tests hold the scan open until the worker event arrives, exercise synchronous and asynchronous observer failures, and verify that post-scan workers are excluded even when the scan or follow-up fails or is interrupted. The installed-package consumer also checks that the callback and event type are exported.
To repeat the focused checks with SDK dependencies installed, run from
sdk/typescript:pnpm run build:plugin bun test --timeout 30000 tests-ts/api.test.ts tests-ts/cost.test.tsThe full SDK fixed/random pair was not run locally at this head. Native Windows and macOS execution was not performed.
Risk and rollout
The callback is optional. Persistence and polling can delay delivery, and an observed session does not establish when the worker started or whether file review has begun. It does not report failed dispatch attempts or gate worker creation; use the existing signal and cost controls for cancellation. Existing worker-status callbacks remain available, and no migration is required.
Public disclosure review