cluster: baseline 欄位驗證抽成受測 lib + 補 model 驗證 (#116, #115) - #126
Open
kiki830621 wants to merge 2 commits into
Open
cluster: baseline 欄位驗證抽成受測 lib + 補 model 驗證 (#116, #115)#126kiki830621 wants to merge 2 commits into
kiki830621 wants to merge 2 commits into
Conversation
…del (#116, #115) The gate parsed baseline.json in TWO independent inline heredocs — the worklist stage (corpus + language) and the model stage (entries[0].model, validated nowhere). Neither was testable without running the whole gate, while the compare stage has been a tested lib since #34. That asymmetry is exactly where #112's language whitelist and #115's model gap live. #116: scripts/lib/baseline-worklist.py now owns the validation, mirroring baseline-compare.py (standalone, stdlib, exercised via Process from Swift). Interface is --emit worklist|model, and BOTH modes run the complete field pass — validating only the emitted field would recreate the two-heredoc divergence that let model go unchecked. Validation completes before any emission, so a bad field in a later entry leaves stdout empty rather than emitting earlier records. #115: model gains a whitelist in that same pass. Segments are corpus-safe but must start alphanumeric, at most one internal '/', and '..' is rejected outright — so a value can only ever name something one level inside the cache root, never escape it. The empirically reproduced payload 'large-v3-turbo/../../../../../../etc' now fails loud in both emit modes. Byte-identical lock: the extracted worklist output hashes to the same e3f18b26... as the pre-extraction heredoc (12 lines), pinned in the test. Refs #116 Refs #115
This was referenced Aug 1, 2026
Open
…rminator (#126) Five convergent verify findings, all in-scope: - The / branch is removed. Three legs flagged it and the DA settled it by enumerating both sinks: --models takes family/size (whisper/...), a slash in MODEL_DIR yields the unusable .../openai_whisper-owner/repo, so ZERO slash- bearing values work at both. HF-style owner/repo lives in ModelGrid's hfRepo, not the baseline model field — the implementation brief asked for the wrong thing, and a spec derived from an error should be corrected, not implemented. The test that blessed openai/whisper-large-v3 documented behavior the gate cannot perform; it is now in the hostile list. - The '..' substring guard is now locked by a test. Every previous hostile entry failed on some OTHER rule, so deleting that line left the suite green (Codex found this; mutation-confirmed here — deleting it now reddens 6). a..b and large-v3..turbo pass the charset+start rules and are caught only by the substring guard. - '--' terminator at both call sites. Without it a baseline path beginning with '-' lands in argparse's option slot, and --help there exits 0 having validated nothing. A validator must have no rc=0 path that skips validation. - Docstring no longer over-claims. 'can never escape it' became LEXICAL containment, explicitly assuming no hostile symlinks in the cache tree — cd resolves those (#129). 'one level INSIDE' was also imprecise. - CHANGELOG entry added — #112, the analogous sibling, has one; this hole is the same one field over and reaches a cd target plus a CLI arg. Refs #116 Refs #115
Member
Author
Verify Report — PR #126 (#116, #115)Enginemanual fan-out — 3 lens Agents(security / requirements / regression,model: opus)
誠實標記兩點:
AggregatePASS — 0 blocking;5 個 in-scope fix 已於 round-1( Round 1 findings → 修復 → 本 report 為修復後狀態。DA 明確表示無法推翻核心 PASS。 要求覆蓋率8 / 8 Strategy items FULLY addressed(#116 四項 + #115 四項)。 Findings(合併後,Fix 欄 = round-1 commit)
Scope Check無超出 #116/#115 範圍的改動。Round-1 的 5 個修復全部針對本 PR 自身的立論 Process Gaps無。Codex leg 本輪正常完成(前兩輪的 429 已解除)。 Follow-up Findings Filed
誠實的範圍聲明本 PR 關閉的是 |
kiki830621
added a commit
that referenced
this pull request
Aug 1, 2026
Verify found the PR asserting more than the code does — four times, in a change whose whole subject is a log that must not mislead. No behaviour changes; the 14/14 byte-identical certification stands. - safe()'s docstring said a later-added field is 'covered without the author having to remember'. It is not: the wrapping is explicit at 11 sites and a new f-string is unprotected until someone wraps it. The docstring now states that, plus the scope it actually has (C0/DEL/C1, so no ANSI sequence and no cursor return) and the scope it does NOT (U+2028, bidi overrides — no control byte needed; unreachable here only because corpus and language are whitelisted upstream). - 'keeps the offending bytes diagnosable' overstated it: backslash is not escaped, so a real ESC renders identically to a benign literal '\x1b'. Now 'stays visible'. - The CHANGELOG's 'unlike golden/tolerance/error_rate it never passes through float()' implied float() was validating those. It is a conversion — it accepts NaN and Infinity, and the gate then reports exit 0 on a real regression. Filed as #134 rather than fixed here: the suggested three-line fix was tested and does not close the class (a JSON string "NaN" never reaches parse_constant). - The headline claimed baseline values no longer reach the CI log unescaped, but regression-gate.sh still echoes model unescaped. Scoped to 'the compare stage'. Not fixed here because PR #126 deletes the exact heredoc involved and already rejects ESC/CR via MODEL_RE — a fix here would collide. Also records the risk no leg had named: METRICS here, MetricKind in Swift and metric_kind in the bench validator are three copies with no coupling test, and because the check returns early, one legitimate future metric would suppress the verdict for every corpus. Refs #117
4 tasks
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.
Refs #116
Refs #115
Summary
Cluster PR — two issues on the same named resource (the gate's baseline field-validation channel), in the order the diagnoses established: extract-and-test first (#116), then add the missing validation (#115). Doing them apart would have written the module twice.
#116 — the gate parsed
baseline.jsonin two independent inline heredocs: the worklist stage (corpus+language) and the model stage (entries[0].model, validated nowhere). Neither was testable without running the whole gate — while the compare stage has been a tested lib since #34. That asymmetry is precisely where #112's language whitelist and #115's model gap live: one heredoc refactor could silently drop a whitelist with no test going red.scripts/lib/baseline-worklist.pynow owns the validation, mirroringbaseline-compare.py's shape. Interface--emit worklist|model, and both modes run the complete field pass — validating only the emitted field would recreate the very divergence that letmodelgo unchecked.#115 —
modelgains a whitelist in that same pass. It reaches a path sink (MODEL_DIR→cd) and a CLI arg (--models), which is why #112 didn't remove the traversal capability — it just moved the payload one field over.Verification
Independently re-verified by the orchestrator, not taken on the implementer's report:
e3f18b26660a8132…, the same sha the regression-gate.sh:baseline language 欄位未驗證即入 worklist TSV(follow-up from #109 verify) #112 verify recorded for the pre-extraction heredoc;diffof pre/post extraction output is clean (12 lines).✗ gate error: unsafe model in baseline: 'large-v3-turbo/../../../../../../etc'--emit modelagainst a baseline carrying regression-gate.sh:baseline language 欄位未驗證即入 worklist TSV(follow-up from #109 verify) #112's\n-injection language payload also exits 1 — single validation channel, no two-heredoc divergence.modelon the 8th entry (notentries[0]) still fails loud.swift buildclean;swift test --filter Regression→ 22 tests / 2 suites pass (existing compare tests untouched);bash -nOK.Checklist
Generated by /idd-all cluster mode. Do NOT add a GitHub close trailer — IDD discipline requires manual /idd-close after merge.