dylanjbarth / dylanjbarth/codex-inspector
Review rejects small scopes once global capacity history exceeds 2,000 rows
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Review generation reads capacity observations globally and applies a 2,000-row scope limit before narrowing the data to the requested Review scope. Once the global table reaches 2,001 observations, even a small single-session Review fails with review_scope_too_large.
This makes Review availability depend on unrelated historical capacity data rather than the requested session scope.
Reproduction
- Populate the capacity observation store with 2,001 valid observations.
- Request a Review for one small session.
- Observe the Review failure.
Observed result:
review_scope_too_large
A regression probe reproduced this against commit aad5070435fd9944e0cf38d32cba5d53e25425c4.
Expected behavior
The size guard should apply to the requested Review scope, or capacity lookup should fetch only the latest observation relevant to that scope. Unrelated global capacity history must not cause a small Review to fail.
Relevant code
Acceptance criteria
- A small single-session Review succeeds when global capacity history contains more than 2,000 rows.
- Capacity lookup is bounded by the requested scope or by a targeted latest-observation query.
- A regression test covers 2,001+ global observations with a small Review scope.
- Legitimately oversized Review scopes still return the documented size error.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in internal/reviews/plan.go around the global capacity query and row limit at line 128. Reproduce the failure with 2,001 observations and a small single-session Review, then add coverage for that case while preserving the documented size error for genuinely oversized Review scopes. Done means the small Review succeeds despite unrelated global history.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100