Repository navigation
Require Non-Empty Model Names in the Tier Config and Name Both Release Edits - #3522
Conversation
…e Edits The validator now rejects a model value that is not a non-empty string, which the deployed guard would read as an unreadable mapping. The guard's docstring names the AGENTS.md table alongside spec/model-tiers.json as a model release's edits. The tier tests hold the models mapping as their own typed fixture rather than indexing through an untyped config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
🟢 Approval recommended
The change is a narrow validator tightening with a matching test, and the docstring now matches the sync check that model_tier_errors already enforces.
No open issues 🎉
What changed in this PR
This change answers review findings on promotion pull request #3521. It makes the hub's model tier validator reject any tier model value that is not a non-empty string. The guard's docstring now names both edits a model release needs, the tier config and the AGENTS.md tier table. The tier tests also get a typed models fixture and a new test for bad model values.
Changes:
spec/validate.pyadds a check that every tier model is a non-empty string. Anull, number, or empty value now produces a clear error instead of reaching the deployed guard.tests/test_spec_validate.pymoves themodelsmapping into a typed fixture, which removes the# type: ignore[index]. A new subtest coversnull,7, and"".host-setup/agent-safety/claude/model-tier-guard.pyupdates the module docstring so a model release is described as an edit to both the hub'sspec/model-tiers.jsonand itsAGENTS.mdtier table.
| File | Description |
|---|---|
| tests/test_spec_validate.py | Adds a typed models fixture and a subtest that rejects a null, numeric, or empty tier model. |
| spec/validate.py | Rejects any tier model that is not a non-empty string, placed after the existing tier-set check on the same error path. |
| host-setup/agent-safety/claude/model-tier-guard.py | Docstring now names both the tier config and the AGENTS.md table as the places a model release edits. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3522 +/- ##
========================================
Coverage 81.53% 81.54%
========================================
Files 26 26
Lines 8964 8967 +3
========================================
+ Hits 7309 7312 +3
Misses 1655 1655
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…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)
Summary
This answers the review findings on the promotion pull request #3521:
spec/validate.pyrejects a tier model value that is not a non-empty string. The deployed guard'sload_tiers()reads such a value as an unreadable mapping and then refuses every named model.spec/model-tiers.jsonand itsAGENTS.mdtier table, rather than the mapping alone.modelsmapping as a typed fixture of their own, which drops an unexplained# type: ignore[index]. A new test covers anull, numeric, and empty model value.🤖 Generated with Claude Code