Skip to content

Commit 0a3183b

Browse files
committed
chore: refresh the committed OpenAPI spec and derive the stale-group count
The spec embeds route docstrings, and `list_users` lost the `:rtype:` line its new `response_model=` makes redundant. The schema itself is byte-identical, which is the confirmation that pinning the response model preserved the published contract exactly. The stale-group assertion wrote down a count equal to every registered group but the one its fixture matches, so adding a group failed it for a reason the test is not about. Derive it from `GROUPS` instead. Claude-Session: https://claude.ai/code/session_01XBazM9VWrYcgSrJoQszTNT
1 parent 8498398 commit 0a3183b

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

frontend/packages/api/specs/main.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/scripts/test_classify_ty_diagnostics.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,20 @@ def test_check_names_a_group_that_matched_nothing_in_the_baseline(tmp_path, caps
323323
The baseline is the only run where a zero means drift rather than a group
324324
doing its job, and naming it is the whole effect: a retired artifact class
325325
loses no first-party diagnostic, so there is nothing for the gate to reject.
326+
327+
The expected count is derived rather than written down: exactly one group
328+
matches this fixture, so every other registered one is stale, and a literal
329+
would fail the next time a group is added for a reason unrelated to this.
326330
"""
327331
manifest = _manifest(tmp_path, _output(ARTIFACT_ROW, FIRST_PARTY_ROW))
328332

329333
assert _check(tmp_path, manifest, _output(FIRST_PARTY_ROW)) == 0
330334
out = capsys.readouterr().out
331-
assert "STALE groups (matched nothing in the baseline, advisory): 10" in out
335+
stale_count = len(classify_ty_diagnostics.GROUPS) - 1
336+
assert (
337+
f"STALE groups (matched nothing in the baseline, advisory): {stale_count}"
338+
in out
339+
)
332340
assert "pydantic-settings-private-kwargs" not in out.split("STALE groups")[1]
333341

334342

0 commit comments

Comments
 (0)