Add command completion call-budget regression tests #745
Labels
No labels
bug
documentation
duplicate
enhancement
fugitive
good first issue
help wanted
invalid
question
v0.1.0
v0.2.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/forge.nvim#745
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent tracker: #744
Scope
Add regression coverage for the command-line completion lag identified in #744.
This issue is test-only unless the tests require a tiny test helper refactor. It should not change completion behavior yet.
Problem
The current completion specs assert candidate lists, but they do not protect the performance-critical call budget.
:Forge pr <Tab>can return only static-looking candidates while still synchronously invoking backend PR lookup commands.We need tests that fail for that class of regression before changing completion behavior in follow-up issues.
Required coverage
Add completion call-budget coverage for repeated
vim.fn.getcompletion()calls, preferring external-call assertions over wall-clock timing.Cover at least:
Forge prForge pr mForge pr reForge pr merge method=The key expectation for this first issue is to capture the current problematic budget clearly enough that follow-up fixes can tighten it.
Backend expectations
The tests should distinguish:
gh,glab,tea, shell pipelines that call them)current_pr()/branch_pr()The test model should make it possible for follow-up PRs to assert that GitHub, GitLab, and Forgejo command completion do not synchronously call backend list/detail commands.
Non-goals
Verification
Run focused tests first:
Before PR, run the full gate if practical: