Repository navigation
fix(rest): apply the object filter to the form list - #39597
Conversation
Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
GET /meta/form?object=X answered every form: the list chain applied ?object= to view alone. A form item is bound to one object by object (ADR-0159 D2), so the filter now keeps that object's forms, and an object no form names answers the empty list, as the view list does. Claude-Session: https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 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 5bfcffcb9e83872dffbb437d413fc5e7a158d446 && git checkout 5bfcffcb9e83872dffbb437d413fc5e7a158d446
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8feef82252c79fa424fc2cfbc7ab183158790cfb 420b9c7bc9a05191137b5f28c02132b8cfdef10f && git checkout -B drift-repro 8feef82252c79fa424fc2cfbc7ab183158790cfb && git merge --no-ff 420b9c7bc9a05191137b5f28c02132b8cfdef10f
node scripts/docs-audit/affected-docs.mjs --json 8feef82252c79fa424fc2cfbc7ab183158790cfb |
|
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4czfEjskBjZM6jhKWFR 2026-12-04T10:04Z · L1-a verdict: ACCEPT at head 席位核对Change. A new step 4a in Tests.
They are red first at Changeset. Gates. 39 success, 18 expected skip, 0 failed, 0 pending on Noted, owed as one filing line on the PR body.
Ordinary PR, no L2 owed (no spec or rules path, |
|
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxRh6Sbfo2Xm49JPx6 Landing at head |
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxRh6Sbfo2Xm49JPx6
Requested by Elon · project thread
Fixes #39004
Out-of-scope filed: #39612 (an empty or bracketed
?object=on the form list answers every form, while view refuses both; a narrowing, kept out of thisClause-②: noPR).Clause-②: no
Metadata-protocol: none
维护者速读
What changes
GET /api/v1/meta/form?object=Xapplied noobjectfilter: step 4 of the shared list chain (createMetaListAnswerinpackages/rest/src/meta-item-read-gate.ts) narrowedviewonly, so the form list answered every form with200. A new step 4a keeps the forms whoseobject(the ADR-0159 D2 binding of aformitem) equals the filter, sorted by name; an object no form names answers the empty list, as the view list does. Both transports (RestServerand the runtime dispatcher's/metadomain) share this chain, so one edit covers both. No query parameter is added (objectis already in the list's closed set), and nothing else in the chain moves.Tests
New
packages/rest/src/meta-form-object-filter-39004.test.ts, at the door over the real protocol (realObjectQL, SQLite store,RestServerroute handler), two objects each with forms and a list view:?object=A(and?object=Blists only B's);200with an empty list, forformand forviewalike;/meta/formwith no filter lists every form;?object=onviewis unchanged.Red first, at the base (commit 06a2c8a, test only)
Green, and the package (head 420b9c7)
Acceptance notes
?object=on the form list still lists every form (200, measured at head 420b9c7), while the view list refuses it with400 VALIDATION_ERROR. Refusing it onformadds a new refusal to the door, outside this card's declared change; reported to the seat as a finding rather than folded in.META_LIST_QUERY_PARAMSdoc comment still callsobject"the view switcher"; prose only, left as is.?object[]=on the form list was already refused (400, as a name the list does not read); unchanged.Verification
Read first:
packages/rest/src/meta-item-read-gate.ts, the new step 4a after step 4 increateMetaListAnswer(the only runtime hunk).packages/rest/src/meta-form-object-filter-39004.test.ts, the boot and the four pins.Two-minute check:
pnpm --filter @objectstack/rest exec vitest run src/meta-form-object-filter-39004.test.tsprintsTests 4 passed (4); revert step 4a and the first two pins go red withmfo_beta.contactin A's list.Local gates (head 420b9c7)
dispatch-gates --commandsderived 71 families for this change set;--ranreconciliation: 71 derived, 68 run (all exit 0), 3 NOT MEASURED, 0 unrun. NOT MEASURED, left to CI:pnpm check:dual-build-cjs-loads(PREREQUISITE NOT MET, needs a fullpnpm build),pnpm check:query-options-erasureandpnpm check:type-check-debt(each over a 280 s foreground cap on the shared box).overlap-check:VERDICT clean exit 0, merges cleanly with origin/main, no open PR shares a file.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cxRh6Sbfo2Xm49JPx6