You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #371 under FE-1261. The original PR merged while its latest automated review was still reporting.
Why
drive() prepared Petri observation on disk but immediately reconciled with the stale pre-preparation metadata object. A run advanced by a direct lifecycle tool could therefore halt with petri_journal_gap instead of repairing the journal.
What
Refresh run.json after observation preparation before lifecycle reconciliation.
Cover an unprepared run advanced directly to worktree_created, proving reconciliation and forward progress.
Medium Risk
Touches the core drive() reconciliation path in the executor; scope is narrow (metadata refresh after preparation) but incorrect behavior could still affect run progression and journal repair.
Overview
Fixes a bug where drive() prepared Petri observation on disk but still reconciled lifecycle steps against the stale in-memory run.json snapshot from the start of the loop iteration.
After preparePetriObservation, the drive loop now re-reads run.json and updates state before reconcilePreparedLifecycleJournal. That way runs advanced by direct lifecycle tools (e.g. worktree already created while metadata still looked unprepared) reconcile against current provenance instead of halting with petri_journal_gap.
Adds an orchestrate test for an unprepared run with a worktree already in place, asserting reconciliation fires worktree_create and populate and reaches worktree_populated with petriObservationPrepared: true.
Reviewed by Cursor Bugbot for commit 2561716. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack context
Follow-up to #371 under FE-1261. The original PR merged while its latest automated review was still reporting.
Why
drive()prepared Petri observation on disk but immediately reconciled with the stale pre-preparation metadata object. A run advanced by a direct lifecycle tool could therefore halt withpetri_journal_gapinstead of repairing the journal.What
run.jsonafter observation preparation before lifecycle reconciliation.worktree_created, proving reconciliation and forward progress.Verification