Skip to content

Require Non-Empty Model Names in the Tier Config and Name Both Release Edits - #3522

Merged
ptr727 merged 2 commits into
developfrom
promotion-3521-review-fixes
Oct 27, 2026
Merged

ptr727 merged 2 commits into
developfrom
promotion-3521-review-fixes

Conversation

@ptr727

@ptr727 ptr727 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Summary

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

  • spec/validate.py rejects a tier model value that is not a non-empty string. The deployed guard's load_tiers() reads such a value as an unreadable mapping and then refuses every named model.
  • The guard's docstring names both edits a model release makes, the hub's spec/model-tiers.json and its AGENTS.md tier table, rather than the mapping alone.
  • The tier tests hold the models mapping as a typed fixture of their own, which drops an unexplained # type: ignore[index]. A new test covers a null, numeric, and empty model value.

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 27, 2026 11:23
…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>
Copilot AI lite review requested due to automatic review settings October 27, 2026 18:25
@ptr727

ptr727 commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 07edec5d1b9afc3c82f963ddc7950c0f46ed0512, 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.

🟢 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.py adds a check that every tier model is a non-empty string. A null, number, or empty value now produces a clear error instead of reaching the deployed guard.
  • tests/test_spec_validate.py moves the models mapping into a typed fixture, which removes the # type: ignore[index]. A new subtest covers null, 7, and "".
  • host-setup/agent-safety/claude/model-tier-guard.py updates the module docstring so a model release is described as an edit to both the hub's spec/model-tiers.json and its AGENTS.md tier 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

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.54%. Comparing base (487ed74) to head (07edec5).

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           
Flag Coverage Δ
python-3.13 81.54% <100.00%> (+<0.01%) ⬆️

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
ptr727 merged commit 6a751a2 into develop Oct 27, 2026
14 checks passed
@ptr727
ptr727 deleted the promotion-3521-review-fixes branch October 27, 2026 18:33
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