Skip to content

fix(deep-scan): recover publication after a lost reply - #938

Open
mldangelo-oai wants to merge 85 commits into
mainfrom
mdangelo/codex/deep-publication-response-loss
Open

mldangelo-oai wants to merge 85 commits into
mainfrom
mdangelo/codex/deep-publication-response-loss

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Recover the saved result when publication succeeds but its response is lost.

Depends on #916.

Changes

  • Use the durable acknowledgment to recover the accepted publication.
  • Preserve contract errors and source identity during retries.
  • Keep missing, replaced and looping paths fatal even when they change after the initial check, while preserving optional receipt behavior for ordinary storage failures.

Testing

Validation on 95f1160845c5: 197 MCP tests and 141 Python tests passed, with five Windows-only tests skipped locally. Eighteen late path-integrity regressions failed against the previous Windows backend and now pass through the actual publication writer; 42 ordinary I/O and path controls remain green. Linux runs emulate Win32 API errors and exercise real POSIX path replacement; native Windows remains for hosted CI. Portable checks, types, formatting, three native reviews and independent verification passed. Older full-suite results are not claimed for this revision.

Risk and rollout

Stacked on #916, which must land first. A missing acknowledgment still prevents recovery after response loss. The change adds no public command, flag, schema, default, or workflow activation.

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

Please review exact head f9aae3378e89a2214781f250aba22343a8a0f042 against prerequisite 4a5983f7aac613131d2ee8eec12a6b5170857136: accepted-operation identity, one replay at the existing owner, generation/selection/continuation checks, pre-acceptance failures and cleanup.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 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-13T06:19:07.351803Z 5d798c5 New commits
🔒 Security Review ✅ Completed 2026-10-13T06:17:56.839593Z 5d798c5 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

Copy link
Copy Markdown

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

Reviewed commit: f9aae3378e

ℹ️ 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
mldangelo-oai marked this pull request as ready for review September 16, 2026 11:33

@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: f9aae3378e

ℹ️ 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 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: e021cf4c02

ℹ️ 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/mcp-app/src/artifact-scan-draft.ts Outdated
Comment thread plugins/codex-security/mcp-app/src/artifact-scan-draft.ts Outdated
Comment thread plugins/codex-security/mcp-app/src/artifact-scan-draft.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: 832a3c6694

ℹ️ 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 removed the area:deep-scan Deep Scan coordination, worker scheduling, coverage, convergence, and resume. label Oct 8, 2026
@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 12, 2026 02:05
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Copilot AI 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.

🔵 Needs a closer look

Cross-language recovery, concurrency fencing, and platform-specific atomic filesystem behavior warrant final human review.

0 open findings

What changed in this PR

Adds safe Deep Scan publication recovery when canonical results are saved but the child-process response is lost.

Changes:

  • Records and validates publication acknowledgments before replay.
  • Preserves ownership, digest, warnings, checkpoints, and artifact bytes.
  • Distinguishes optional receipt I/O failures from unsafe-path errors across platforms.
File Description
plugins/​codex-security/​tests/​test_deep_scan_publication_authority.py Tests replay, receipt failures, and path safety.
plugins/​codex-security/​scripts/​workbench_saved_results.py Creates and validates publication acknowledgments.
plugins/​codex-security/​scripts/​windows_scan_local_files.py Separates Windows path-integrity errors from I/O failures.
plugins/​codex-security/​scripts/​finalize_scan_contract.py Classifies scan-local storage failures.
plugins/​codex-security/​mcp-app/​tests/​test_deep_scan_publication_integration.ts Exercises end-to-end recovery and ownership fencing.
plugins/​codex-security/​mcp-app/​tests/​clock_workbench.py Injects synthetic receipt-write failures.
plugins/​codex-security/​mcp-app/​src/​artifact-scan-draft.ts Retries acknowledged publications once and cleans receipts.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@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: 5dbb1479dd

ℹ️ 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/finalize_scan_contract.py
@mldangelo-oai mldangelo-oai changed the title fix(deep-scan): recover when saving results succeeds but the reply is lost fix(deep-scan): recover publication after a lost reply Oct 12, 2026
@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 12, 2026 03:24
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Copilot AI 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.

🔵 Needs a closer look

Cross-platform atomic filesystem and publication-authority changes warrant final human review with native Windows CI results.

0 open findings

🧠 Review effort: Balanced

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 95f1160845

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

Base automatically changed from mdangelo/codex/phase1-stale-publication to main October 13, 2026 01:30

@zcrab-oai zcrab-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.

Reviewed the changes since the previous reviewed head in two passes, using exact source at 95f1160845c5 and prior review evidence. Unchanged portions of the large branch were not exhaustively re-audited.

Approved. No new actionable findings in the reviewed scope.

Validation: CI-helper TypeScript compilation and plugin bundling passed locally; native binaries came from CI with matching compiled source inputs. The full cross-platform suite was not run locally; Windows execution remains unverified here.

descriptor = next_directory_handle
next_directory_handle -= 1
else:
descriptor = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600)
def fail_validation(*args):
raise OSError("Synthetic validation failure")

def fail_write(scan_dir, filename, contents):

This branch has not been deployed

No deployments
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.

4 participants