Repository navigation
fix(sdk): persist canceled scans with their measured cost - #2307
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50017a466d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
alandelong-oai
left a comment
There was a problem hiding this comment.
Thank you for preserving canceled scan status and measured cost. No blocking findings in this owner-level merge-safety review. Durable lifecycle and hosted receipts now agree while retaining executor diagnostics and usage, deadline failures, uncertain acceptance, and previously committed outcomes.
Nine focused lifecycle checks and 18 additional hosted-status combinations passed locally; builds, types/schema, and formatting passed. Current-source CI passed all 84 hosted-scan cases and eight installed-package jobs. The remaining local fixture failure reproduces on the exact base with the same filesystem ownership diagnostic; the full CI run is still in progress.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
Preserve the contributor history and take main's registered scan cancellation and cost semantics from openai#2307. Keep the independently verified native terminal event ordering correction and shared component lifecycle test.
Summary
Canceling a registered SDK scan could leave it marked failed in saved history and lifecycle telemetry. A hosted scan could also return a canceled receipt while reporting failure for the same scan ID in local history. This affects dashboards and integrations that count failures or decide whether to retry.
Changes
Testing
All 97 hosted and mock SDK cases passed, including comparisons against the real SQLite lifecycle, along with 13 focused budget and tracking cases and 43 Python cancellation, archive and migration cases. The SDK typecheck and the complete installed-package smoke passed on the final code. The packed tarball contained 881 entries. The smoke installed the packed tarball in a clean consumer and exercised SDK and CLI lifecycle, direct Deep Scan, worker retry, restart and finalization.
Risk and rollout
The status change affects SDK observers, saved scan history and hosted receipts. Existing completed scans keep their committed result. Older external workbenches that can store cost only with a failed transition retain that behavior. No database migration or public CLI option is required.
Public disclosure review