Skip to content

fix(plugin): close saved review tasks by ID - #1036

Open
mldangelo-oai wants to merge 7 commits into
mdangelo/codex/scan-diff-digestfrom
mdangelo/codex/scan-finalization
Open

mldangelo-oai wants to merge 7 commits into
mdangelo/codex/scan-diff-digestfrom
mdangelo/codex/scan-finalization

Conversation

@mldangelo-oai

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

Copy link
Copy Markdown
Collaborator

Summary

Terminal Standard and diff drafts can explicitly close saved review tasks. Recovery preserves reopened work, candidate evidence, and worker ownership through interrupted writes and retries.

Changes

  • Add optional coverage.resolvedDeferred entries containing the saved task ID and completion reason. Surface updates also use saved IDs.
  • Assign IDs to new work once, before checkpoint capture. Ambiguous or legacy unnamed evidence stays pending.
  • Share checkpoint capture and test fixtures. Preserve candidate outcomes from the selected worker checkpoint when result publication fails.
  • Stack on fix(plugin): bind diff digests during finalization #1040, which contains the independent digest fix and latest main.

Testing

  • Required portable source checks, SDK/MCP typechecks, formatting, and plugin build passed.
  • Focused draft writer and recovery tests: 67 passed.
  • SDK runtime, stopped recovery, handoff, and custom validation tests: 183 passed, 22 platform skips.
  • Python outcome and interrupted-write regression cases: 37 passed. All six TypeScript-to-Python recovery scenarios passed, including frozen replay.
  • CI runs the full regression and installed-package suites across supported platforms.

Risk and rollout

The schema addition is optional; no CLI changes. Callers must copy saved IDs when closing tasks or updating surfaces. Candidate findings still require explicit outcomes, and ambiguous ordering keeps work pending. Tests use synthetic fixtures and simulated workers; no live scan was run. Merge #1040 first, then retarget this PR to main.

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 26, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 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-26T09:36:41.836306Z 7e224f0 New commits
🔒 Security Review ✅ Completed 2026-09-26T09:36:04.500914Z 7e224f0 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: 1d4aeb7987

ℹ️ 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 on lines +1480 to +1482
if key not in reopened_candidates:
if relative == "parent" or relative in current_results:
resolved.setdefault(key, disposition)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Honor outcomes from the selected worker checkpoint

When a Standard worker successfully advances checkpoint-head.json to a terminal checkpoint but replacing result.json then fails, that selected checkpoint is included in current_drafts, yet this branch recognizes outcomes only from the parent or current_results. Consequently, a finding or rejected/not-applicable disposition recorded only in the selected checkpoint never enters resolved; the later superseded-checkpoint logic discards that outcome and can retain the older candidate as deferred, losing a confirmed security result during stopped-scan recovery. Treat the checkpoint named by selected_observations as an authoritative current outcome, subject to the existing source-order checks.

Useful? React with 👍 / 👎.

@mldangelo-oai mldangelo-oai changed the title fix(plugin): finalize diff scans and preserve resolved work fix(plugin): close saved review tasks by ID Sep 26, 2026
@mldangelo-oai
mldangelo-oai changed the base branch from main to mdangelo/codex/scan-diff-digest September 26, 2026 09:21

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

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

];
}
return [];
return stable;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Match ID-less surfaces before retaining saved copies

When a progress draft omits the optional surface id, buildCoverage generates one, but a later draft that repeats the same risk area and label without that generated ID now has no identity here. The saved surface is consequently retained as a separate row and the new surface receives a suffixed ID; if the old row was needs_follow_up and the new row reports or rejects it, the stale row still makes coverage partial and misrepresents the final result. Preserve the label/risk-area fallback, or otherwise reconcile generated IDs before merging.

Useful? React with 👍 / 👎.

Comment on lines +2212 to 2215
.update(JSON.stringify(item))
.digest("hex")
.slice(0, 16)}`;
let id = baseId;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep generated deferred IDs stable across checkpoints

For an allowed ID-less generic deferral, hashing the entire row means that enriching or abbreviating its notes, paths, or other metadata in a later checkpoint produces a new ID. Reconciliation then treats the saved task and its updated observation as independent work, retaining both; the generated ID is also absent from the tool response, so a caller that omitted it initially cannot reliably copy it into resolvedDeferred. Match the observation to saved deferred work before minting a new identity rather than deriving identity from mutable payload content.

Useful? React with 👍 / 👎.

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.

1 participant