Skip to content

fix(test): tolerate 2- or 3-entry jumplist in jumplist.vimspec - #553

Merged
lambdalisue merged 1 commit into
mainfrom
fix/ci
Jun 1, 2026
Merged

fix(test): tolerate 2- or 3-entry jumplist in jumplist.vimspec#553
lambdalisue merged 1 commit into
mainfrom
fix/ci

Conversation

@lambdalisue

@lambdalisue lambdalisue commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Fixes #549

Summary

  • The jumplist test was written to expect exactly 5 lines (3 numbered jump entries + > + header), which assumed that leaving the fern buffer via edit always records two fern:// entries.
  • Recent stable Neovim no longer records that extra jump, producing only 4 lines (2 numbered entries + > + header), causing the assertion to fail on CI.
  • The test now branches on the actual length of the jumplist output and validates whichever shape is present, while still asserting the semantically important invariant: alpha is retained as the most distant jump.

Why

The behavioral difference is a Neovim internal change in how edit interacts with the jumplist. Both the old (5-entry) and new (4-entry) shapes are correct from fern's perspective — what matters is that the jumplist is updated and that alpha survives as the oldest entry. Hard-coding the 5-entry shape made CI brittle against Neovim upgrades.

Test Plan

  • Confirm CI passes on the latest stable Neovim
  • Confirm CI still passes on older Neovim / Vim where the 5-entry shape is produced

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated jumplist behavior validation tests to support multiple Vim/Neovim versions.

Recent stable Neovim no longer records the extra jump when :edit
replaces the fern buffer, so the jumplist holds only one fern://
entry instead of two.  The test now accepts both the 3-entry shape
(Vim / older Neovim) and the 2-entry shape (recent Neovim stable),
while still asserting that alpha is preserved as the most distant
jump in both cases.

Fixes #549

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 18f04372-3e33-43fe-8b6c-fa0366d37d15

📥 Commits

Reviewing files that changed from the base of the PR and between 4126111 and 0685ae9.

📒 Files selected for processing (1)
  • test/behavior/jumplist.vimspec

📝 Walkthrough

Walkthrough

The test file jumplist.vimspec is updated to handle version-dependent jumplist behavior. The second test case assertions are refactored from a single fixed expectation to conditional assertions that accept either a 5-entry or 4-entry jump list layout, accommodating variations in how different Vim/Neovim versions record fern jumps.

Changes

Version-Flexible Jumplist Assertions

Layer / File(s) Summary
Conditional jumplist layout assertions
test/behavior/jumplist.vimspec
Jumplist test assertions branch on output length to validate two acceptable jump list layouts (5-entry with two fern:// entries, or 4-entry with one fern:// entry), while asserting alpha retention and list termination with ^>.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A test that once was rigid and strict,
Now flexes to versions both old and new,
Five jumps or four, the rabbit permits—
No more CI tears for the Neovim crew! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: making the test tolerate variable jumplist sizes (2 or 3 entries) instead of a fixed expectation.
Linked Issues check ✅ Passed The pull request directly addresses issue #549 by fixing CI failures on stable Neovim by making the jumplist test flexible to accept both 4-line and 5-line jumplist outputs.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the jumplist test assertion logic in jumplist.vimspec to handle version-dependent behavior, with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci

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.

@lambdalisue
lambdalisue merged commit 3d58035 into main Jun 1, 2026
13 checks passed
@lambdalisue
lambdalisue deleted the fix/ci branch June 1, 2026 09:50
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.

CI fails on the latest stable Neovim

1 participant