Skip to content

fix: remove DEFAULT_MAX_RESULTS cap from reflection tool - #772

Merged
avoidwork merged 2 commits into
mainfrom
fix/remove-reflection-max-results-cap
Aug 12, 2026
Merged

fix: remove DEFAULT_MAX_RESULTS cap from reflection tool#772
avoidwork merged 2 commits into
mainfrom
fix/remove-reflection-max-results-cap

Conversation

@avoidwork

Copy link
Copy Markdown
Owner

Summary

Remove the hardcoded DEFAULT_MAX_RESULTS = 50 cap from src/tools/reflection.js. The reflection tool now processes every session within the date window instead of stopping at 50 files.

What Changed

  • Removed DEFAULT_MAX_RESULTS = 50 constant
  • Removed lines.slice(0, DEFAULT_MAX_RESULTS) — all sessions within the window are now processed
  • Updated JSDoc to reflect the change

Why

The cap was halting the scan prematurely. We never know how many scheduled tasks a user has that generate sessions — we need to process every session within the time window to find signal. Limiting to 50 files means older sessions within the window are silently skipped, losing potentially important reflection data.

Impact

  • src/tools/reflection.js — removed cap, processes all sessions in window
  • No new dependencies
  • No API changes (schema unchanged)

Process every session within the date window — the cap was halting
the scan prematurely, losing signal from older sessions that still
fall within the window.
The cap was removed — all sessions within the window are now processed.
Updated the test to expect all 55 sessions instead of capping at 50.
@avoidwork
avoidwork merged commit 224a154 into main Aug 12, 2026
2 checks passed
@avoidwork
avoidwork deleted the fix/remove-reflection-max-results-cap branch August 12, 2026 20:30
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