Skip to content

fix(cli): keep optional update notices nonblocking - #409

Merged
mldangelo-oai merged 2 commits into
mainfrom
mdangelo/codex/nonblocking-cli-update-notices
Aug 14, 2026
Merged

fix(cli): keep optional update notices nonblocking#409
mldangelo-oai merged 2 commits into
mainfrom
mdangelo/codex/nonblocking-cli-update-notices

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Summary

Keep optional update checks from delaying CLI output or leaving registry requests active after a command finishes.

Changes

  • Pass a command-scoped cancellation signal to the existing npm update check.
  • Preserve its existing bounded registry timeout while honoring command cancellation.
  • Display an update notice only when it is already available after command execution.
  • Abort unfinished checks on successful and exceptional command completion.
  • Add focused regressions for caller cancellation and an update check that never settles.

Testing

  • Confirmed the caller-cancellation regression failed before the production change.
  • bun test tests-ts/update-notice.test.ts tests-ts/cli.test.ts tests-ts/cli-signals.test.ts tests-ts/cli-authentication.test.ts --timeout 30000 (168 passed).
  • Re-ran bun test tests-ts/update-notice.test.ts --timeout 30000 after the final simplification (11 passed).
  • pnpm --pm-on-fail=ignore run types.
  • prettier --check src/cli.ts src/version.ts tests-ts/cli-fixtures.ts tests-ts/update-notice.test.ts.
  • git diff --check.

Risk and rollout

Only optional update reporting changes. Ready notices, registry configuration, command output, credential handling, signal behavior, timeout limits, and suppression for CI, help, dry runs, and noninteractive output remain covered.

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.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

@github-actions github-actions Bot added the bug Something isn't working label Aug 14, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 776baaefc2

ℹ️ 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".

Comment thread sdk/typescript/tests-ts/update-notice.test.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 776baaefc2

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 776baaefc2

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: a5fde56af6

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: a5fde56af6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@zcrab-oai zcrab-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Optional update notices remain nonblocking and unfinished registry requests are canceled without affecting command results.

@mldangelo-oai
mldangelo-oai merged commit edfe3a7 into main Aug 14, 2026
53 of 57 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/nonblocking-cli-update-notices branch August 14, 2026 17:12
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