Skip to content

Metadata API: no batch by-names read, so the Console roster gate costs one /meta/object request per name #29236

Closed

Description

@objectstack-fleet

domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu

Ruled: 6580261740 · letter A · 2026-11-02T14:56Z

Filing gate: ② out-of-scope finding, class a, from #29121 (PR #29229; report card comment 6574295250) · filed by domain:ui#1 · ⛔ Not a claim. No grade: triage sets it.

Business reason. After #29121, Console Home stops downloading the whole object registry. Instead it reads each object the app roster requires by name, one request per name: 8 requests on app-crm on every Home visit outside an app. A larger app means more round trips, and each one costs a full latency on a phone link. A single batch read would make it one request.

Measured (the #29121 dev, on the production Console with app-crm, at PR #29229 head d8b43ffa). The branch sends 28 requests in total, with no unscoped object or view list. 11 of them are by-name reads, 70 KB in all, and 8 of those are the roster gate's requiresObject union.

Wanted. The metadata list endpoint for a type (/meta/object, and generically /meta/:type) accepts a names filter, for example ?names=a,b,c, and answers only those items. The UI can then fold the roster gate's reads into one request. If this adds a query parameter to the published API, the change is a spec and API matter, so the reader decides the protocol declaration.

Reader. Server metadata API (domain:server); the Console adopts it as a follow-up in domain:ui.

Links back: #29121, PR #29229.

Activity

  1. zhuangjianguo commented on Nov 2, 2026

    @zhuangjianguo
    Collaborator

    Ruling: batch #458 item 2 · letter A · maintainer 「同意」 2026-11-02T14:54Z

    director#1 · zhuangjianguo · session_01QsR2jV5sBSzCYNEDgpYLJw

    What the ruling binds

    • A — ?names=a,b,c on every /meta/:type list. One comma-separated value (the data routes' convention for fields, searchFields, orderby; it fits the door's arity rule that refuses a repeated key). The narrowing step runs after the per-caller gate and before the object mask, so masking and translation run only on the named items. An empty value is refused 400 like ?id=; an unknown name is simply absent (no 404). The filter is pushed down to the store read as GetMetaItemsRequest.names, so the protocol filters before decorating.
    • The same server PR declares the list door's closed set of query parameters (package, preview, object, include, id, names) with the refuseUnknownQueryParams pattern the sibling meta routes already use, so a misspelt filter answers 400 instead of the full list with 200. That is a narrowing; the seat states it on the changeset (Clause-②).
    • Not B (the server would still read the full type list), not C (?id= keeps its just-shipped one-app meaning, fix(rest)!: GET /meta/app refuses a bracketed id key (?id[]=, ?id[0]=) instead of answering every app #29046), not D.

    Workload of the letter

    • domain:spec one PR first: GetMetaItemsRequestSchema.names plus the gen:schema / gen:docs / api-surface artifacts (spec minor).
    • domain:server one PR Blocked-by it, on the parked card thread (claude/project-thread-ddr31t): packages/rest (META_QUERY_ARITY_DOORS.list, the chain step, the empty refusal, the closed set), packages/runtime/src/domains/meta.ts (dispatcher twin + parity census), packages/metadata-protocol (readFlattenedMetaItems filter), packages/client (meta.getItems options); ~150–250 source lines plus tests; rest / metadata-protocol / client minor. Metadata-protocol: none (an API key, not authorable metadata).
    • domain:ui follow-up card: the Home roster gate folds its by-name reads into one request.

    Execution

    1. Server seat 5 files the spec card and re-dispatches the parked thread once it lands.
    2. Label strokes are the lane seat's.

    Confidence gap carried from the brief: names follows the data routes' plural comma-list spelling; no external SDK user was consulted.


    Generated by Claude Code

  2. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · os-steve · session_01ADHkmQKwKFCp1m6Pb6Q8c1

    Ruling A (6580261740) received, and executed in order:

    1. Spec half: spec(api): add names to GetMetaItemsRequestSchema — a batch by-names read on every /meta/:type list (#29236 ruling A) #29441 (GetMetaItemsRequestSchema.names, spec minor), filed into the spec lane queue.
    2. Server half: this card, on the parked thread claude/project-thread-ddr31t. It is Blocked-by spec(api): add names to GetMetaItemsRequestSchema — a batch by-names read on every /meta/:type list (#29236 ruling A) #29441 and restarts once spec(api): add names to GetMetaItemsRequestSchema — a batch by-names read on every /meta/:type list (#29236 ruling A) #29441 merges. Its scope is the ruling's: the rest chain step after the per-caller gate, the empty-value 400, the list door's closed query set (a narrowing, declared on the changeset), the dispatcher twin and parity census, the store push-down, and meta.getItems in the client.
    3. ui follow-up: filed as its own card (below), Blocked-by this card.

    State: needs-user-decision → pm:dispatched.

  3. added
    pm:dispatched
    and removed
    needs-user-decision
    on Nov 2, 2026
  4. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · os-steve · session_01ADHkmQKwKFCp1m6Pb6Q8c1

    Release: session_01ADHkmQKwKFCp1m6Pb6Q8c1 · seat 5 signs off at the maintainer's wrap-up · to pm:blocked for the next domain:server seat
    Resume-from: none (the card thread pushed no branch; it stopped at measurement)
    Blocked-by: #29441

    The dev's needs_decision (6576480506) was ruled: director ruling A (6580261740), which the seat executed in 6580443235. The spec half is #29441 (GetMetaItemsRequestSchema.names, spec lane, still open). This card is the server half and waits on that merge, so it goes to pm:blocked, not to the decision box: there is no open question.

    Next: when #29441 merges, move this card to pm:queue. The next seat dispatches it under ruling A, serving ?names= on every /meta/:type list.

  5. added
    pm:blocked
    and removed
    pm:dispatched
    on Nov 3, 2026
  6. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-support-ai · session_01WGufzhJG3tKnksHVa1krBz

    Spec half of ruling A (6580261740): PR #29722 for #29441, contract review PASS (6594380969 on 064d4e01, delta on bb07931c), landing now. Two things the server PR on this card inherits; the next domain:server seat's claim should name both.

    1. Drop the marker in the serving change. GetMetaItemsRequestSchema.names ships with a describe that opens [PLANNED — not yet served] and ends "No list door reads it yet: until one does, a request carrying it is answered as if it were absent." A pin in packages/spec/src/api/protocol.test.ts asserts that prefix, so the PR that serves ?names= must, in the same change, remove the prefix and the trailing sentence, delete that one it(...), and run gen:docs (moves content/docs/references/api/protocol.mdx). That is one packages/spec edit outside the rest / runtime / metadata-protocol / client workload the ruling lists.
    2. Declaration. The spec PR declares Metadata-protocol: added (the authorable-surface/api.json shard moved by one key; check-changeset-no-major refuses none there, precedents feat(spec): the package export manifest declares withheldMaps, classified door for the unmanaged import #29521 and feat(spec): declare the whole-deployment export, every installed package as installable packages in one read (PackageExportBundleSchema) #29100). The server PR's own declaration is judged on its own diff; it is not inherited as none from the card body.

    Card stays pm:blocked until #29722 merges; nothing here changes the ruling.

  7. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-support-ai · session_01WGufzhJG3tKnksHVa1krBz

    Blocker landed. #29441 closed: PR #29722 merged (6f094645), so GetMetaItemsRequestSchema.names is on main with the [PLANNED — not yet served] marker. This card's Blocked-by: #29441 (6591626191) is met; the pm:blocked → pm:queue flip and the pm:blocking sweep on #29441 are the triage sweep's. The serving PR carries the two items in 6594515725.

  8. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 5, 2026
  9. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#3 · os-elon-musk · session_016WV4cytQjG9X1CrCgytUM5

    Claim: PM loop round 1 · 2026-11-05T21:47Z
    Session: session_016WV4cytQjG9X1CrCgytUM5
    Account: os-elon-musk (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/issue-29236-meta-names-read
    Worktree: objectstack-issue-29236
    Domain: domain:server
    Seat: domain:server#3
    File surface: ruling A's server workload (6580261740): packages/rest/src/meta-item-read-gate.ts (META_QUERY_ARITY_DOORS.list, the narrowing chain step after the per-caller gate, the empty-value 400, the list door's closed query set via refuseUnknownQueryParams), packages/rest/src/meta-collection-routes.ts (listRequest), packages/runtime/src/domains/meta.ts (dispatcher twin + meta-list-projection-parity census), packages/metadata-protocol (readFlattenedMetaItems names filter), packages/client/src/index.ts (meta.getItems options), tests beside each; plus the one inherited packages/spec edit named in 6594515725 (drop the [PLANNED — not yet served] prefix and trailing sentence on GetMetaItemsRequestSchema.names in packages/spec/src/api/protocol.zod.ts, delete the one marker it(...) in protocol.test.ts, gen:docs moving content/docs/references/api/protocol.mdx); root .changeset/ files (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default build (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable), contract review at CONTRACT_REVIEW_TIER before the queue (the closed query set narrows the published list door, and the PR edits a packages/spec describe), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the /meta/:type list door (packages/rest) reads no names filter and declares no closed query set, so the Console roster gate pays one request per name and a misspelt filter answers the full list with 200 | none | every Console Home visit outside an app (8 reads on app-crm, measured in 6576480506)
    Thread-read: 6595098031
    Premise: holds — unblocked: the wait was on #29441, closed 2026-11-03T03:58Z (PR #29722 merged 6f094645); re-derived on origin/main 66a8822b: protocol.zod.ts still carries the [PLANNED — not yet served] marker on names, so nothing serves it yet
    Serial constraints cleared: open PR #30459 (#30391, ACCEPTed, awaiting the maintainer) touches packages/rest/src/meta-item-read-gate.ts in another region (the plural-label read); disjoint by region, the later lander merges main. No other open PR or in-flight claim names the files above (19 open non-mailbox PRs read at claim time)

  10. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#3 · os-elon-musk · session_016WV4cytQjG9X1CrCgytUM5

    Claim amendment to 6670429730 · 2026-11-05T21:51Z
    Branch: claude/project-thread-ibfnsp (the card thread's designated push branch, the recorded platform exception to claude/issue-<n>-<slug>)
    Session: session_016WV4cytQjG9X1CrCgytUM5 (seat) · dev card thread session_016WV4cyaiN5dg5cw1zSyihP
    Every other line of 6670429730 stands.

  11. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#3 · os-elon-musk · session_016WV4cytQjG9X1CrCgytUM5

    Claim amendment to 6670429730 · 2026-11-05T22:20Z
    Clause-②: yes
    The dev re-derived it from the diff: the list door's closed query set is the narrowing ruling 6580261740 names, and serving the declared names key plus meta.getItems({ names }) and three new @objectstack/rest exports the dispatcher twin needs (META_LIST_QUERY_PARAMS, metaListQueryRefusal, metaListNames) is the widening half. The card stays in this lane because the ruling assigns this workload to the domain:server PR; the contract-review-tier review before the queue covers both halves.
    File surface adds: content/docs/protocol/kernel/http-protocol.mdx (one paragraph: ?names= and the closed set). Skills-docs: follow-up owed for skills/objectstack-api/SKILL.md (the seat files it before ACCEPT).
    Every other line stands.

  12. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#3 · os-elon-musk · session_016WV4cytQjG9X1CrCgytUM5

    Claim: PM loop round 1 · 2026-11-05T22:46Z
    Session: session_016WV4cytQjG9X1CrCgytUM5 (seat) · dev card thread session_016WV4cyaiN5dg5cw1zSyihP
    Account: os-elon-musk (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/project-thread-ibfnsp (the card thread's designated push branch, the recorded platform exception to claude/issue-<n>-<slug>)
    Worktree: objectstack-issue-29236
    Supersedes: claim 6670429730 and its amendments 6670501210, 6671057079 (re-posted whole so the closing-target guard reads the live branch)
    Domain: domain:server
    Seat: domain:server#3
    File surface: ruling A's server workload (6580261740): packages/rest/src/meta-item-read-gate.ts (META_QUERY_ARITY_DOORS.list, the narrowing chain step after the per-caller gate, the empty-value 400, the list door's closed query set via refuseUnknownQueryParams), packages/rest/src/meta-collection-routes.ts (listRequest), packages/runtime/src/domains/meta.ts (dispatcher twin + meta-list-projection-parity census), packages/metadata-protocol (readFlattenedMetaItems names filter), packages/client/src/index.ts (meta.getItems options), tests beside each; plus the one inherited packages/spec edit named in 6594515725 (drop the [PLANNED — not yet served] prefix and trailing sentence on GetMetaItemsRequestSchema.names in packages/spec/src/api/protocol.zod.ts, delete the one marker it(...) in protocol.test.ts, gen:docs moving content/docs/references/api/protocol.mdx); root .changeset/ files; content/docs/protocol/kernel/http-protocol.mdx (one paragraph: ?names= and the closed set) (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default build (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable), contract review at CONTRACT_REVIEW_TIER before the queue (the closed query set narrows the published list door, and the PR edits a packages/spec describe), effort: high
    Clause-②: yes
    Metadata-protocol: none
    Responsibility: the /meta/:type list door (packages/rest) reads no names filter and declares no closed query set, so the Console roster gate pays one request per name and a misspelt filter answers the full list with 200 | none | every Console Home visit outside an app (8 reads on app-crm, measured in 6576480506)
    Thread-read: 6671057079
    Premise: holds — unblocked: the wait was on #29441, closed 2026-11-03T03:58Z (PR #29722 merged 6f094645); re-derived on origin/main 66a8822b: protocol.zod.ts still carries the [PLANNED — not yet served] marker on names, so nothing serves it yet
    Serial constraints cleared: open PR #30459 (#30391, ACCEPTed, awaiting the maintainer) touches packages/rest/src/meta-item-read-gate.ts in another region (the plural-label read); disjoint by region, the later lander merges main. No other open PR or in-flight claim names the files above (19 open non-mailbox PRs read at claim time)

  13. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#3 · os-elon-musk · session_016WV4cyaiN5dg5cw1zSyihP
    os-dev-report

    {
      "issue": 29236,
      "status": "done",
      "branch": "claude/project-thread-ibfnsp",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/30709",
      "session": "session_016WV4cyaiN5dg5cw1zSyihP",
      "premise_still_valid": true,
      "summary": "Ruling A (6580261740) served. GET /meta/:type (REST and the runtime dispatcher, both scopes) reads ?names=a,b,c: one comma-separated value, trimmed/deduped (metaListNames); an empty value is a located 400 VALIDATION_ERROR (param names) before the store read; an unknown name is simply absent. The names are pushed down as GetMetaItemsRequest.names (getMetaItems/readFlattenedMetaItems filter after the merge, before nav contributions/locks/governance), and chain step 2a in createMetaListAnswer narrows after the per-caller gate and before the object mask/translation. The list declares its closed query set META_LIST_QUERY_PARAMS (package, preview, object, include, id, names, locale) judged by unknownQueryParamRefusalMessage before arity (metaListQueryRefusal); the bracketed keys with a located refusal keep it (package[ always, id[ on app, object[ on view). names joins META_QUERY_ARITY_DOORS.list. client meta.getItems (unscoped + scoped) takes { names }. Spec: the [PLANNED — not yet served] marker on GetMetaItemsRequestSchema.names retired, marker test deleted, gen:docs. One paragraph in http-protocol.mdx.",
      "tests": "New: rest meta-list-names-filter.test.ts (reading, chain step on object with mask+translation seeing only named items, unknown absent, empty rejected before mask, app narrowed after the gate; door push-down, non-filtering store on object/view(+object=), absent names not sent, empty 400 with no store read, unknown 200 empty); rest meta-query-arity-doors.test.ts closed-set describe (recognition before arity, declared keys accepted, undeclared and bracketed refused, ?locale=zh-CN 200); metadata-protocol protocol.meta-list-names.test.ts (5); runtime dispatcher-query-arity.test.ts (recognition, push-down, locale, empty) and meta-list-projection-parity.test.ts (5 new probes + META_LIST_QUERY_PARAMS equals the derived read set); client.test.ts names URL unscoped/scoped. Two meta-app-publish-gate.test.ts controls (id[] on view, object[] on app) flip 200 -> 400. Ablations, each red: rest recognition off (12), locale dropped (3), chain step off (5), chain step after the mask (3), rest empty refusal off (5), rest push-down off (1), dispatcher recognition off (census red), dispatcher push-down off, dispatcher empty refusal off, protocol filter off (4), client names off. Suites at c2b596eb (pre-merge): rest 394 files green; census + dispatcher 1330; protocol 12; client 228; spec protocol.test green. typecheck exit 0: rest, metadata-protocol, client, runtime, spec (spec with an 8 GB heap).",
      "gates": "After git merge origin/main (4bf9a2d7, includes #30459) + pnpm install --frozen-lockfile + whole-tree turbo build (119/119): node scripts/pm/dispatch-gates.mjs --commands at 5f55d49c derives 106 families (identical list to the pre-merge round at c2b596eb); all 106 + 6 extras (check:meta-url-spelling, check:authz-resolver, check:changeset-fixed, check:error-code-casing, check:route-ledger-census, pnpm lint) exit 0, run with NODE_OPTIONS=--max-old-space-size=8192 (spec check:test-typecheck OOMs at the default heap, environmental). --ran reconcile: 106 derived, 106 run, 0 NOT-MEASURED, 0 UNRUN. Round 1 at c2b596eb (pre-merge, no whole-tree build): 109/112 exit 0; check:generated OOM (green on rerun with the heap), check:skill-examples and check:dual-build-cjs-loads exit 3 (needed the whole-tree build; both 0 in round 2). CI on PR #30709 at 5f55d49c: 57 success, 8 skipped, 0 failed.",
      "line_budget": "+783 / -43 over 19 files (source +283/-24, tests +500/-19; under 3000)",
      "files_changed": [
        ".changeset/29236-meta-list-names-filter.md",
        "content/docs/protocol/kernel/http-protocol.mdx (one paragraph)",
        "content/docs/references/api/protocol.mdx (generated)",
        "packages/client/src/index.ts",
        "packages/client/src/client.test.ts",
        "packages/metadata-protocol/src/protocol-meta-list-reads.ts",
        "packages/metadata-protocol/src/protocol.ts",
        "packages/metadata-protocol/src/protocol.meta-list-names.test.ts",
        "packages/rest/src/index.ts",
        "packages/rest/src/meta-collection-routes.ts",
        "packages/rest/src/meta-item-read-gate.ts",
        "packages/rest/src/meta-list-names-filter.test.ts",
        "packages/rest/src/meta-query-arity-doors.test.ts",
        "packages/rest/src/meta-app-publish-gate.test.ts",
        "packages/runtime/src/domains/meta.ts",
        "packages/runtime/src/domains/dispatcher-query-arity.test.ts",
        "packages/runtime/src/domains/meta-list-projection-parity.test.ts",
        "packages/spec/src/api/protocol.zod.ts (describe)",
        "packages/spec/src/api/protocol.test.ts (marker test deleted)"
      ],
      "deviations": [
        "locale joins the closed set (seat-accepted, veto point at ACCEPT). The ruling's line: \"The same server PR declares the list door's closed set of query parameters (`package, preview, object, include, id, names`)\". The list door already reads ?locale= (extractLocale in the translation step), so a six-key set would refuse ?locale=zh-CN, which answers 200 today; keeping it is keeping behaviour, not widening. Pinned on both transports; the census derives locale from source.",
        "Patch levels, not the ruling's minor (seat-accepted): check-changeset-no-major requires patch on every entry when the PR declares Metadata-protocol: none.",
        "content/docs/protocol/kernel/http-protocol.mdx paragraph is outside the ruling's file list; the seat added it to the claim.",
        "Two existing controls in meta-app-publish-gate.test.ts (bracketed id[] on view, object[] on app) flip from 200 (ignored) to 400 recognition refusals, as the closed set requires.",
        "package list items carry no name, so ?names= on /meta/package matches none (200, empty list). Noted, not changed."
      ],
      "clause_2": "yes (narrowing + widening) — narrowing: the list refuses any query name outside the seven with 400 VALIDATION_ERROR where it ignored it (BREAKING section + adr-0087: not-required (no-migration-prescription) on the changeset); widening: ?names= served, client meta.getItems { names }, and three new @objectstack/rest exports META_LIST_QUERY_PARAMS, metaListQueryRefusal, metaListNames. The ruling assigns both halves to this server PR. Metadata-protocol: none (an API query key, not authorable metadata).",
      "skills_docs": "follow-up #30710",
      "acceptance_notes": "ui follow-up is #29444 (Console Home roster gate folds its by-name reads into one ?names= request); ui/** untouched.",
      "dogfood_battery": "run at head 5f55d49c, full (unsharded): pnpm turbo run test --filter=@objectstack/dogfood after the whole-tree build and rm -rf packages/runtime/.objectstack; exit 0; 421 files passed / 3 skipped (424), 3513 tests passed / 36 skipped (3549). No red to fix or report. (The ERROR/WARN log lines in the run, hook sandbox capability, locale validation, UNIQUE constraint, come from a run in which every test passed.)",
      "mcp_calls": "0 — no MCP GitHub calls (reads via gh api GET; subscribe_pr_activity is a session subscription, not a GitHub write)",
      "api_writes": "git push x2 to claude/project-thread-ibfnsp; relay writes 2: pr_create (fw-20261105T225448Z-501626, PR #30709, 10934 bytes identical) and this report comment",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }

    Generated by Claude Code

  14. removed
    pm:dispatched
    on Nov 6, 2026
  15. objectstack-fleet commented on Nov 6, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#3 · os-elon-musk · session_016WV4cytQjG9X1CrCgytUM5

    Landed · 2026-11-06T05:17Z · PR #30709 merged through the queue as c17719dd6c. ACCEPT 6673684157, ruling record 6676369627.

    Reading Value
    PR state merged, closed this card via Fixes #29236
    Final head 621212ae
    Deviation (1) maintainer ruled 「同意,七个键落地」 (2026-11-06T03:49Z): locale joins the list door's closed query set (seven keys)
    Queue dequeued twice (a cli timeout flake, #30807; a same-group spec-liveness red from #30716, fixed there at 81d1ccf), re-armed, merged on the third run

    pm:dispatched removed; the card is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverenhancementpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions