Skip to content

fix: preserve checkpoint feedback in variants and persist search journal#184

Merged
marcellodebernardi merged 2 commits intomainfrom
codex/checkpoint-search-journal-persist
Mar 2, 2026
Merged

fix: preserve checkpoint feedback in variants and persist search journal#184
marcellodebernardi merged 2 commits intomainfrom
codex/checkpoint-search-journal-persist

Conversation

@marcellodebernardi
Copy link
Copy Markdown
Contributor

This PR fixes checkpoint resume behavior by preserving injected user feedback in phase-4 variant workers and by persisting the search journal in phase 5 and 6 checkpoints. The aim is to make resume-from-checkpoint workflows reliable and consistent across later phases, including feedback-driven retries. It also includes targeted unit tests for both regressions and updates generated code indexes via project hooks.

Testing

  • poetry run pytest -q tests/unit/workflow/test_checkpoint_resume_feedback.py
  • poetry run pytest -q tests/unit/agents/test_feedback.py tests/unit/workflow/test_resume_model_type_filtering.py
  • poetry run pytest -q tests/unit
  • poetry run ruff check tests/unit/workflow/test_checkpoint_resume_feedback.py
  • poetry run black --check plexe/workflow.py tests/unit/workflow/test_checkpoint_resume_feedback.py

Copilot AI review requested due to automatic review settings March 2, 2026 19:58
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 2, 2026

Greptile Summary

This PR fixes checkpoint resume reliability by addressing two specific issues: user feedback preservation during parallel variant execution and search journal persistence in later workflow phases.

  • Restored search journal is now stored in context.scratch when resuming from checkpoint, making it available for downstream phases
  • User feedback injected during resume is now preserved when creating isolated variant worker contexts in phase 4, ensuring feedback-driven retries work correctly
  • Search journal is now persisted in phase 5 (evaluate_final) and phase 6 (package_final_model) checkpoints, enabling resume from these phases
  • Comprehensive unit tests verify both regression scenarios with appropriate mocking and assertions

Confidence Score: 5/5

  • This PR is safe to merge with no risks identified
  • Changes are minimal, focused, and preserve existing behavior while fixing specific checkpoint resume bugs. All modifications follow established patterns in the codebase, new tests provide comprehensive coverage of the regressions, and no edge cases or security concerns were identified
  • No files require special attention

Important Files Changed

Filename Overview
plexe/workflow.py Added search journal restoration to context.scratch on resume, preserved user feedback in variant workers, and persisted search journal in phase 5/6 checkpoints
tests/unit/workflow/test_checkpoint_resume_feedback.py New comprehensive tests verifying user feedback preservation across variants and search journal persistence in later-phase checkpoints
pyproject.toml Version bump from 1.3.5 to 1.3.6

Last reviewed commit: cbecdeb

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves checkpoint resume reliability in later workflow phases by ensuring (1) user feedback injected during resume is preserved for all phase-4 parallel variant executions, and (2) the SearchJournal is carried forward and persisted in phase 5 and 6 checkpoints.

Changes:

  • Preserve context.scratch["_user_feedback"] when creating per-variant scratch contexts in search_models.
  • Restore SearchJournal into context.scratch during checkpoint resume and persist it in phase 5 (evaluate_final) and phase 6 (package_final_model) checkpoints.
  • Add unit tests covering both regressions and update generated code index files.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
plexe/workflow.py Preserves resume feedback across variant workers; persists/restores SearchJournal through phase 5/6 checkpoints.
tests/unit/workflow/test_checkpoint_resume_feedback.py Adds focused unit tests for feedback preservation across variants and journal persistence in checkpoints.
tests/CODE_INDEX.md Regenerated index to include the new test module and entries.
plexe/CODE_INDEX.md Regenerated index timestamp/footer update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marcellodebernardi
Copy link
Copy Markdown
Contributor Author

@greptileai review again with latest changes

@marcellodebernardi marcellodebernardi merged commit b021b02 into main Mar 2, 2026
13 checks passed
@marcellodebernardi marcellodebernardi deleted the codex/checkpoint-search-journal-persist branch March 2, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants