Skip to content

Reject a Repeated Tier Name and Name Every Hook the Installer Registers - #3527

Merged
ptr727 merged 5 commits into
developfrom
promotion-3521-tiers-and-installer-doc
Oct 27, 2026
Merged

ptr727 merged 5 commits into
developfrom
promotion-3521-tiers-and-installer-doc

Conversation

@ptr727

@ptr727 ptr727 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Summary

This answers the sixth round of review findings on the promotion pull request #3521:

  • A repeated tier name. model_tier_errors compared each tool's models against tiers as sets, so a tiers list that repeats a name passed. It now reports "tiers must not repeat a name", and a test covers it.
  • The installer's account of its hooks. The module docstring named one PreToolUse hook and two registered hooks. It now names both PreToolUse hooks, the model-tier guard's mapping, and the three hooks it registers. A class sweep of the same file found more wording of this kind, and this fixes it:
    • The --report check now labels the write guard as such, rather than as "the PreToolUse hook" or a bare "guard".
    • The settings-file messages now say "the hooks" where several hooks go unregistered.

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 27, 2026 13:15
The tier validator rejects a tiers list that repeats a name, which the set comparison against each tool's models let through. The installer's module docstring names both PreToolUse hooks, the model-tier guard's mapping, and the three hooks it registers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lUse Hook

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he Write Guard

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 27, 2026 20:19
@ptr727

ptr727 commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head b2bcafc3928ac1cee2af85990ec0faed0ac88247, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved review comments request removing incidental hook counts and explicitly naming the write guard in the absent-registration message.

1 open issue
What changed in this PR

This pull request rejects repeated model-tier names and updates the Claude installer’s hook documentation and registration diagnostics.

Changes:

  • Adds validation and regression coverage for duplicate tier names.
  • Documents the installer’s model-tier guard and registered hooks.
  • Clarifies hook-registration and write-guard diagnostics.
File Summary
tests/​test_spec_validate.py Adds coverage for repeated model-tier names.
spec/​validate.py Rejects duplicate entries in the tiers configuration.
host-setup/​agent-safety/​claude/​install.py Updates hook documentation and registration diagnostics.

Review effort: Lite

Comment thread host-setup/agent-safety/claude/install.py Outdated
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.58%. Comparing base (557ac28) to head (1b59b7c).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3527      +/-   ##
===========================================
+ Coverage    81.56%   81.58%   +0.02%     
===========================================
  Files           26       26              
  Lines         8970     8972       +2     
===========================================
+ Hits          7316     7320       +4     
+ Misses        1654     1652       -2     
Flag Coverage Δ
python-3.13 81.58% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ptr727 and others added 2 commits October 27, 2026 13:32
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 1b59b7cf15ad744dec9a27a59402a3b7ccc704c6, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727
ptr727 merged commit f0c1d25 into develop Oct 27, 2026
13 checks passed
@ptr727
ptr727 deleted the promotion-3521-tiers-and-installer-doc branch October 27, 2026 20:41
ptr727 added a commit that referenced this pull request Oct 27, 2026
…ain (#3521)

## Summary

This promotes three changes to `main`:

- [#3516](#3516) maps
model tiers in one config, `spec/model-tiers.json`, carries the "Model
Tiers" rule into the skills that dispatch, and adds a guard that refuses
a highest-tier dispatch the maintainer did not allow.
- [#3518](#3518) has the
agent-safety installer's hooks share one registration helper.
- [#3520](#3520) has those
hooks share one registration-check loop.

It also carries the fixes for this promotion's own review findings, each
landed on `develop` first:

- [#3522](#3522) requires
a non-empty model name per tier and names both edits a model release
makes.
- [#3523](#3523) states
what the highest-tier allowance covers and where the guard stops.
- [#3524](#3524) rejects a
tier sharing the maintainer-only model and states the allowance as
conduct.
- [#3525](#3525) matches
the guard's alias boundaries regardless of case.
- [#3526](#3526) mirrors
the guard's CI self-tests in the local runbook.
- [#3527](#3527) rejects a
repeated tier name and names every hook the installer registers.

Closes #3517
Closes #3519

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

2 participants