Skip to content

fix: fix(context-guard, rate-limit-guard): lead band rows with the plugin name and the deciding word - #10157

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-6321-40261899943-1
Oct 26, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-6321-40261899943-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #6321

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Each guard's band row now starts with the plugin's name, as the user-interface mod guidance asks (plugins/user-interface/reference/types/mods.md:32-34). context-guard's row also puts the zone before the figure, so a row cut short still shows it: context-guard: smart 23%, context-guard: dumb, compacted 23% after a compaction, and context-guard: - before the first response. rate-limit-guard's row is now rate-limit-guard: 5h 3% | 7d 73%. The band tests, both READMEs and one patch changelog fragment per plugin are updated.

Not verified

  • The band tests (claude plugin test on both plugins) were not run: check-affected skips it in this lane because it runs code from the checked tree. The updated test expectations were checked by reading only and are left to the PR's CI validate-plugins run.
  • The release record is two changelog fragments, not a hand-made version bump and CHANGELOG line, because the repo runs in fragment mode (ADR 0048). new-changelog-fragment refused to run on a detached HEAD, so the fragments were written by hand in its naming format; check-changelog-fragments accepts t
  • typos not installed, so the spelling check was skipped; CI runs it.

Fix

  • plugins/context-guard/hooks/register.tsx: bandText returns context-guard: <zone> <n>% (zone left out when unknown), or context-guard: - with no reading; it uses the module's existing PREFIX
  • plugins/context-guard/hooks/context-guard.test.ts: adds a whole-row BAND_ROW regex used by the bandRow helper; notice() leaves band rows out, since both start with the prefix; band expectations use the new rows
  • plugins/context-guard/README.md: documents the new band row format
  • plugins/rate-limit-guard/hooks/register.tsx: bandText puts rate-limit-guard: before the window figures
  • plugins/rate-limit-guard/hooks/rate-limit-guard.test.ts: BAND_ROW matches rate-limit-guard: 5h <x> | 7d , which a notice row (rate-limit-guard: 5h at the ...) does not match; row expectations use the new format
  • plugins/rate-limit-guard/README.md: documents the new band row format
  • .changes/context-guard/fix-6321-band-row-plugin-name-3f9c1a6e.md: new patch fragment (### Changed)
  • .changes/rate-limit-guard/fix-6321-band-row-plugin-name-8b4d2e07.md: new patch fragment (### Changed)

Verification

The runner ran each check from the base copy against 84c1713:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • .lane/checks/bin/check-changelog-fragments: all 7 fragments under .changes/ are valid (run after the review fixes)
  • .lane/checks/bin/check-affected: 9 passed, 7 skipped over 8 changed files; the skipped ones included claude plugin test (mods), shellcheck, ruff, typos and changed-skills (run after the review fixes)
  • fresh-context review subagent over the whole diff: no correctness bugs; it found that the context-guard notice() helper would also match the new band row, which is fixed by excluding BAND_ROW
  • grep for the old row formats (ctx <n>%, 5h <x>%, ^5h ) across the repo: none left outside released CHANGELOG entries and an unrelated go-no-go record
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40261899943

Left out: the items under Not verified.

Related

#6321

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 84c1713a91998f7238ee65c7c617a75d88367008: 0 finding(s), 0 as inline comments.

No security issues found in this pull request.

The change only reformats the band row text in context-guard and rate-limit-guard (bandText in each register.tsx), with matching test, README and changelog-fragment updates.

  • Data flow: the new text interpolates only the module's constant PREFIX ('context-guard: '), a numeric percent and a zone enum value. No user-controlled string reaches the row, and nothing is executed, parsed or sent anywhere.
  • Trusted paths: none of the 8 changed files match a trusted-path glob.
  • Plugin manifests: no plugin.json or marketplace.json changed, so there are no manifest <field> lines.
  • Instruction surface: no standing instruction, rule, hook allowlist or block list is deleted or softened.
  • PR context: it contains no embedded directives.
  • Spend: the change draws on no prepaid credit or paid resource.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 84c1713a91998f7238ee65c7c617a75d88367008: 0 finding(s), 0 as inline comments.

No findings. I read the full diff and PR context, and checked the changed code against its callers and tests. I ran no tests myself. The PR says the band tests were not run in its lane, so the updated expectations are unverified by anyone here.

Closing issue #6321 criteria

  • context-guard row reads context-guard: <zone> <n>%, or context-guard: - with no reading. Met: bandText in plugins/context-guard/hooks/register.tsx returns ${PREFIX}- or ${PREFIX}${zone}${r.percent}%, and PREFIX is 'context-guard: '. Tests cover the dash, the smart zone, dumb, compacted, and the toggle and refused-registration paths.
  • rate-limit-guard row reads rate-limit-guard: 5h <x>% | 7d <y>%. Met, and the tests assert the exact strings.
  • Band tests and both READMEs are updated, with a version bump and CHANGELOG line per plugin. Met: both plugins have a bump: patch fragment with a ### Changed entry, which is the repo's release record in fragment mode.

Checks

  • Both bandText functions are only used in the band Text row and in change detection (register.tsx:414 in context-guard, :374 in rate-limit-guard), so the format change has no other consumers.
  • context-guard's notice() helper matches /context-guard:/. It now filters out BAND_ROW, so a band row cannot be counted as a notice. In the tests that mount the UI, the band option is on only in the band tests and the refused-registration test, and those use bandRow.
  • rate-limit-guard's NOTICE regex (/^(FYI, )?rate-limit-guard: /) would also match a band row. The tests that use it never enable the band option, so they are unaffected. This is a latent coupling only.
  • The old formats (ctx <n>%) remain only in released CHANGELOG history.

Manifest items: the diff touches no plugin.json or marketplace.json, so none apply.

Trusted paths: no changed file matches the listed globs.

Cost: none.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 84c1713a91998f7238ee65c7c617a75d88367008.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 51bde41 Oct 26, 2026
42 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-6321-40261899943-1 branch October 26, 2026 08:53
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.

fix(context-guard, rate-limit-guard): lead band rows with the plugin name and the deciding word

0 participants