Skip to content

feat(orchestration): expose plan known-good frontier (#1028)#1102

Merged
shaun0927 merged 1 commit into
developfrom
feat/1028-known-good-prefix
May 13, 2026
Merged

feat(orchestration): expose plan known-good frontier (#1028)#1102
shaun0927 merged 1 commit into
developfrom
feat/1028-known-good-prefix

Conversation

@shaun0927
Copy link
Copy Markdown
Owner

@shaun0927 shaun0927 commented May 12, 2026

Progress / Review status

Auto-refreshed 2026-05-13 — owner comments cleaned up to reduce review noise.

Field Value
Branch feat/1028-known-good-prefixdevelop
Draft no
CI ✅ all 9 checks passing
Mergeable ✅ MERGEABLE
Review decision
Codex (latest) 💡 suggestions posted
Other reviewers (latest) chatgpt-codex-connector: commented
Head 65bbd7b — Expose plan recovery frontier metadata
Commits 1

Owner comment cleanup: 0 issue + 0 inline review comments deleted. Outstanding feedback from automated/external reviewers above is unchanged.


Summary

  • Adds PlanExecutor per-step ledger metadata for known-good prefix and invalidated frontier tracking.
  • Extends PlanExecutionResult with ledger.steps, knownGoodPrefixLength, frontierStepOrder, and invalidationReason.
  • Records main and recovery step entries with stable argument hashes, status, duration, and recovery condition where applicable.

Direction / duplicate check

  • Fits openchrome's harness direction by improving recovery observability without changing execution behavior.
  • Checked open PRs before implementation. Existing task ledger/lifecycle PRs do not add PlanExecutor known-good prefix/frontier metadata; this PR is isolated to compiled-plan execution.

Tests

  • npm ci (ran package prepare build)
  • 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

Live OpenChrome verification checklist

After merge, verify with a real/openchrome plan execution:

  1. Run a 3-step plan: navigate https://example.com, read_page/query_dom, then an intentionally failing interaction.
  2. Confirm step 1..2 appear as success entries and step 3 is the frontierStepOrder.
  3. Fix only the frontier step and re-run; confirm the result ledger identifies the new completed prefix or records an invalidation reason if state changed.
  4. Attach the plan input, ledger output, and retry output to the implementation PR or follow-up verification note.

Closes #1028.

@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@gemini-code-assist
Copy link
Copy Markdown

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.
@shaun0927 shaun0927 force-pushed the feat/1028-known-good-prefix branch from 69ffe7d to 65bbd7b Compare May 13, 2026 09:21
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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}`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@shaun0927 shaun0927 merged commit 018ffac into develop May 13, 2026
9 checks passed
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.

1 participant