Skip to content

fix(plugin): persist large scan usage at completion and failure - #1874

Merged
mldangelo-oai merged 1 commit into
mainfrom
mdangelo/codex/scan-usage-persistence
Oct 23, 2026
Merged

mldangelo-oai merged 1 commit into
mainfrom
mdangelo/codex/scan-usage-persistence

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Summary

Valid scan usage above 8 KiB could prevent completion or failure from being recorded, leaving a scan marked as running. Remove the serialized-size ceiling so terminal state and complete usage are saved together.

Changes

  • Remove the byte-size check while retaining JSON structure, finite-value, token-accounting, ownership, and continuation validation.
  • Cover explicit usage on completion and failure, plus usage collected from owned rollout snapshots.

Testing

  • All three new regressions failed against the original implementation and passed with the fix.
  • Full scan-usage suite: 149 passed, 2 skipped.
  • Frozen SDK and MCP dependency installs passed; installed lockfiles match the tracked lockfiles.
  • Required plugin checks passed in order: Ruff check, Ruff format check, SDK build:ci, portable source compatibility, and its nine regression tests.
  • git diff --check passed.

Risk and rollout

The change accepts larger valid usage records without changing their schema or scan ownership requirements. User-selected cost limits remain enforced. No migration or new configuration is required.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the bug Something isn't working label Oct 23, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T08:24:16.848571Z 3c3be40 PR opened
🔒 Security Review ✅ Completed 2026-10-23T08:25:09.240719Z 3c3be40 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing large usage persistence. Reviewed both changed files and the completion, failure, usage-reconciliation and cost-limit paths; no actionable issue. Removing the size ceiling preserves the existing usage validation and scan ownership checks.

Fresh checks, builds, types, formatting, 19 focused usage tests and the new failure-state regression passed. Independent base/head controls confirmed large valid records remain intact and malformed records remain rejected. The two completion regressions hit the unchanged ownership guard locally; current hosted macOS CI separately passed all 151 scan-usage cases, including all three new regressions.

@mldangelo-oai
mldangelo-oai merged commit e2c5a47 into main Oct 23, 2026
65 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/scan-usage-persistence branch October 23, 2026 17:25
@github-actions github-actions Bot mentioned this pull request Oct 23, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants