Skip to content

Clamp projects.tree session_limit before SQLite LIMIT - #78437

Closed
aydnOktay wants to merge 2 commits into
NousResearch:mainfrom
aydnOktay:fix/tui-projects-session-limit-clamp
Closed

Clamp projects.tree session_limit before SQLite LIMIT#78437
aydnOktay wants to merge 2 commits into
NousResearch:mainfrom
aydnOktay:fix/tui-projects-session-limit-clamp

Conversation

@aydnOktay

Copy link
Copy Markdown
Contributor

Summary

  • Clamp TUI gateway projects.tree / projects.project_sessions session_limit to 1–10000 (defaults 2000/5000) so negative values cannot become unbounded SQLite LIMIT queries and oversized values cannot force expensive list_sessions_rich work.
  • Also clamp preview_limit to 0–50 (default 3).
  • Defensive Telegram bare-adapter getattr for _polling_conflict_recovery_generation.

aydnOktay and others added 2 commits August 4, 2026 14:17
Negative session_limit values become unbounded SQLite LIMIT queries, and oversized limits force expensive list_sessions_rich CTE work for the desktop project tree. Clamp session_limit to 1-10000 and preview_limit to 0-50 while preserving defaults (2000/5000 and 3).

Co-authored-by: Cursor <cursoragent@cursor.com>
…adapters

Defensively read _polling_conflict_recovery_generation via getattr so bare/__new__ adapters cannot AttributeError during progress recording.

Co-authored-by: Cursor <cursoragent@cursor.com>
@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have labels Aug 4, 2026
@aydnOktay

Copy link
Copy Markdown
Contributor Author

Closing to concentrate review on a single linked product bug: #89979.

@aydnOktay aydnOktay closed this Aug 19, 2026
@aydnOktay

Copy link
Copy Markdown
Contributor Author

Closing to concentrate review on a single linked product bug: #89979.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants