Skip to content

test: cover plan resolution and lifecycle recovery - #89

Closed
jefft72 wants to merge 3 commits into
plan/10-tui-workflowfrom
plan/11-lifecycle-tests
Closed

jefft72 wants to merge 3 commits into
plan/10-tui-workflowfrom
plan/11-lifecycle-tests

Conversation

@jefft72

@jefft72 jefft72 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a shared plan interaction harness for the TUI tests, then uses it to cover plan resolution outcomes and lifecycle recovery.

Replaces #74 and carries the plan-only portion of #73. The task context and ambiguous-profile commits from #73 belong to the integration stack.

Reasoning

Each plan UI test previously rebuilt its own editor, selector, and runtime doubles, which made the suites long and let them drift apart.
A shared harness keeps the doubles consistent, so a change to the decision flow fails in one place rather than partially across several files.

Tree navigation now reports a waiting accepted-plan continuation, because navigating away from a pending implementation with no indication that it is still queued is the easiest way to lose track of it.

Changes

  • Adds test/interactive-mode-plan-test-utils.ts with shared editor, selector, and runtime doubles
  • Adds showTreeNavigationStatus, which reports a waiting continuation during tree navigation
  • Adds coverage for accepting, discarding, and deferring a plan
  • Adds coverage for lifecycle recovery across rebind, invalidation, and preflight failure

Testing

  • npx vitest --run test/interactive-mode-plan-resolution.test.ts test/interactive-mode-plan-lifecycle.test.ts test/plan-message.test.ts
  • tsgo --noEmit reports zero errors

- Plan UI tests each rebuilt their own editor, selector, and runtime doubles, which made the suites long and inconsistent
- Tree navigation now reports a waiting accepted-plan continuation, so the shared harness exercises that status alongside the decision flow
- Accepting, discarding, and deferring a plan had no coverage, so a regression in the decision selector would have gone unnoticed
- Harness switch and profile selection cancellation cases are held for the integration stack because they need the task profile modules
- A rejected or superseded plan could leave the TUI holding stale continuation state with nothing pinning the recovery path
- Tree navigation and rebind paths are exercised together so a pending continuation survives session replacement

@Issacboy123 Issacboy123 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! The new interactive-plan harness covers acceptance, discard, retry, restoration, lifecycle recovery, and rendered plan messages. Apart from a small harness-support change, this is focused test work.

@Pepps233 Pepps233 closed this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants