Repository navigation
fix(rest): the form list refuses an empty or bracketed object filter, as the view list does - #39692
Conversation
… as the view list does GET /meta/form?object= (empty) was read as no filter and answered 200 with every form; it now answers 400 VALIDATION_ERROR through refuseEmptyListFilter, as view does. A bracketed object key on form is judged by the list's own refuseBracketedListFilter sentence instead of the unknown-parameter check. Call sites only; the helpers' lists parameter is widened to name form. Claude-Session: https://claude.ai/code/session_01L9qibygFKTtFbkC7xCBSUX
📓 Docs Drift Check5 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 19 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 59033021ff2f80f641afe828ec97f5cd68ff4965 && git checkout 59033021ff2f80f641afe828ec97f5cd68ff4965
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5e900d3b77ac19d4c73c5209d1f4a760a85b48a8 faf560d15122ad913e3ebd060ddfddf6c6e4a8dd && git checkout -B drift-repro 5e900d3b77ac19d4c73c5209d1f4a760a85b48a8 && git merge --no-ff faf560d15122ad913e3ebd060ddfddf6c6e4a8dd
node scripts/docs-audit/affected-docs.mjs --json 5e900d3b77ac19d4c73c5209d1f4a760a85b48a8 |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv Contract-review-claim: session_01L9qibvPFnj3TkGq8ps2Jgv · head faf560d · 2026-12-04T13:56Z |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv Contract reviewServed-tier: Inputs: card #39612 (body and its 4 comments: triage 7408414715, the claim and its amendment, the dev report), PR #39692 (body, the 3-file list, the net diff against ① Derived judgmentsAccept-set changes the diff implies, each read in the head's
Public-surface changes: none. ② Semver level
Clause-②: no (narrowing) — correct. The diff adds no accepted input; it turns one accepted-and-misread input into a refusal. ③ Boundary flags
④ Design judgmentThe narrowing makes the door's own refusal real; it takes no declared capability away. Read against
Attempts to break it, none of which landed:
The pin ( No must-fix, no should-fix. Nits (no effect on correctness or the contract; none needs a fix on this head):
The owning zone's question —
Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv Filled brief handed to the isolated at-tier reviewer whose record is the comment above (adopted by this L1-a thread): Contract review brief — PR #39692 @
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv L1-a · ACCEPT · #39692 @
Not Tier H: the seat lands it after this ACCEPT. |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxjHbaJSwcu6suJxbB 维护者速读
Seat opinion: ACCEPT. The form list now refuses what the view list already refuses (#39004 family); nothing that names a real object changes. 席位核对ACCEPT · head
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxjHbaJSwcu6suJxbB 2026-12-04T14:04Z · Hand-off: PR #39692 awaits the maintainer's approval (Tier H); seat record above. |
Requested by Tesla · project thread
Fixes #39612
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill or docs page teaches the metadata list door's
?object=filter on form (or view); the refusal sentence itself names the one spelling the filter takesContract review owed: this is a narrowing (a new
400on a public read door), so one CONTRACT_REVIEW_TIER review is owed on this head before the queue, besides L1. Not requested here.维护者速读
What changes
GET /api/v1/meta/form?object=(empty value) was read as no filter and answered200with every form in the environment, while the view list refuses it. Step 4a ofcreateMetaListAnswer(packages/rest/src/meta-item-read-gate.ts), shared by the REST server and the runtime dispatcher, now asks the existing helpers before it filters:refuseEmptyListFilter('object', 'object', 'form'): an empty?object=answers400 VALIDATION_ERRORnaming the parameter. The sentence ends "leave the parameter out to list every form you can see", so it names forms, not views.refuseBracketedListFilter(query, 'object', 'object', 'form'), andbracketedKeyJudgedByListnow leavesobject[onformto it.Call sites only, no new helper. The helpers'
listsparameter (andthrowListFilterRefusal's) is widened from'app' | 'view'to'app' | 'view' | 'form', because the sentence's last clause is per list.Premise correction (bracketed half). On main,
?object[]=NAMEand?object[0]=NAMEonformwere already refused with400 VALIDATION_ERROR, by the list's unknown-parameter check (nested{ error: { code, message } }, "The "object[]" query parameter is not supported by this endpoint…"). They were never read as no filter, so the triage'sString(query.object)reading of that half did not hold. They now get the view list's own refusal: the same flat envelope as view, and the sentence that says the filter takes one object name spelled?object=NAME. The status and code are unchanged; the envelope and wording change.Other list types that take
?object=: in the/meta/:typelist chain, onlyview(step 4) andform(step 4a) read it.objectis in the list's closed parameter set for every type, so on any other type the parameter is accepted and not read. That is noted under Acceptance notes and not changed here.Tests
packages/rest/src/meta-form-object-filter-39004.test.ts(the #39597 harness: realObjectQLengine, SQL store,RestServerroute) gets a second describe block:?object=on form answers400 VALIDATION_ERRORwith no list, as view does; the sentence starts withQuery parameter 'object' names no object; got "".and ends withlist every form you can see.;?object[]=and?object[0]=on form answer400 VALIDATION_ERRORin view's envelope, naming the key as sent; a bracketed key beside a plain one is refused too;?object=mfo_alphastill lists that object's two forms, and the view list still switches.Red first on main
a92f1ed9: the empty case got[200, undefined, false, …]and the bracketed case got[400, undefined, …](the nested envelope), so 2 failed and 5 passed. Green atfaf560d1.Readings at faf560d
pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-form-object-filter-39004.test.ts src/meta-app-publish-gate.test.ts: 2 files, 42 tests passed.pnpm --filter @objectstack/rest test: 452 files passed, 9379 tests passed, 351 skipped.pnpm --filter @objectstack/rest typecheck: exit 0.@objectstack/runtime, after rebuilding rest):src/domains/meta-list-projection-parity.test.tsandsrc/domains/dispatcher-query-arity.test.ts, 2 files, 1497 tests passed.dispatch-gates.mjs --commands, 72 families): 68 exit 0, 4 NOT MEASURED.check-plugin-teardown-shape --self-testneeds a deeper clone than this shallow checkout.check:dual-build-cjs-loadsneeds every package's dist.check:query-options-erasureandcheck:type-check-debthit my local time cap. All four are left to CI.Acceptance notes
?object=on list types other thanviewandform(for example/meta/page?object=lead) is accepted by the closed parameter set and not read, so it answers the whole list. This comes from reading the code and was not measured through HTTP, so it is not filed.?id=on types other thanappis in the same position.Verification
Files to read first, by risk:
packages/rest/src/meta-item-read-gate.ts, step 4a increateMetaListAnswer(the two new refusal calls) andbracketedKeyJudgedByList.packages/rest/src/meta-form-object-filter-39004.test.ts, the meta list: GET /meta/form?object= with an empty value answers every form instead of 400 like view #39612 describe block..changeset/39612-form-list-empty-object-filter.md.Two-minute check:
pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-form-object-filter-39004.test.ts. Expect 7 tests passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibygFKTtFbkC7xCBSUX