test: e2e journey — async job history survives daemon restart#76
test: e2e journey — async job history survives daemon restart#76bhekanik wants to merge 1 commit into
Conversation
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Merged into |
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").Why
The existing
cli_journey.rssuite 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_restartpattern: realmxrbinary + fake provider →sync→ startmxr archive <id> --async --yes→ pollmxr jobs --format jsonfor 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.rstests; 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 realmxrbinary with a fake provider and asserts the job remains listed inmxr jobsafter restart.Written for commit bc3c586. Summary will update on new commits.