Repository navigation
Cite real policy sections in the check registry - #138
Open
anandhu-eng wants to merge 2 commits into
Open
anandhu-eng wants to merge 2 commits into
anandhu-eng wants to merge 2 commits into
Conversation
The first version of the checker numbered its rules by their row in the Rules §9.1 table, and those row numbers ended up written as section numbers: §10 load pattern, §12 query count, §14 metric consistency, §15 accuracy, §1 for the directory checks, §§3–6 for region coverage. 26 of the 84 rules in messages.yaml cited one of them. Each now points to the section that defines what it checks. Seed rotation and publication cohorts are in the Submission Rules (§4.6, §4.2), but were cited bare, which reads as the Rules, where §4.6 does not exist. They now say "Submission Rules §4.6". A catalog test now fails on a spec outside the Rules' §1–§9 or the Submission Rules' §1–§11. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to citations and supporting validation, with no identified blocking issues or changes to compliance-check logic.
No open issues 🎉
What changed in this PR
Corrects policy citations in the submission checker’s message registry, documentation, and comments without changing compliance-check behavior.
Changes:
- Replaces obsolete rule-row numbers with relevant policy sections.
- Explicitly labels citations belonging to Submission Rules.
- Adds citation-format and top-level section-range validation, and updates the annotation expectation.
| File | Description |
|---|---|
tests/tools/regenerate_fixtures.py |
Clarifies seed-policy citations in comments and docstrings. |
tests/submission_checker/test_seed_sets.py |
Qualifies seed-policy citations in docstrings. |
tests/submission_checker/test_messages.py |
Adds citation validation and accepts Submission Rules prefixes. |
tests/submission_checker/test_cohorts.py |
Qualifies cohort-policy citations in docstrings. |
tests/submission_checker/test_checks_seed_binding.py |
Clarifies seed-binding policy references in docstrings. |
tests/submission_checker/test_checks_agentic_accuracy.py |
Removes an obsolete section reference from a docstring. |
tests/endpoints_submission_cli/submissions/test_builder.py |
Qualifies the seed-policy citation in a comment. |
tests/endpoints_submission_cli/conftest.py |
Qualifies the fixture’s seed-policy comment. |
tests/endpoints_submission_cli/commands/test_submissions_commands.py |
Corrects withdrawal-policy references in comments and docstrings. |
tests/endpoints_submission_cli/commands/test_check_submission_command.py |
Updates the expected annotation citation. |
src/submission_checker/seed_sets.py |
Clarifies seed-policy references in documentation. |
src/submission_checker/models/file/point_config.py |
Qualifies seed and cohort citations in comments and docstrings. |
src/submission_checker/models/aggregate/seed_binding.py |
Qualifies seed-binding policy citations in docstrings. |
src/submission_checker/models/aggregate/point_result.py |
Corrects query-count and metric-check docstrings. |
src/submission_checker/models/aggregate/context.py |
Corrects coverage and accuracy references in documentation. |
src/submission_checker/data/seed_sets.yaml |
Qualifies seed-policy citations in comments only. |
src/submission_checker/data/messages.yaml |
Corrects registry citations and seed-message references. |
src/submission_checker/cohorts.py |
Clarifies cohort-policy references in documentation. |
src/submission_checker/cli.py |
Qualifies the seed-policy citation in CLI help. |
src/submission_checker/checker.py |
Corrects the accuracy-presence policy comment. |
src/endpoints_submission_cli/commands/submissions/remove_run.py |
Clarifies the rollback docstring’s policy reference. |
README.md |
Updates check tables, headings, and policy references. |
pyproject.toml |
Qualifies the package-data comment’s seed-policy citation. |
docs/endpoints-submission-cli.md |
Qualifies seed-policy references in CLI documentation. |
Review effort: Balanced
- Region coverage: the requirement is in §5.3; §5.4 defines the regions. Cite both. - src/ checks: §2.2.1 does not mention src/ or its README; §8.1 does. - duration, output-token and sample-accounting checks: the §9.1 "Metric consistency" row now covers only TPOT P90 and tps_per_user. Duration and output tokens are §4.1's system_tps inputs; the issued and completed counts are §6.4's. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The checker's first version numbered rules by their row in the Rules §9.1 table, and those numbers were later written as section numbers. 26 of the 84 rules in
messages.yamlcite one of them: §10, §12, §14 and §15 don't exist, and §1, §§3–6, §7 and §9 exist but are the wrong sections.This PR points each rule at the section that defines what it checks, checked against
endpoints_policiesmain (4ba8224):path-exists,required-dir,point-dirs, …)src-dir,src-readmepoint-count/point-capmax-concurrency-declaredconcurrency-in-rangeload-patternmin-query-countmetric-consistency-{duration,output-tokens}/-accountingaccuracy-gate/accuracy-present/accuracy-sample-countSeed rotation (§4.6) and cohorts (§4.2) are Submission Rules sections but were cited bare, which reads as the Rules (where §4.6 doesn't exist). They now say "Submission Rules §4.6", matching how the CLI already cites that document elsewhere.
The same fixes are applied to the README check tables and to code comments. A new test in
test_messages.pyfails if a spec names a section outside the Rules' §1–§9 or the Submission Rules' §1–§11. It fails on the old catalog.No check behavior changes; only the cited section in output and docs.
🤖 Generated with Claude Code