Skip to content

fix(backend): port cold restart receipt validation - #328

Merged
SamGu-NRX merged 1 commit into
alphafrom
gpt-burst/1022w2-cold-restart-import
Oct 23, 2026
Merged

SamGu-NRX merged 1 commit into
alphafrom
gpt-burst/1022w2-cold-restart-import

Conversation

@SamGu-NRX

Copy link
Copy Markdown
Owner

What changed

capture_cold_restart.py imported load_receipt, but commit 596ed9a9 replaced that helper with receipt_problem. Importing tests/test_capture_cold_restart.py therefore raised 14 collection errors. The cold-restart script now reads the JSON receipt directly and uses the replacement validator.

Why

The cold-restart runner still needs per-field errors for receipts that predate the replay fields. It keeps that existing diagnostic path while using receipt_problem to reject receipts with the wrong runner.

How it works

The primary and resume legs parse the saved receipt, reject an invalid runner, and continue through the existing fixture and replay checks. The top-level command still reports each missing replay field separately.

UI changes

N/A. This changes a backend script only.

Verification

  • Before the change: env -u NODE_ENV OMP_NUM_THREADS=1 uv run --frozen --extra api pytest -q tests/test_capture_cold_restart.py failed during collection with 14 ImportErrors.
  • After the change: env -u VIRTUAL_ENV -u NODE_ENV OMP_NUM_THREADS=1 .venv/bin/python -m pytest -q tests/test_capture_cold_restart.py passed, 14 tests, with one existing deprecation warning.

Risk

The change is limited to receipt loading in the cold-restart script. Full project checks were not run.

Checklist

  • The scope is focused; related changes belong together
  • I explained what changed and why
  • I included before/after images for visible changes
  • I included a video for motion or interaction changes

N/A for the last two checklist items because this PR has no visible or interactive changes.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d7b9056d-b3a0-4b28-ab5b-b3b3ee3d9af2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:S 10-29 effective changed lines. label Oct 22, 2026
@SamGu-NRX

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-23T16:44:29.545863Z 528ab8d 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: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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".

@SamGu-NRX

Copy link
Copy Markdown
Owner Author

@codex review

1 similar comment
@SamGu-NRX

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 528ab8d1b5

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

@SamGu-NRX
SamGu-NRX marked this pull request as ready for review October 23, 2026 16:40
@SamGu-NRX
SamGu-NRX merged commit 0639510 into alpha Oct 23, 2026
5 checks passed
@codemetrics-ai

Copy link
Copy Markdown

Note

Review skipped

Codemetrics is installed on this repository, but it hasn't been added to your team yet.

To enable AI code reviews for this repo, go to your dashboard and add BaseScanning to your team's repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 effective changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant