Skip to content

fix(deep): fence stale publication and preserve replay - #916

Open
mldangelo-oai wants to merge 5 commits into
mainfrom
mdangelo/codex/phase1-stale-publication
Open

mldangelo-oai wants to merge 5 commits into
mainfrom
mdangelo/codex/phase1-stale-publication

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

A replaced Deep coordinator can publish an obsolete aggregate over a newer result. Check the current coordinator generation and selected reducer under the completion lock, while preserving partial checkpoints and replay after an output-write failure.

Changes

  • Carry host-selected publication metadata separately from model-authored checkpoint data.
  • Keep metadata-free partial drafts working after coordinator adoption; reject stale final publication before changing canonical files or checkpoints.
  • Select reducers by their worker-directory sequence, including when timestamps tie or move backward and ancestor directories contain reducer-like names.
  • Retain the original terminal cause and immutable checkpoints when replaying validated results.

Testing

Validation for 4a5983f7aac613131d2ee8eec12a6b5170857136:

  • Linux: 220 affected Python tests and 52 SDK recovery/workbench tests passed. The nine real MCP/store publication cases pass; the unchanged parent has five passes and four expected failures. Tests started before the final commit used the same file bytes, verified against the commit.
  • macOS: seven authority tests, nine publication integration cases and five independent path-collision cases passed with clean source. The original collision reproduction had three passes and two failures.
  • All five portable checks passed: Ruff lint/format, SDK build:ci, plugin source compatibility and its Node tests. SDK/MCP types, formatting and plugin build passed.
  • Full MCP run: 53 passed and two package-setup failures. After restoring matching build prerequisites and building the plugin, both affected tests passed. The original dependency/build failures remain recorded; this was a full run plus targeted retest.

Three fresh native source reviews and independent verification found no actionable issues. CI passed on this head. Hosted review reported a partial-publication race; independent real-store tests rejected the claimed public-tool path in both request orderings. The source and scope-limited disposition are recorded in the review thread. Reviewer runtime limitations are separate from the successful qualification above.

Risk and rollout

Generation-one drafts retain their supported path. Adopted coordinators must provide their current generation and selected result for final publication. There is no schema migration, new command or new retry layer. Recovery after a lost host response is a separate dependent change; this PR covers publication fencing and workbench replay. Unclaimed legacy generation-one drafts and direct lower-level writes without the public digest contract remain separate compatibility paths; the hosted-race disposition does not claim to fence every trusted local invocation.

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 Sep 12, 2026
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, ef9e2ab03da7adb57b35cbd0f85d4690ec1f1b76.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 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-09-16T11:22:31.520869Z 4a5983f Draft marked ready
🔒 Security Review Completed 2026-09-16T11:25:39.775126Z 4a5983f Draft marked ready
ℹ️ 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

Copy link
Copy Markdown

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

Reviewed commit: ef9e2ab03d

ℹ️ 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 the current head, 0e623ac2ffc7d4d535268235144e6e9346424988.

@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: 0e623ac2ff

ℹ️ 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 plugins/codex-security/scripts/workbench_saved_results.py
Comment thread plugins/codex-security/scripts/workbench_saved_results.py Outdated
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, 4a5983f7aac613131d2ee8eec12a6b5170857136.

@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: 4a5983f7aa

ℹ️ 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 plugins/codex-security/scripts/workbench_saved_results.py
@mldangelo-oai
mldangelo-oai marked this pull request as ready for review September 16, 2026 11:19
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.

1 participant