Repository navigation
fix(melpa): cancel GNU's minibuffer background-update timer in the ffip world - #430
Conversation
…ip world
GNU's completion machinery schedules an idle
`completions--background-update' timer with (FORCE-EAGER-UPDATE BUFFER)
arguments while the minibuffer is active (minibuffer.el
`completions--start-background-update'). Batch input can end the
workflow before an idle moment consumes it, so the timer is still
pending when the world tears down. The world's existing exemption only
matched a one-argument (t) shape, which this GNU version never
produces, so cleanup raised
refusing to cancel unowned timer: function=completions--background-update
args=(t " *Minibuf-1*")
and the GNU side of `real-project-completion-filters-and-visits-unicode-file'
failed intermittently. Broaden the exemption to the real (FORCE BUFFER)
argument shape and reset `completions--background-update-timer' so the
next shared-process workflow sees no stale timer variable.
Verified: find_file_in_project_package_batch passes three consecutive
runs.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe shared-batch cleanup now recognizes GNU completion background-update timers with supported arguments. It clears ChangesCompletion timer cleanup
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The cleanup prevents stale completion timers from affecting subsequent shared workflows, with no remaining merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The setq that clears the global completions--background-update-timer executes before the argument-shape check, so an unrecognized-shape timer gets its owning variable nulled while the still-live timer is left uncancelled.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
This PR fixes an intermittent parity-test failure in the find-file-in-project (ffip) MELPA test world. During cleanup, the shared-process test harness cancels leftover timers but errors out on any timer it doesn't recognize as "owned". GNU's minibuffer completion machinery schedules an idle completions--background-update timer with (FORCE BUFFER) arguments while the minibuffer is active; batch input can end the workflow before that timer fires, so cleanup encountered it as pending. The prior exemption only matched a one-arg (t) shape that this GNU version never produces, causing the world's teardown to raise refusing to cancel unowned timer.
Changes:
- Broaden the
completions--background-updatetimer exemption to also match the real(FORCE BUFFER)argument shape. - Reset
completions--background-update-timerto nil so the next shared-process workflow sees no stale timer variable. - Re-indent the trailing
cl-pushnew/cancel-timerforms to align as siblings of theunless.
| File | Description |
|---|---|
| crates/neomacs-melpa-tests/src/parity_tests/find_file_in_project/mod.rs | Extends the elisp cleanup prelude's timer exemption to the (FORCE BUFFER) shape and clears the background-update timer variable |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| (progn | ||
| (setq completions--background-update-timer nil) | ||
| t) | ||
| (or (equal arguments '(t)) | ||
| (and (consp arguments) | ||
| (car arguments) | ||
| (bufferp (car (cdr arguments)))))) |

The intermittent FFIP red:
real-project-completion-filters-and-visits-unicode-fileexpected a GNU value but got the world's teardown errorrefusing to cancel unowned timer: function=completions--background-update args=(t #<buffer *Minibuf-1*>).completions--background-updatetimer with(FORCE-EAGER-UPDATE BUFFER)args while the minibuffer is active (minibuffer.elcompletions--start-background-update).(t)shape, which this GNU version never produces.(FORCE BUFFER)shape and resetcompletions--background-update-timerso the next shared-process workflow sees no stale timer variable.Verified:
find_file_in_project_package_batchpasses 3/3 consecutive runs. Melpa sweep locally: 940/942 (remaining: ac_helm #406, helm_lsp).