Repository navigation
Adopt verified public Support Desk 0.2.12 - #72
Conversation
|
OpenRouter review posted ( |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: issues
Scope: full-pr (full-pr)
Mode: initial
Commit: 1c83d8b9dad9c40834d6759dd55f8f7eb03617bd
Judge: openai/gpt-5.6-luna
Cost: $0.2221 (lanes $0.2198 + judge $0.0023)
Lanes
openai/gpt-6.1-sol: ok (0 finding(s), 42.6s, 163378+1439 tokens (118450 cached), 5 tool round(s), via Azure, $0.15)z-ai/glm-5.3-flash: ok (4 finding(s), 208.9s, 1579909+34564 tokens (1472256 cached), 37 tool round(s), via DigitalOcean, $0.0674)
Findings
🟠 Issue 1 — Doc claims the producer wire "remains" v2, but no in-repo test or constant pins the current wire literal
docs/SUPPORT_CHECKER_UPGRADE.md:11 · risk · identified by z-ai/glm-5.3-flash
If @pegma/support-desk-ai@0.2.12 had renamed INDEPENDENT_CHECK_WIRE (e.g. to a v3 string), this PR would still be entirely green: every host fixture and test passes the wire opaquely (wireVersion: INDEPENDENT_CHECK_WIRE in worker/src/support-independent-checks-model.test.ts:84,150, support-learning-driver-fixtures.ts:534, support-paid-bootstrap-fixtures.ts:67, support-independent-checks.test.ts:143), so a bump changes nothing the suite can detect. Meanwhile the updated qualification doc would tell operators "The producer wire remains openrouter-support-independent-check-v2" — and stored checker approvals/tokenizer qualifications carrying the v2 literal would start failing validation at runtime, silently taking the independent checker stage offline after deploy with documentation pointing diagnosis the wrong way.
Mechanism: worker/src/support-independent-checks-model.ts:9 re-exports INDEPENDENT_CHECK_WIRE from the SDK and the host never states its value. Greps for openrouter-support-independent-check-v, wireVersion, and INDEPENDENT_CHECK_WIRE across the repo show the only wire literals are the stale v1 values used as refusal inputs (support-independent-checks-model.test.ts:310,314, support-paid-bootstrap.test.ts:54,57); no test asserts the current value.
Proof gap: node_modules is absent from the review checkout, so the SDK's actual constant cannot be read and the "remains v2" claim rests on the PR narrative alone. Even if correct, it is unenforced — a one-line pin (expect(INDEPENDENT_CHECK_WIRE).toBe('openrouter-support-independent-check-v2')) in support-independent-checks-model.test.ts would make the doc claim test-backed.
🟠 Issue 2 — Strengthened independent-check assertion pins the provider sub-object but not the top-level request body key set, unlike sibling transport tests
worker/src/support-independent-checks-model.test.ts:231 · risk · identified by z-ai/glm-5.3-flash
The PR's stated goal for this change is that "unintended provider-group or price-policy fields cannot silently enter that request". The new toEqual on body.provider delivers that for the provider sub-object, but a future SDK change that adds a top-level routing/sampling field to the legacy request (e.g. the legacy route parameter, user, metadata, temperature) would pass this test silently — the same class of silent policy-field entry the PR says it is closing.
Sibling transport tests in the same repo pin the complete top-level key set for exactly this reason: worker/src/support-engineering-model.test.ts:410-417 asserts Object.keys(body).sort() equals ['max_tokens','messages','model','provider','response_format','stream'], and worker/src/support-assistant-model.test.ts:354-361 does the same. The independent-check test — the one this PR hardens — has no such pin (verified by full read of the file and a repo-wide grep for Object.keys(body)), and it also leaves body.stream unpinned while both siblings assert stream === false.
No proof gap: the absence is direct from the file. Repair: add the same sorted key-set pin (expected keys mirroring the engineering route, adjusted for this route's outputTokenParameter) and a body.stream === false assertion.
🔵 Issue 3 — New doc paragraph stays silent about the provider-policy field the PR itself pins, and the qualification checklist never names the provider routing block
docs/SUPPORT_CHECKER_UPGRADE.md:18 · nit · identified by z-ai/glm-5.3-flash
An operator preparing checker qualification reads "this dependency adoption does not enable provider-group selection or add a price policy. This host retains its existing endpoint-qualified route configuration" (lines 18-22) and can reasonably conclude the outgoing provider block is untouched. Yet this PR's own test change newly pins require_parameters: true in that block, implying the legacy provider policy is a thing that changed (or at least is newly enforced) in 0.2.12. The qualification sentence that follows (line 24: "qualify the actual installed wire and exact endpoint/model, tokenizer implementation, complete system and user contents, framing allowance and structured schema") enumerates messages, tokenizer, framing and schema — but never names the provider routing policy, which is precisely the block this PR highlights.
Concrete cost: re-qualification performed against this checklist can skip re-verifying the provider policy field that the adoption touched or now enforces.
Proof gap: whether require_parameters is genuinely new in 0.2.12 cannot be determined from this checkout (no node_modules; the pre-PR assertion used toMatchObject without the field, so it passed either way). Naming the provider routing block in the qualification enumeration, or noting the pinned require_parameters value, removes the ambiguity either way.
🔵 Issue 4 — Hardcoded /health Support Desk version label has no drift guard tying it to package.json
worker/src/index.ts:979 · nit · identified by z-ai/glm-5.3-flash
On the next Support Desk bump, a contributor who updates package.json, the lockfile, docs and the backlog but misses this hand-written literal leaves /health advertising a stale @pegma/support-desk-application@0.2.x to operators, with no failing test to catch it. This PR had to hand-edit exactly this string (0.2.11 → 0.2.12), which shows the pattern is per-release manual work.
The repo already has the guard pattern elsewhere: src/data/compile-catalog.test.ts:70-77 ties backlog recipe pins to the root manifest, and worker/src/support-engineering-composition.test.ts:47 builds its health-detail fixture from dependencies['@pegma/support-desk-application'] instead of a literal. Greps for supportDesk, detail.packages, and packages: across worker tests found no test that reads worker/src/index.ts or asserts the live health payload's packages string.
This PR updates the literal correctly, so there is no current defect; the finding is the missing one-line guard (assert the literal equals the manifest version) that would make future bumps fail loudly instead of silently misreporting.
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: clean
Scope: latest-commit (commit-range)
Mode: verify
Commit: cb4c993e98c292625eb14e893e1f20d685570e50
Judge: openai/gpt-5.6-luna
Cost: $0.0489 (lanes $0.0488 + judge $0.0001)
Lanes
openai/gpt-6.1-sol: ok (0 finding(s), 20.0s, 36453+684 tokens (24699 cached), 3 tool round(s), via Azure, $0.0426)z-ai/glm-5.3-flash: ok (0 finding(s), 64.3s, 84153+7324 tokens (67840 cached), 6 tool round(s), via InferenceNet, $0.0062)
Round 2 resolution
- ✅
r1-1fixed correctly — Doc claims the producer wire "remains" v2, but no in-repo test or constant pins the current wire literal: The transport regression now asserts that the SDK-exportedINDEPENDENT_CHECK_WIREequalsopenrouter-support-independent-check-v2before exercising the model. A changed producer wire literal will fail this ordinary-suite test rather than silently propagate through its fixtures. The adapter directly re-exports the SDK constant, andvitest.config.tsincludes this test. - ✅
r1-2fixed correctly — Strengthened independent-check assertion pins the provider sub-object but not the top-level request body key set, unlike sibling transport tests: The transport regression now pins the complete sorted top-level request key set tomax_tokens,messages,model,provider,response_format, andstream, matching the sibling engineering transport assertion. It also assertsstream: falseand retains exact equality for the provider policy block. Additional top-level routing or sampling fields will therefore fail the test. - 2 nit finding(s) from earlier rounds retired (severity floor for follow-up rounds is
risk). - Open findings after this round: 0 (0 bug-severity).
No structured findings from the successful lane(s).
Adopt all five verified public Support Desk 0.2.12 packages and align the health label, composition expectations and current-version documentation. Keep the host's existing endpoint-qualified routes and model selections while the SDK's provider-group mode remains opt-in.
Pin the documented checker wire and complete legacy request key set, streaming setting and provider policy. The qualification guide names the existing routing constraints.
Validation:
Customer AI remains OFF. Deployed CPU/privacy, provider semantic quality, actual clients/UI and pilots retain their separate acceptance gates. Catalog diagnostics and schedules are unchanged.