Skip to content

fix(publish): retain recovery guidance on canceled uploads - #680

Open
mldangelo-oai wants to merge 7 commits into
mainfrom
mdangelo/codex/cloud-cancellation-recovery
Open

fix(publish): retain recovery guidance on canceled uploads#680
mldangelo-oai wants to merge 7 commits into
mainfrom
mdangelo/codex/cloud-cancellation-recovery

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Keep the caller's cancellation reason without losing Cloud upload recovery guidance. An interrupted upload may already have been accepted, so the CLI must still tell users to check Cloud before retrying.

Follow-up to merged #677. Its caller-cancellation change stays unchanged; this PR preserves the matching CLI recovery behavior.

Changes

  • Track whether the current scan reached the POST through the publisher's existing fetch hook, resetting that state for each batch entry.
  • Keep check-before-retrying guidance in CLI diagnostics and batch failure records instead of exposing only SIGINT or SIGTERM.
  • Exercise the real Cloud publisher through the CLI for preflight, request, and receipt cancellation, single and batch uploads, and both termination signals. Verify confirmed receipts survive, remaining scans are not attempted, and no request is retried.
  • Keep picker cancellation, CSV/local-artifact loading, and canceled dry runs free of upload-recovery warnings before any POST starts.
  • Merge current main, retaining both the Cloud fetch hook and the custom publication dependency.
  • Make patch browser keyboard tests wait for React updates instead of fixed delays, fixing the macOS CI race when submitting the draft-PR option.

Testing

  • Bun 1.3.14, seed 1271635550: 136 tests passed across cloud-publish.test.ts, cli-cloud-publish.test.ts, cli-publish.test.ts, and patch-tui.test.ts.
  • Repeated all nine patch browser tests 25 times with the failing macOS CI seed: 225 passed, with no React synchronization warnings. All existing assertions remain in place.
  • Built CLI smoke test on Node 24 against a local HTTP fixture: real SIGINT and SIGTERM during both the request and receipt phases retained recovery guidance, exited with 130/143, and made only one POST.
  • pnpm run check:plugin-source, pnpm run types, pnpm run format, and pnpm run build: passed.
  • pnpm pack and pnpm run check:package: passed. Verified 390 archive entries, installed imports and NodeNext types, CLI startup, credential locking, 122 bundled plugin files, MCP initialization, the bundled runtime, dashboard assets, and a nested worker without a global runtime installation.
  • Local environment checks: the process-group test passed with normal process permissions. Three temporary-path fixture failures reproduced on unchanged main and passed on both branches with canonical temporary directories, matching CI's environment.
  • git diff --check: passed. Full platform verification is tracked in the PR checks.

Risk and rollout

The production change is limited to cancellation propagation and error presentation. It adds no public flags, configuration, dependencies, or retry behavior. Cancellation still exits with 130 for SIGINT and 143 for SIGTERM; confirmed receipts and unattempted batch entries are preserved. Picker, dry-run, and Linear cancellation behavior remain unchanged. The recovery message is conditional and does not claim that an upload was accepted. The CI fix changes test synchronization only.

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 Aug 27, 2026
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review head 8e28127, especially cancellation propagation, single/batch CLI recovery guidance, and preservation of confirmed receipts. The new integration cases failed before the CLI fix; all 115 focused publication tests, typechecking, formatting, and build now pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 27, 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-08-28T23:03:11.279073Z 90554d1 Manual request
🔒 Security Review Completed 2026-08-28T23:00:50.544788Z 90554d1 New commits
ℹ️ 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.

@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: 8e28127ab7

ℹ️ 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/src/cli.ts Outdated

@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: 3b04e0425e

ℹ️ 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/src/cli.ts Outdated
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

Please review current head f57a29a. The original fix in #677 is now merged, so this PR changes only CLI recovery presentation and tests. Request tracking now begins at the POST boundary and resets between batch entries. All 118 focused tests, typechecking, formatting, build, and real-signal CLI smoke tests pass.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: f57a29a607

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

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head a0b95f6. The merge with main preserves both the Cloud fetch hook and the custom publication dependency. Please check cancellation recovery guidance and publication compatibility.

Validation passed: 127 focused publication tests, plugin source checks, typechecking, formatting, build, package and installed-runtime checks, and built CLI smoke tests with real SIGINT and SIGTERM during requests and receipts. The full local suite and fresh platform CI are running.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: a0b95f679f

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

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head 90554d1. This adds the latest main and fixes the macOS CI race in the patch browser tests by flushing React updates after keyboard input instead of sleeping for 60 ms. The Cloud recovery implementation is unchanged from the previously reviewed head.

All 136 combined publication and UI tests pass. The complete patch browser suite passed 225 checks across 25 repetitions using the failing CI seed, with no React synchronization warnings. Typechecking, formatting, and plugin source compatibility checks pass. The full local suite and fresh CI are running.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 90554d1cc4

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

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