Skip to content

test: e2e journey — async job history survives daemon restart#76

Closed
bhekanik wants to merge 1 commit into
feat/persist-mutation-jobsfrom
test/e2e-async-job-restart
Closed

test: e2e journey — async job history survives daemon restart#76
bhekanik wants to merge 1 commit into
feat/persist-mutation-jobsfrom
test/e2e-async-job-restart

Conversation

@bhekanik

@bhekanik bhekanik commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What

Adds a fake-provider, full-binary e2e journey test that a backgrounded (--async) mutation job survives a daemon restart. Audit backlog item P1 #18 / TODO.md P0 ("end-to-end smoke tests for the real user journey").

Stacked on #70 (feat/persist-mutation-jobs) — the assertion only holds once job history is persisted. Base retargets to main after #70 merges.

Why

The existing cli_journey.rs suite already covers most of the real journey (sync → search → compose-send → archive → undo, and reply-later surviving a restart). The one gap was the journey for backgrounded job history, which is exactly what PR #70 makes durable. This is the e2e counterpart to #70's unit/store tests.

How

Mirrors the existing cli_journey_reply_later_flag_persists_across_daemon_restart pattern: real mxr binary + fake provider → sync → start mxr archive <id> --async --yes → poll mxr jobs --format json for the job id → SIGTERM the daemon, wait for exit, let the next CLI call auto-restart it → assert the job id is still listed.

Verification

cargo test -p mxr --test cli_journey cli_journey_async_job_history_survives_daemon_restart → 1 passed (5.9s). clippy + fmt clean.

Scope note

The broader 4.5 ask (a comprehensive journey smoke test) is largely already satisfied by the existing cli_journey.rs tests; this PR closes the specific job-persistence gap introduced by #70 rather than duplicating that coverage.

Generated with Claude Code


Summary by cubic

Adds an end-to-end CLI journey test to ensure backgrounded (--async) mutation jobs persist across a daemon restart. Uses the real mxr binary with a fake provider and asserts the job remains listed in mxr jobs after restart.

Written for commit bc3c586. Summary will update on new commits.

Review in cubic

Extends the fake-provider CLI journey suite with the one path the
existing tests didn't cover: a backgrounded mutation job outliving a
daemon restart. Drives the real binary — sync, `mxr archive --async`,
capture the job id from `mxr jobs`, kill the daemon, let it auto-restart,
then assert the job is still listed. This is the end-to-end counterpart
to the unit/store coverage for persisted job history.
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cbeb2f00-0f1f-4271-8202-f2b5c625ee2d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/e2e-async-job-restart

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 and usage tips.

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mxr-mail Ready Ready Preview, Comment Jun 10, 2026 7:42pm

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@bhekanik

Copy link
Copy Markdown
Contributor Author

Merged into main as part of the integrated backlog landing (commit is an ancestor of main). GitHub didn't auto-mark this as merged because it was originally stacked on its parent branch rather than main. Closing as merged.

@bhekanik bhekanik closed this Jun 11, 2026
@bhekanik bhekanik deleted the test/e2e-async-job-restart branch June 11, 2026 00:34
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