Repository navigation
gate_qwen38_serve, gate_ds41_serve: a completion agrees with its reference by serve_client::agree alone - #1092
Conversation
…rence by serve_client::agree alone Both gates carried a private copy of serve_client::agree, the EOS prefix exception included. They import the shared one now, so the rule has one owner, and a unit test holds that rule.
There was a problem hiding this comment.
Verdict: CLEAN: The gates reuse the existing agreement rule without changing its behavior.
Checked
- Duplicates: 1 new item checked; no duplicate test found. Both removed functions and the inline match equal the existing owner. No dryer pairs were supplied.
- Complexity: crapper flagged no functions. The inline match is replaced by a call; no decision logic is added.
- Silent failure: 0 added default or discarded-error sites.
- Tests: agreement test:1688 protects the predicate at line 536. Allowing empty EOS output, accepting prefixes for every stop, or requiring full equality at EOS each contradicts an assertion. Static inspection only; tests were not executed locally.
- Gates: no tolerance, pin, or gate clause is removed or relaxed.
- Escape catalog: no patterns matched. No engine hot path changes.
Notes
dryer did not run, according to diagnostics; source searches covered duplication.
The GPU output names head dd016ef5, not the current head fac355ba; no just gate-* run is shown.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_ds41_serve.rs, crates/gpu-gates/src/bin/gate_qwen38_serve.rs, crates/gpu-gates/src/serve_client.rs and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
Filed outside this PR: #1094
|
The review is done and the contribution check passed, so I'm merging this. |
gate_qwen38_serve와 gate_ds41_serve가 각자 가진
agree복사본을 지우고 공용serve_client::agree하나만 쓰게 하는 수정입니다.What and why
gate_qwen38_serveandgate_ds41_serveeach kept a private copy ofagree, the rule that decides whether a served completion matches its reference: every id when the run hit its limit, and a non-empty prefix only when it stopped at the end-of-generation id.gate_ds41_servealso spelled the same rule inline in itscompletion_ids_are_generate_ds41clause.serve_client::agreealready holds this rule and the other server gates use it. Fixes #1076. Both gates now import it, the copies and the inline match are removed, andserve_clientgets one test that pins the rule (the engine runtime is untouched).Release notes: internal: the two serve gates share one completion-agreement rule, so a change to it cannot leave a gate behind.
Code shape
The review reads these first. A box left unticked needs one line of why.
copying it (
AGENTS.md"Common code first",docs/rust-quality.mdR14). Where I found an existing copy, Inamed it below.
(tensor shapes, the attention kind, the quant). A common owner gained no per-model branch, flag or trait method.
tools/check-comments.sh).PIN(YYYY-MM-DD):and its reason.
cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line), or "none": removedfn agreefromcrates/gpu-gates/src/bin/gate_qwen38_serve.rsandcrates/gpu-gates/src/bin/gate_ds41_serve.rs, and the inlinematch stopin thecompletion_ids_are_generate_ds41clause of the latter. The one owner isserve_client::agreeincrates/gpu-gates/src/serve_client.rs.What I ran
Base
9f35aa59b2c472382f496cdab681b472f13c1dac, PR headdd016ef5a1063121d2ecfa47d7eacddc7b983257.Model:
Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf, sha2564448186216b3af4cc558bbce2c3213f01608f8f8b2e5267a9767971dd3ec8082.Both gates build, and the drafted arm of
gate_qwen38_serveruns. Itsdrafted_ids_are_its_stepsclause callsagree:The new test passes on the fix. With the
eosarm changed to accept an empty run ("eos" => reference.starts_with(ids)), the same command fails:Hardware (if the change is for a machine)
One NVIDIA GB10, driver 595.84, CUDA 13.3. The gate runs above used it.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.