feat(THU-749): eval production parity, search-necessity gate, and CI - #1191
Draft
ital0 wants to merge 31 commits into
Draft
feat(THU-749): eval production parity, search-necessity gate, and CI#1191ital0 wants to merge 31 commits into
ital0 wants to merge 31 commits into
Conversation
Semgrep Security ScanNo security issues found. |
|
Preview environment deployed 🚀
Stack: Auto-destroys on PR close/merge. Login via the bundled Keycloak realm — |
AI Eval SmokeNo baseline yet — first scheduled run will create one. opus/piGates: failed Core suite: 3/3 passed · no baseline
Failed scenarios (2)
glm/legacyGates: failed Core suite: 3/3 passed · no baseline
Failed scenarios (1)
flash/piGates: failed Core suite: 3/3 passed · no baseline
Failed scenarios (2)
Full eval report artifact · Generated 2026-08-05T20:17:00.766Z |
PR Metrics
Updated Wed, 05 Aug 2026 20:18:51 GMT · run #2604 |
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.
Closes THU-749. Locks in the THU-748 search-policy rewrite with a regression gate, brings the eval runner to production parity, and wires everything into CI.
Production parity
createBuiltInAdapter— the exact production seam — instead of callingaiFetchStreamingResponsedirectly. Opus 4.8 and DeepSeek V4 Flash run on the Pi harness, GLM 5.2 on the legacy/Tinfoil pipeline, decided by the adapter's own routing (isPiModelCandidate, now exported).defaultModelsinshared/defaults/models.ts(no hardcoded list); scenario ids gain an engine segment (model/engine/mode/ID) and anEVAL_ENGINESfilter. A snapshot-style test fails loudly when a new default model lacks an eval slug.webToolBudgetmirrorschat-instance.tsexactly (createWebToolBudget(resolveWebToolIntent(...))).EVAL_timeout→EVAL_TIMEOUT(documented name never worked), timeouts now abort the in-flight request and stream parsing, README drift corrected (single shared DB, not per-scenario).Search-necessity gate
never_search,answer_then_offer,single_search,research,unknown_entity,false_premise,adversarial_no_search,multi_turn_reuse, andsearch_wont_helpbehindEVAL_NECESSITY_OPTIONAL), each with a quarterlyreviewBydate surfaced by the report when overdue.search/fetch_contentonly — Pi coding tools never count) is the primary metric: newminToolCalls, web-scopedmaxToolCalls,noDuplicateToolCalls./researchsuite.CI (
.github/workflows/evals.yml)src/ai/**,src/acp/**,shared/agent-core/**,shared/defaults/**), deterministicEVAL_SMOKE=1subset at k=1, backend booted with pglite + anonymous Better Auth session (no auth bypass), sticky PR comment (marker-upserted) showing gates, headline metrics, and per-category deltas vs checked-in baselines with Wilson-bound significance.workflow_dispatch, full matrix at k=3, uploads report/metrics artifacts, and opens/updates a draftevals/baseline-refreshPR when baselines drift — PRs never need a before/after double run; the "before" always comes from baselines produced on main.Validation
Run live 6× against a CI-mirrored local backend (pglite + anonymous auth + real provider keys). The battery caught and fixed five real defects: a
localStoragecrash at startup (no DOM under plainbun run), judge 500s (backend proxy is streaming-only), a GLM hang (happy-dom's fetch shadowed Bun natives and deadlocked the encrypted Tinfoil stream), a research-category criteria bug, and core scenarios missing from the metrics JSON. Post-fix:flash/piandglm/legacyrun end-to-end; deterministic categories are stable across runs; observed GLM intermittency traced to transient search-provider (Exa) socket failures — the Tinfoil reliability canary working as intended.Before merging
ANTHROPIC_API_KEY,FIREWORKS_API_KEY,TINFOIL_API_KEY,EXA_API_KEY.workflow_dispatch→ full) generates the initial baselines; the PR comment degrades gracefully ("no baseline yet") until then.