Skip to content

fix(deep): preserve checkpoint authority during recovery - #915

Draft
mldangelo-oai wants to merge 2 commits into
mainfrom
mdangelo/codex/checkpoint-frozen-head
Draft

mldangelo-oai wants to merge 2 commits into
mainfrom
mdangelo/codex/checkpoint-frozen-head

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Summary

Stopped Deep scans can resurrect a rejected candidate by reading an older result file, or change their recovery input after a publication write fails. Read the committed checkpoint head and freeze that selection so replay preserves the accepted evidence and latest disposition.

Changes

  • Prefer the committed discovery checkpoint over older current and archived results; order archived attempts numerically.
  • Freeze selected checkpoint paths alongside existing retained source digests before publication. Explicit recovery can adopt a later head; ordinary replay uses the frozen selection.
  • Preserve accepted partial evidence, original failure state and legacy results without checkpoint-head metadata.
  • Add migration 47 for the nullable frozen-head mapping; existing migrations remain unchanged. No public CLI change.

Testing

On bd70d41478d06331f297decd171d0d11d7fd439f:

  • The schema-capable parent has 10 regression failures and 10 passing controls; the same tests pass all 20 cases after the correction.
  • Affected Python suites: 552 passed, two skips and 55 subtests. Four affected SDK suites: 82 passed, 584 assertions. Four affected MCP suites passed.
  • Installed SDK and physically detached plugin: 20 cases passed, including five new-process replays and public contract reads.
  • All five required portable checks passed: Ruff lint/format, SDK build:ci, plugin source compatibility and its tests. SDK/plugin builds passed.
  • Tests exercise real output-write failure after findings reach disk, restoration of prior outputs, changed or missing heads, newer rejection, partial evidence and explicit recovery.
  • Independent composition with the publication fence passes 44 targeted cases; a second verification passes 45 with one additional existing control. Current-main source composition is clean. Native platform CI remains pending.

Risk and rollout

This draft contains both compatible readers and the frozen-head writer. Establish a reader-capable rollback artifact before enabling new writes; the schema-only commit is insufficient. Coordinate migration 47 with other open migration work and keep its identity unchanged.

The change preserves original stopped state and source digests. Legacy records without frozen-head metadata retain their existing fallback. Keep the draft unmerged until reader-first ordering and platform acceptance are complete.

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.

Read each discovery checkpoint head before an older result, and freeze selected heads alongside retained source digests before publication. Preserve explicit recovery and legacy fallback semantics. Cover newer rejections, numeric archive precedence, real output-write failure, accepted partial evidence, and public workbench stop commands.
@github-actions github-actions Bot added the bug Something isn't working label Sep 12, 2026
migrate(connection, migrations)
after = [dict(row) for row in connection.execute("SELECT * FROM scans ORDER BY id")]
for original, updated in zip(before, after, strict=True):
assert updated.pop("retained_checkpoint_heads_json") is None
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, bd70d41478d06331f297decd171d0d11d7fd439f.

@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-12T10:01:41.313322Z bd70d41 Manual request
ℹ️ 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. Hooray!

Reviewed commit: bd70d41478

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

1 participant