Skip to content

test: expect completed worker recovery to remain done - #18992

Closed
nwparker wants to merge 1 commit into
mainfrom
nwparker/deflake-completed-worker-recovery-state
Closed

nwparker wants to merge 1 commit into
mainfrom
nwparker/deflake-completed-worker-recovery-state

Conversation

@nwparker

@nwparker nwparker commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

The completed-worker fixture reports working then done, so the renderer and persisted recovery assertions must expect done. This corrects the saved-state expectation while preserving session identity, retirement, first activation, and restart checks. No retries or timeouts change.

Validation: 18 provider-session unit tests pass; formatting and lint pass. Both complete retirement modes passed in the combined pending-application-fixes CI run: https://github.com/stablyai/orca/actions/runs/34005529764. Main-based validation passed the corrected expectation but failed later while waiting for PaneManager to mount: https://github.com/stablyai/orca/actions/runs/34006268416. The empty-workspace reseeding fix #18886 is a likely dependency; the combined pass does not isolate that dependency. Keep this test PR unmerged until the full spec passes against main. Application PRs remain open for user review.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 6366378c-bec5-4711-9a83-e853eb7bd250

📥 Commits

Reviewing files that changed from the base of the PR and between fd10758 and 8abb300.

📒 Files selected for processing (1)
  • tests/e2e/completed-worker-retirement-resume.spec.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The end-to-end test now expects the completed worker recovery record to have state done instead of working.

Merge Risk: ⚪ Minimal · up to 8abb3

The completed-worker recovery test now expects both renderer and persisted recovery state to remain done after completion. The assertion matches the existing completed-worker setup, with no production behavior changed.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change and validation, but it does not follow the required template. It omits the required section headings, linked issue, visual proof statement, checklist status, and se… Rewrite the description using the repository template. Add the ELI5, What Changed, Why, Linked Issue with an issue number, Visual Proof with N/A and a reason, Testing details, AI Disclosure if applicable, Review, Agent skill upstream bounda…
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: updating the test to expect completed worker recovery to remain in the done state.
Full details: Description check

Explanation

The description explains the change and validation, but it does not follow the required template. It omits the required section headings, linked issue, visual proof statement, checklist status, and several review details.

Resolution

Rewrite the description using the repository template. Add the ELI5, What Changed, Why, Linked Issue with an issue number, Visual Proof with N/A and a reason, Testing details, AI Disclosure if applicable, Review, Agent skill upstream boundary, Notes, and Checklist sections. Mark each checklist item accurately and include the known CI limitation and dependency.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

A single-line test expectation update in the completed-worker retirement E2E spec.

  • Recovery state expectation — expectedRecovery.state moves from 'working' to 'done' in tests/e2e/completed-worker-retirement-resume.spec.ts, aligning the assertion with the reducer's now-correct behavior of preserving the completed recovery checkpoint.

I verified the underlying behavior: reduceAgentStatusLiveUpdate writes the live recovery record into sleepingAgentSessionsByPaneKey on the completion transition, and sleepingRecordFromEntry stamps state from the entry (agent-status-sleeping-records.ts:51), so the fixture's final setAgentStatus(..., 'done') call yields state: 'done' in both the renderer store and the persisted record. The assertion remains an exact .toEqual, so it still fails if the reducer ever regresses to 'working'.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@nwparker

Copy link
Copy Markdown
Contributor Author

Closing as superseded after checking current main.

The completed-worker recovery expectation is already present on main: the recovered status remains done. The test was also updated through merged #23686. This PR's one-line expectation change is therefore already covered.

Closing this PR only; its branch is being retained.

@nwparker nwparker closed this Oct 14, 2026
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