Skip to content

fix: reflector-logs cleanup — orphan URL, sources lineCount, fetch cap#5

Open
simons-plugins wants to merge 1 commit into
mainfrom
fix/reflector-cleanup
Open

fix: reflector-logs cleanup — orphan URL, sources lineCount, fetch cap#5
simons-plugins wants to merge 1 commit into
mainfrom
fix/reflector-cleanup

Conversation

@simons-plugins

Copy link
Copy Markdown
Owner

Summary

Three findings from the 2026-04-14 codebase audit of `CONCERNS.md`.

1. Remove orphan `CFBundleURLTypes`

`Info.plist` referenced `static/html/about.html` which never existed — there is no `Resources/` directory in this plugin bundle at all. Deleted the whole `CFBundleURLTypes` array. Also bumped `CFBundleVersion` so it tracks `PluginVersion`.

2. `sources` endpoint: configurable `lines`

Previously hard-coded `lineCount=2000`. A low-frequency source (nothing in the last 2000 log lines) was invisible. Now accepts an optional `?lines=N` query param, default 5000, max 20000. The docstring tells clients to raise it to find rare sources.

3. `log` endpoint: surface the raw-fetch cap

Filtered pagination fetches `(offset + lines + 1) * 3` raw entries, capped at 10000. When that cap is hit, the filtered result's `hasMore` can falsely read `false` because we didn't look further back. The response now includes `fetchCapReached: true` in that case and replaces a false `hasMore` with `null`. Clients should narrow filters or switch to `/history` for older data.

Version

Bumped `PluginVersion` (and `CFBundleVersion`) to `2026.0.5`.

Test plan

  • Deploy to jarvis and restart plugin
  • `GET /sources` (no args) — confirm default behaviour still returns source names
  • `GET /sources?lines=15000` — confirm wider scan
  • `GET /log?source=rare&lines=100&offset=0` — on a hub with deep history, confirm `fetchCapReached: true` appears when the filter window exceeds the raw cap
  • `GET /log` with no filters — confirm `fetchCapReached` absent for normal cases
  • Confirm no orphan plist warnings on plugin load

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@simons-plugins has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 27 minutes and 33 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 66765e58-968a-4fdb-bfbf-d2a9e2ce7a65

📥 Commits

Reviewing files that changed from the base of the PR and between 566dcad and 5d2f50a.

📒 Files selected for processing (2)
  • LogsOverReflector.indigoPlugin/Contents/Info.plist
  • LogsOverReflector.indigoPlugin/Contents/Server Plugin/plugin.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/reflector-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Three audit findings from CONCERNS.md:

- Info.plist: remove CFBundleURLTypes block. It referenced
  static/html/about.html which never existed — there is no Resources
  directory in this plugin bundle. Also bumped CFBundleVersion to
  match PluginVersion 2026.0.5.
- sources endpoint: accept optional lines query param (default 5000,
  max 20000) instead of a hard-coded lineCount=2000. Low-frequency
  sources that hadn't emitted within the 2000-line window were
  invisible; the docstring now tells clients to raise lines to find
  them.
- log endpoint: surface the 10000-raw-entry fetch cap in the response.
  When a filtered page asks for more raw entries than the cap permits,
  the endpoint now returns fetchCapReached=true and replaces a false
  hasMore with null, so clients stop trusting "no more results" when
  the real answer is "we didn't look that far back". Clients should
  narrow filters or switch to /history for older data.

Bumps PluginVersion to 2026.0.5.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@simons-plugins simons-plugins force-pushed the fix/reflector-cleanup branch from c90e908 to 5d2f50a Compare May 9, 2026 20:01
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