Skip to content

fix: queue concurrent buffer requests to prevent edit conflicts#5

Merged
haapjari merged 2 commits intomainfrom
fix/parallel-edits-failure
Jan 3, 2026
Merged

fix: queue concurrent buffer requests to prevent edit conflicts#5
haapjari merged 2 commits intomainfrom
fix/parallel-edits-failure

Conversation

@haapjari
Copy link
Owner

@haapjari haapjari commented Jan 3, 2026

fix: queue concurrent buffer requests to prevent edit conflicts

When multiple @ai requests are triggered on different lines in the same
buffer, the second request is now queued instead of running in parallel.
This prevents line number invalidation when the first edit shifts buffer
content.

  • Add buffer-level request queue with busy_buffers tracking
  • Queue requests when buffer has in-flight request
  • Process queued requests sequentially after completion/error/cancel
  • Notify user of queue position
  • Detect and reject duplicate queued requests for same line
  • Update cancel to handle queued requests

fix: require luacheck in verify-lint and fix all warnings

  • Makefile verify-lint now fails if luacheck is not installed
  • Also checks ~/.luarocks/bin/luacheck fallback location
  • Fix unused variables in tests with _ prefix
  • Fix line too long in init.lua

When multiple @ai requests are triggered on different lines in the same
buffer, the second request is now queued instead of running in parallel.
This prevents line number invalidation when the first edit shifts buffer
content.

- Add buffer-level request queue with busy_buffers tracking
- Queue requests when buffer has in-flight request
- Process queued requests sequentially after completion/error/cancel
- Notify user of queue position
- Detect and reject duplicate queued requests for same line
- Update cancel to handle queued requests
- Makefile verify-lint now fails if luacheck is not installed
- Also checks ~/.luarocks/bin/luacheck fallback location
- Fix unused variables in tests with _ prefix
- Fix line too long in init.lua
Copy link
Owner Author

haapjari commented Jan 3, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@haapjari haapjari merged commit cb7654a into main Jan 3, 2026
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