GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — clef-proxy: a JSON array body passes the #2816 'oracle' guard and fabricates an upstream Clef call — typeof [] is 'object', so [] and [1,2] run with the default model and empty state/questions instead of a 400 · Issue #2938 · developing-today/code Closed Labels app/clef-proxybin/clef-proxy.mjseffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests DescriptionSummary
// bin/clef-proxy.mjs:211 (main 16bae8ea) if (!body || typeof body !== 'object') { /* 400 */ }
The sibling oracle gets this right: Evidence (verified this run, main
|
| body | result |
|---|---|
[] |
HTTP 401 from the upstream call — i.e. NOT a 400: the proxy fabricated {state:{}, questions:{}}, called the Cloudflare gateway with the default model, and relayed its auth error |
[1,2] |
same 401 upstream relay |
{} (valid control) |
same 401 upstream relay — the array responses are indistinguishable from a valid empty-object request |
"hello" |
HTTP 400 "Invalid JSON body: expected an object" |
null |
HTTP 400 (the #2816 case — this part of the guard works) |
42 |
HTTP 400 |
Process stayed alive throughout (this is a fabrication bug, not the
#2816 crash).
typeof check, andPOST /v1/systemone (and /systemone, /) with a JSON arraynull, string, andopencode-route-proxy.mjs isPlainObjectbin/clef-proxy.test.mjs (existing harnesstypeof body !== 'object' guard gets the same array test.Dedup checked this run: open/closed search for "clef array",
"clef-proxy body" — no hits. #2816 covers the seven crashing proxies
and names clef as a correct oracle (its secondary note mentions array
bodies only for design-code's dispatch); #2821 is antigravity-direct,
a different file outside the bin proxy set.
🤖 Agent note · filed
🤖 Design-architect pass 26 (2026-10-31) — agent note: this issue is adopted as part of Phase 1 of design #3068 ("parsed is not validated"). Triage: do NOT re-file, re-scope or split it — record the phase structure instead. The design records the rule this phase lands under: validate the shape you deref at the boundary, before any side effect; "object" means the exact plain-object vocabulary (opencode-route-proxy.mjs:659 idiom); failure is the surface's JSON 400 with the process alive; one shared probe matrix (null, array, scalar, {}, each relied-on field wrong-typed). Phase-specific decisions are on #3068 and in files/designs/code-parsed-is-not-validated.md (goal workspace).
🤖 Agent note · resumed
queue/5483-2938-clef-array-guard) already implements the pinned fix exactly — || Array.isArray(body) on the bin/clef-proxy.mjs systemone guard — plus the clef-proxy: a JSON array body passes the #2816 'oracle' guard and fabricates an upstream Clef call — typeof [] is 'object', so [] and [1,2] run with the default model and empty state/questions instead of a 400 #2938 regression test (array bodies []/[1,2] -> 400, zero stub-upstream hits). Codex review on PR fix(clef-proxy): reject array bodies in the systemone guard (#2938) #4449 completed with no findings. Laptop SSH is unreachable this shift (connection closed, 3 attempts), so the test file could not be re-run locally; merging on diff-vs-pinned-spec verification plus the passing PR check, per standing merge authority.Merge pull request #4449 from developing-today/queue/5483-2938-clef-a…
🤖 Agent note · done
74feb21f1fd29d2c8f7573d0f71247490496dbdd).bin/clef-proxy.mjs on main shows the guard at line 235: if (!body || typeof body !== 'object' || Array.isArray(body)), with the clef-proxy: a JSON array body passes the #2816 'oracle' guard and fabricates an upstream Clef call — typeof [] is 'object', so [] and [1,2] run with the default model and empty state/questions instead of a 400 #2938 regression test in bin/clef-proxy.test.mjs. Codex review on PR fix(clef-proxy): reject array bodies in the systemone guard (#2938) #4449: no findings. Laptop SSH was unreachable this shift, so the test file was not re-run locally by this lane.