feat(orchestration): expose plan known-good frontier (#1028)#1102
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Track per-step execution records so failed compiled plans report the known-good prefix and invalidated frontier for follow-up recovery.\n\nConstraint: Keep the change inside PlanExecutor metadata; do not add browser checkpointing or workflow-builder behavior.\nRejected: Replaying or skipping browser steps automatically | unsafe without explicit state validation and outside issue #1028.\nConfidence: high\nScope-risk: narrow\nDirective: Future retry logic may consume ledger.frontierStepOrder, but this PR must remain observational.\nTested: npm test -- --runInBand tests/orchestration/plan-cache.test.ts; npm run build:src; npx eslint src/orchestration/plan-executor.ts src/types/plan-cache.ts --ext .ts; npm ci prepare build\nNot-tested: Live browser plan retry; PR includes manual verification checklist.
69ffe7d to
65bbd7b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65bbd7bd8e
ℹ️ 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".
| stepsExecuted, | ||
| totalSteps: plan.steps.length, | ||
| }; | ||
| }, ledger, computeKnownGoodPrefix(ledger) + 1, `Success criteria not met: ${criteriaError}`); |
There was a problem hiding this comment.
Do not point frontier to a non-existent step
When success criteria fail after step execution, frontierStepOrder is set to computeKnownGoodPrefix(ledger) + 1, which can exceed totalSteps (for example, all steps succeed but required fields are missing). That produces a frontier that does not map to any main-plan step, so any consumer that retries or highlights the frontier step will target an invalid index. This path should leave frontierStepOrder unset (or map it to a real step) when the invalidation is post-step validation rather than a specific step failure.
Useful? React with 👍 / 👎.
Progress / Review status
Auto-refreshed 2026-05-13 — owner comments cleaned up to reduce review noise.
feat/1028-known-good-prefix→develop65bbd7b— Expose plan recovery frontier metadataOwner comment cleanup: 0 issue + 0 inline review comments deleted. Outstanding feedback from automated/external reviewers above is unchanged.
Summary
PlanExecutionResultwithledger.steps,knownGoodPrefixLength,frontierStepOrder, andinvalidationReason.Direction / duplicate check
Tests
npm ci(ran packagepreparebuild)npm test -- --runInBand tests/orchestration/plan-cache.test.tsnpm run build:srcnpx eslint src/orchestration/plan-executor.ts src/types/plan-cache.ts --ext .tsLive OpenChrome verification checklist
After merge, verify with a real/openchrome plan execution:
navigate https://example.com,read_page/query_dom, then an intentionally failing interaction.successentries and step 3 is thefrontierStepOrder.Closes #1028.