fix(rate-limit-guard): orphan-aware resolve_tee in statusline-shim - #1866
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Claude finished @kyle-sexton's task in 1m 13s —— View job Security review complete
Scope: the 3 files changed in this PR ( No security issues found. Summary of what I checked:
|
|
Claude finished @kyle-sexton's task in 3m 46s —— View job Review complete
Note on tooling: the sandbox in this session refused to execute the new test suite ( SummaryThis is a faithful, careful port. I diffed Findings1.
This isn't just a paperwork gap: CLAUDE.md's "Versioned" rule exists specifically so "consumers update on bumps." Without the version bump, an operator on cached rate-limit-guard 0.4.0 has no signal that anything changed, so the orphan-skip fix this PR ships never reaches an already-installed copy. It also won't be caught by CI: Suggested fix: bump Everything else — the |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 005823d037
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude has reviewed this PR 5 times. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Claude finished @kyle-sexton's task in 1m 26s —— View job Security review complete
Scope: the 4 files changed in this PR ( No security issues found. Re-confirming this PR at head
One item from the automated Codex review (manifest-bump P1) is already addressed by this PR's second commit. The other Codex item (migration path for already- |
|
Claude finished @kyle-sexton's task in 2m 7s —— View job Code review complete
Scope: the 4 files changed in this PR, reviewed for correctness/architecture/maintainability at head SummaryThis is a clean, mechanical port and the previously-flagged issue is resolved. I diffed Version-parity gap from the previous review round is now fixed. Test coverage: the two new cases (#15 sole-orphan-skipped, #16 orphan-loses-to-installed-sibling-even-when-newer, at statusline-shim.test.sh#L255-L280) mirror context-guard's equivalent cases and correctly isolate the marker check from the mtime comparison — case 16 in particular gives the orphaned directory the newer mtime specifically so only the marker can decide the outcome, which is the right adversarial shape for this kind of regression test. The Not a new finding, for context: Codex flagged that an operator who already ran No blocking issues found. |
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
Thirteen of the sixteen provisional numbers already matched. Three move up to clear versions claimed by open pull requests that "next patch above main" could not see: bash-format 0.6.11 -> 0.6.12 (#1867 claims 0.6.11) rate-limit-guard 0.4.1 -> 0.4.2 (#1866 claims 0.4.1) source-control 0.45.2 -> 0.46.1 (#1830 claims 0.46.0) Manifest and CHANGELOG heading move together; each entry keeps its position above that plugin's newest shipped entry, and all sixteen remain strictly greater than main. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 1m 14s —— View job Security review complete
Scope: the 4 files changed in this PR ( No security issues found. Re-confirming at current head
Diffed One item raised by the automated Codex review (migration path for already- |
Both sides claimed 0.4.1 for different content and main also shipped 0.4.2, so this entry takes 0.4.3. Both changelog entries kept in full — the orphan-marker fix and main's setup-escaping and hook-utils entries are unrelated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 2m 13s —— View job Code review complete
Scope: the 4 files changed in this PR, reviewed for correctness/architecture/maintainability at head SummaryRe-reviewed after the The Test additions (case 15: sole-orphan-skipped, case 16: orphan-loses-to-installed-sibling-even-when-newer, at Verification note: the sandbox in this session declined to run No blocking issues found. All prior review-round findings (manifest version bump) are resolved; this round's only substantive change from the last-reviewed head is the version renumbering from the |
|
Claude finished @kyle-sexton's task in 1m 7s —— View job Security review complete
Scope: the 4 files changed in this PR ( No security issues found.
This is the fifth review pass on this PR (four prior rounds already covered |
…f INFO Review: the statusline runs the durable copy at ~/.claude/rate-limit-guard/bin/statusline-shim.sh, which a plugin update never overwrites. An operator who ran `apply` before this release keeps running the old shim and keeps selecting orphaned tees, and `check` reported that as INFO. The INFO rule's own premise was "an older revision still resolves the newest tee" — precisely what this PR falsifies. So the classification now turns on what the installed revision can do: >= 3 stays INFO (housekeeping), below 3 or unmarked is FAIL, because the running statusline has a behavior defect rather than drift. Names the trap the finding has to carry: uninstalling first takes the setup skill with the plugin while the stale shim stays behind for its ~14-day orphan window, leaving no in-product path to the remediation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 1m 58s —— View job Code review complete
SummaryThis round adds one new commit ( One cross-plugin consistency finding, posted inline on No blocking issues in this PR's own diff. All prior review-round findings (manifest version bump, |
|
Claude finished @kyle-sexton's task in 1m 54s —— View job Security review complete
Scope: the 5 files changed in this PR ( No security issues found. The substantive new content since the last-reviewed head (
This is the sixth review pass on this PR; all five prior passes (covering |
…te-limit-guard Review: context-guard ships the same revision-3 shim with the same orphan-marker skip and the same durable-copy migration problem, but its setup contract still classified a differing installed copy as INFO. Fixing only rate-limit-guard left the byte-identical cluster's two setup contracts disagreeing about the same defect. The rule already described the failure correctly — a copy predating revision 3 picks the newest tee by mtime and keeps teeing from an uninstalled plugin — and then filed it under INFO because the statusline keeps rendering. Rendering is not the property that matters. Same shape as #1866: >= 3 stays INFO, below 3 or unmarked is FAIL, and the finding must state the migration and the uninstall-first trap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 1m 51s —— View job Code review complete
Scope: this round's only new content is commit SummaryThis commit is the fast-follow I flagged in the previous round:
Verification note: I did not run No blocking issues. This closes out the last open finding from the previous review round (cross-plugin classification asymmetry) and keeps the two setup contracts in lockstep, consistent with how the |
|
Claude finished @kyle-sexton's task in 1m 18s —— View job Security review complete
Scope: all 8 files changed in this PR at head No security issues found. The new content since the last-reviewed head (
This is the seventh review pass on this PR; all six prior passes concluded "no security issues found" for the |
Closes #1849
Summary
Port the context-guard orphan-aware
resolve_tee()fix intorate-limit-guardso an uninstalled plugin stops teeing through superseded version directories during the ~14-day orphan window.Fix
plugins/rate-limit-guard/scripts/statusline-shim.shnow skips cache candidates whose version directory carries.orphaned_at, matching the supported uninstall/update marking documented for Claude Code (same shape as #1787 / PR #1844). Shim revision bumped to 3. Manifest0.4.0→0.4.1with a matching CHANGELOG entry. Two regression cases added: an orphaned-only install is not executed (statusline still renders), and an orphaned newer-mtime sibling loses to an installed one. Shims stay deliberately unregistered as a byte-identical cluster.Verification
bash plugins/rate-limit-guard/scripts/statusline-shim.test.shshellcheck(shim + test)scripts/check-shell-portability.sh origin/mainscripts/check-changelog-parity.sh --check-bump origin/mainscripts/check-cross-plugin-source-drift.sh --checkRelated