Skip to content

Commit fecfcf1

Browse files
committed
Document the warning in the gate guide and enforce that coverage
Closes the three review findings the dedup did not: the message no longer asserts that both directories already exist (one record does not show that), datastore-gate.md gains a section for the check, and a test asserts every REGISTERED_CHECKS entry is named in that guide - replacing the docstring note that asked the next author to remember. The three low findings on the refresh tool went away with the tool. 424 passed, 20 skipped with evaleval#190's registry files overlaid.
1 parent 77b5943 commit fecfcf1

3 files changed

Lines changed: 58 additions & 5 deletions

File tree

.claude/skills/eee-dataset-conversion/reference/datastore-gate.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,25 @@ Re-derive this list from `REGISTERED_CHECKS`, `_DEPLOYMENT_TYPES`,
6565
(`api|local|unknown`, `closed_source|open_weights_deployment|other`). Read the enums
6666
from the installed validator, not from an existing record or an old bot message.
6767

68+
## §developer — `check_developer_slug` (registered as **warning**)
69+
- Fires when `model_info.id`'s namespace prefix or `model_info.developer` is a *second
70+
name* the eval-card-registry confirms for a publisher — a genuinely different name,
71+
model families included (`mistral` for `mistralai`, `glm` for `zai`, `kimi` for
72+
`moonshotai`). The datastore takes the publisher directory from that prefix, or from
73+
`developer` when the id is flat, so two names for one publisher is two directories.
74+
- Silent on a canonical id, a HuggingFace namespace the registry records for one
75+
(`meta-llama` is Meta), a case or punctuation variant of either (`Anthropic`, `z-ai`),
76+
and any name the registry has never seen.
77+
- **The message names both spellings and picks neither.** Which name is primary is one
78+
editorial choice for the whole datastore, and the registry's canonical id is often the
79+
*rarer* of the two spellings already published. Match how the publisher is already filed
80+
datastore-wide; do not treat the message as an instruction to use the registry's id.
81+
- One record only proves the alias relation and this record's directory — not that the
82+
other directory is already populated. Fix it by choosing the spelling and correcting the
83+
adapter's mapping, so every future record agrees.
84+
- Warning, not error: the affected records are already published and the fix changes join
85+
keys. Exit code stays 0.
86+
6887
## §publish — `publish_evaluation_logs`
6988
**Mind which root each entry point wants — they differ, and a mismatch is silent until
7089
the path check rejects the depth:** `publish_evaluation_logs(base_output_dir=…)` takes the

every_eval_ever/validator/validation_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,11 @@ def check_developer_slug(data: dict[str, Any]) -> list[str]:
632632
warnings: list[str] = []
633633
for canonical, (locations, spellings) in declared.items():
634634
consequence = (
635-
'two datastore directories for one publisher, neither listing '
636-
'complete'
635+
'filing under both puts one publisher in two datastore '
636+
'directories, neither listing complete'
637637
if directory_field in locations
638638
else 'the id prefix picks the directory here, so this field '
639-
'splits none, but anything grouping by developer sees two'
639+
'splits none, but anything grouping by developer reads two'
640640
)
641641
found = '/'.join(repr(spelling) for spelling in sorted(spellings))
642642
warnings.append(

tests/test_skill_conversion.py

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
those templates.
1010
1111
Scope: this catches drift in what the templates emit. A new validator rule that the
12-
reference conversion already satisfies leaves it green, so re-derive
13-
``reference/datastore-gate.md`` from ``REGISTERED_CHECKS`` when adding a check.
12+
reference conversion already satisfies leaves it green;
13+
``test_every_registered_check_is_documented_in_the_gate_guide`` covers that gap.
1414
1515
Regenerate the frozen conversion after a deliberate change:
1616
@@ -20,6 +20,7 @@
2020
from __future__ import annotations
2121

2222
import importlib.util
23+
import inspect
2324
import json
2425
import re
2526
import shutil
@@ -33,6 +34,7 @@
3334
from every_eval_ever.helpers import SCHEMA_VERSION
3435
from every_eval_ever.helpers.io import SourceRecordsError
3536
from every_eval_ever.validate import main as validate_main
37+
from every_eval_ever.validator.validation_core import REGISTERED_CHECKS
3638

3739
# --------------------------------------------------------------------------- setup
3840

@@ -64,6 +66,38 @@ def _remedy(what_broke: str, *, where: str, regenerate: bool = True) -> str:
6466
return '\n'.join(lines)
6567

6668

69+
# -------------------------------------------------------------------- gate reference
70+
71+
GATE_GUIDE = SKILL_DIR / 'reference' / 'datastore-gate.md'
72+
73+
74+
def test_every_registered_check_is_documented_in_the_gate_guide():
75+
"""A contributor meets the semantic checks through the guide, not the source."""
76+
guide = GATE_GUIDE.read_text(encoding='utf-8')
77+
documented = {}
78+
for check in REGISTERED_CHECKS:
79+
names = re.findall(
80+
r'return (check_\w+)\(', inspect.getsource(check.run)
81+
)
82+
assert names, _remedy(
83+
f'cannot tell which check {check.name!r} runs, so this test could '
84+
'not confirm the guide documents it.',
85+
where=(
86+
'keep each REGISTERED_CHECKS wrapper a `return check_x(...)`, '
87+
'or widen the pattern here'
88+
),
89+
regenerate=False,
90+
)
91+
documented[check.name] = [name for name in names if name not in guide]
92+
93+
missing = {name: gap for name, gap in documented.items() if gap}
94+
assert not missing, _remedy(
95+
f'registered checks absent from datastore-gate.md: {missing}',
96+
where=f'add a section for each to {GATE_GUIDE.relative_to(REPO_ROOT)}',
97+
regenerate=False,
98+
)
99+
100+
67101
# ------------------------------------------------------------------ skill templates
68102

69103

0 commit comments

Comments
 (0)