You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .specsmith/testcases.json
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2628,6 +2628,28 @@
2628
2628
"expected_behavior": {},
2629
2629
"confidence": 1.0
2630
2630
},
2631
+
{
2632
+
"id": "TEST-282",
2633
+
"title": "HF Leaderboard Sync Persists Bucket Scores to JSON",
2634
+
"description": "`sync_from_huggingface_blocking(force_static=True, scores_path=tmp_path/\"scores.json\")` creates the file at the given path, whose JSON root contains a `\"bucket_scores\"` dict. Each entry has `reasoning_score`, `conversational_score`, `longform_score`, and `model_name` keys.",
2635
+
"requirement_id": "REQ-263",
2636
+
"type": "unit",
2637
+
"verification_method": "pytest",
2638
+
"input": {},
2639
+
"expected_behavior": {},
2640
+
"confidence": 1.0
2641
+
},
2642
+
{
2643
+
"id": "TEST-283",
2644
+
"title": "HF Token Included in Request Headers When Set",
2645
+
"description": "When `SPECSMITH_HF_TOKEN` is set to a non-empty string, `test_hf_connection()` returns `{\"token_set\": true}` and the rate_limit_tier includes \"authenticated\". The `_fetch_page` request (captured via mock) includes `Authorization: Bearer <token>` in its headers.",
2646
+
"requirement_id": "REQ-265",
2647
+
"type": "unit",
2648
+
"verification_method": "pytest",
2649
+
"input": {},
2650
+
"expected_behavior": {},
2651
+
"confidence": 1.0
2652
+
},
2631
2653
{
2632
2654
"id": "TEST-263",
2633
2655
"title": "HF Leaderboard Static Fallback Loads Without Network",
-**Description**: Ported 7 AI intelligence systems from glossa-lab: HF Open LLM Leaderboard sync with paginated fetch, bucket scoring (reasoning/conversational/longform), static fallback, and CLI (`model-intel scores/sync/recommendations/connection`); 40+ model capability profiles with context-aware history trimming; LLMClient with O-series parameter translation, vLLM guided-JSON, and provider fallback; EMA-based rate limit scheduler with adaptive concurrency; endpoint preset registry (10+ presets) with `/api/model-intel/*` REST endpoints; `agent suggest-profiles` and `agent endpoint-presets` CLI commands; Kairos AI Providers page bucket score columns and Sync Scores button. ARCHITECTURE.md §21-27 added. 280 REQs, 258 TESTs. All CI green.
-**Description**: Audit revealed REQ-263 (HF paginated sync persists bucket scores) and REQ-265 (HF API token in Authorization header) lacked explicit pytest coverage. Added TEST-282 (`TestHFSyncPersistsBucketScores` — verifies scores.json created with bucket_scores dict and all required keys per entry) and TEST-283 (`TestHFTokenInHeaders` — verifies token_set flag, rate_limit_tier, and Authorization header capture via mock). Both entries added to docs/TESTS.md. `specsmith sync` updated testcases.json to 260 entries.
Copy file name to clipboardExpand all lines: docs/TESTS.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2605,6 +2605,28 @@
2605
2605
-**Expected Behavior:** JSON stub displayed; file updated after add
2606
2606
-**Confidence:** 0.8
2607
2607
2608
+
## TEST-282. HF Leaderboard Sync Persists Bucket Scores to JSON
2609
+
-**ID:** TEST-282
2610
+
-**Title:** HF Leaderboard Sync Persists Bucket Scores to JSON
2611
+
-**Description:**`sync_from_huggingface_blocking(force_static=True, scores_path=tmp_path/"scores.json")` creates the file at the given path, whose JSON root contains a `"bucket_scores"` dict. Each entry has `reasoning_score`, `conversational_score`, `longform_score`, and `model_name` keys.
2612
+
-**Requirement ID:** REQ-263
2613
+
-**Type:** unit
2614
+
-**Verification Method:** pytest
2615
+
-**Input:** tmp_path/"scores.json" as scores_path; force_static=True
2616
+
-**Expected Behavior:** file created; contains bucket_scores dict; at least one entry with all required keys
2617
+
-**Confidence:** 1.0
2618
+
2619
+
## TEST-283. HF Token Included in Request Headers When Set
2620
+
-**ID:** TEST-283
2621
+
-**Title:** HF Token Included in Request Headers When Set
2622
+
-**Description:** When `SPECSMITH_HF_TOKEN` is set to a non-empty string, `test_hf_connection()` returns `{"token_set": true}` and the rate_limit_tier includes "authenticated". The `_fetch_page` request (captured via mock) includes `Authorization: Bearer <token>` in its headers.
2623
+
-**Requirement ID:** REQ-265
2624
+
-**Type:** unit
2625
+
-**Verification Method:** pytest
2626
+
-**Input:** SPECSMITH_HF_TOKEN="hf_test_token" in environment
0 commit comments