Repository navigation
feat(cloud-connection)!: the marketplace catalog list filters by taxonomy facets on the server, and retires ?category= - #31234
Conversation
…cets on the server, retire ?category= The catalog list door reads businessFunctions, industries and solutionTypes (one comma-separated value each) and maturity, ORs inside a facet and ANDs across, and pages the filtered snapshot. A value the spec does not declare, a repeated facet key or an empty facet is refused before either path runs. The ?category= filter is gone; the parameter is read as no filter. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 26 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 6 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 6 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 fe2a71e4e06127134d7215f4f86bdfe500bc73b5 && git checkout fe2a71e4e06127134d7215f4f86bdfe500bc73b5
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5b22ee759364cb675ff5d4281b797c3684323f69 868cfd7e797dc67a17f7a7f4df224edf047da3be && git checkout -B drift-repro 5b22ee759364cb675ff5d4281b797c3684323f69 && git merge --no-ff 868cfd7e797dc67a17f7a7f4df224edf047da3be
node scripts/docs-audit/affected-docs.mjs --json 5b22ee759364cb675ff5d4281b797c3684323f69
|
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ Contract-review-claim: session_01FEkQ5o8PE7ZtVjcor51wBZ · head 81072e5 · 2026-11-07T19:12Z |
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ Contract reviewServed-tier: Inputs read: card #31173 (body, triage 6709309123, claim 6710538394, os-dev-report 6711774130), PR #31234 (body, 3-file list, net diff ① Derived judgmentsEach accept-set or public-surface change the diff implies at
② Semver level
③ Boundary flagsDev flags (PR "Acceptance notes" and os-dev-report 6711774130);
④ Design judgmentThe narrowing itself, read against the published spec on Taken away at the consumer? No. Every capability the request schema declares for the four keys is delivered on the snapshot path (OR/AND, vocabularies, maturity, paging over the filtered set) and forwarded on the cloud path; what the proxy stops honouring, The spec's own refusal made real? Only partly, and that is the failing half.
Everything else tried holds: repeated/blank/undeclared values on each key, Implemented-by: VERDICT: FAIL |
…ith the spec prescription A category parameter on the catalog list is refused 400 VALIDATION_ERROR with retiredCategoryGuidance before either path is asked, instead of being ignored. The catalog pins move into the proxy's existing browse-only harness. Co-Authored-By: Claude <noreply@anthropic.com>
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ Contract-review-claim: session_01FEkQ5o8PE7ZtVjcor51wBZ · head 868cfd7 · 2026-11-07T20:35Z |
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ Contract reviewServed-tier: Delta review of the rework after record 6711888512 (FAIL on head The head's two commits. ① Derived judgmentsRound-1 items 1–4 and 7–12 stand unchanged (the delta touches none of their code): facet keys and vocabularies from the published schema, OR within / AND across, undeclared-value refusal, repeated-key and empty-facet refusals as declared narrowings, server paging over the filtered set,
② Semver levelUnchanged frontmatter:
③ Boundary flagsRound-1 flags and the rework report (os-dev-report 6712663916;
④ Design judgmentThe narrowing against the published spec on Taken away at the consumer? No. Every capability the request schema declares for The spec's own refusal made real? Yes, now on both sides. The three refusals the spec implies (undeclared value: the enum; Probed on the new head and holding:
No must-fix. Implemented-by: VERDICT: PASS |
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ 维护者速读
席位意见:接受。代理按规格已声明的四个分面过滤并分页;已退役的 席位核对 — ACCEPT ·
|
Requested by Leehom · project thread
Fixes #31173
Clause-②: no (narrowing) — the facets are declared by the published
MarketplaceSearchRequestSchema; refusing the retired?category=filter, and a facet the catalog cannot answer, narrows what the proxy honoursMetadata-protocol: none
Skills-docs: none — no page under
skills/**orcontent/docs/**describes the query ofGET /api/v1/marketplace/packages(agit grepforcategory=andmarketplace/packagesthere finds none); the generatedreferences/marketplace/marketplace.mdxalready lists the facet keys from the schema, and nothing in it moves维护者速读
GET /api/v1/marketplace/packages现在在服务端按职能(businessFunctions)、行业(industries)、解决方案类型(solutionTypes)和成熟度(maturity)筛选,同一维度内取「或」、维度之间取「与」,再在服务端分页;旧的?category=筛选删除,带它的请求回 400,并附上规格里退役该键时给出的改法(改用哪个维度)。?category=在 cloud#3661 去掉该列后会静默失效。@objectstack/cloud-connection一个文件加一个测试,patch 级;?category=、拼错的维度值、重复的维度键、空维度现在回 400VALIDATION_ERROR,仓内没有任何调用方发这些参数;回滚即还原本 PR。packages/cloud-connection/src/marketplace-proxy-plugin.ts的readCatalogListQuery(拒绝规则,含category)与catalogRowMatches(或/与、缺省值),再看 handler 里在 R2 与 cloud 两条路之前读查询的那一段。pnpm --filter @objectstack/cloud-connection exec vitest run src/marketplace-proxy-browse-only.test.ts,预期 16 个用例全绿。What changes
packages/cloud-connection/src/marketplace-proxy-plugin.ts, the catalog list doorGET /api/v1/marketplace/packages(andHEAD):businessFunctions,industries,solutionTypes(plural, each a list) andmaturity(one value), the keysMarketplaceSearchRequestSchemadeclares in@objectstack/spec/marketplace. A facet is ONE comma-separated value,?businessFunctions=sales,marketing, the spelling the platform's other list-valued query parameters take (nameson the/metalist,fields/searchFieldson the data routes); each value trimmed, blanks dropped, repeats folded. The allowed values are read from the spec schemas'.options, never copied.maturityand withq. Rows are the catalog's own (snake_casebusiness_functions,industries,solution_type,maturity, the columns objectstack-ai/cloud#3661 adds and console marketplace: facet filters (business function, industry, solution type) and a Beta badge replace the single category chip row — reads the spec taxonomy (objectstack#30904) #31011's console reads). A row with nosolution_typecounts as the spec's defaultapp(DEFAULT_SOLUTION_TYPE) and one with nomaturityasstable, the spec's reading of an absent key and the console's (effectiveSolutionTypeon PR feat(console): marketplace facet filters and a Beta badge from the spec taxonomy #31187). A row without the facet columns passes no business-function or industry filter, so until the cloud serves the taxonomy those two facets return nothing, as console marketplace: facet filters (business function, industry, solution type) and a Beta badge replace the single category chip row — reads the spec taxonomy (objectstack#30904) #31011 plans.limit/offsetpage it (limit1–100, default 50, as before) andtotalcounts every match.?category=retired, and refused. Thecategorybranch is gone. Acategoryparameter is refused400 VALIDATION_ERRORwith the spec's own prescription,retiredCategoryGuidance('MarketplaceSearchRequest.category')from@objectstack/spec/marketplace: the text a parse ofMarketplaceSearchRequestSchemagives the same retired key (migration entry18.marketplace-category-retired), naming the facets to send instead. No second spelling is kept, and a caller still filtering by category is told so instead of receiving the whole catalog.400with the proxy's{ success: false, error: { code: 'VALIDATION_ERROR', message } }:category(above), a value the spec does not declare for the facet (?businessFunctions=crm,?maturity=preview), a facet ormaturitysupplied twice (?industries=retail&industries=logistics, the sharedrepeatedQueryParamMessage), and a facet naming no value (?solutionTypes=). The read sits in the handler ahead of the R2 fast path and the cloud path, so the answer does not depend on which one serves the list.Tests
The catalog pins live in the proxy's existing harness,
packages/cloud-connection/src/marketplace-proxy-browse-only.test.ts(itscaptureHandlerandfakeCtx, plus a stubbedfetch), 13 new beside its 3: OR within a facet, AND across, theapp/stabledefaults, rows without the taxonomy, folded values,qplus server paging (total,limit,offset),?category=refused with the spec prescription alone, beside a real filter and on the cloud-only configuration, each facet refusal on the R2 configuration and on the cloud-only one with no fetch made, and the cloud path forwarding the facet query verbatim.Suites and ablations
pnpm --filter @objectstack/cloud-connection test: on head868cfd7e(in the dogfood chain, under the lock), Test Files 73 passed (73), Tests 952 passed (952).typecheck(tsc --noEmitplustsconfig.test.json, which compiles the test): exit 0 on868cfd7e.scripts/ablation-replace.mjson the committed implementation (868cfd7e), each anchor hit once, each restore proven by blob == HEAD and an emptygit diff HEAD. The suite imports the plugin fromsrc/relatively, so no build sits on the path.categoryrefusal disabled (red-first for the retargeted pins): both?category=cases red,expected undefined to be 400, 2 failed / 14 passed.Acceptance notes
solutionType; the spec's request schema declaressolutionTypes(a list, like the other two facets). The door implements the declared spelling only;?solutionType=is ignored like any parameter the door does not read (the proxy refused no query parameter before this change, andcategoryis the one retired key it now refuses).solutionType(singular) is the listing's own key, not a filter.OS_MARKETPLACE_PUBLIC_BASE_URL(the default:resolveMarketplacePublicBaseUrlreturns empty when it is unset) every list request takes the cloud path, which forwardspathname + searchto the control plane unchanged once the query passes the door (pinned by the last test). Whether the cloud filters by these names is the cloud's: NOT MEASURED here, reason: objectstack-ai/cloud is not readable from this session. Until it does, the console's switch-over sees server filtering only where the public snapshot path is configured.MarketplaceSearchRequestSchemaalso declaresquery/page/pageSize, while this door (and the console, and the cloud route it proxies) speakq/limit/offset, and the list answers the catalog's row shape, notMarketplaceSearchResponseSchema. This PR takes only the facet keys and values from the schema and leaves the paging names as they were.?limit=abcstill readsNaNand answers an empty page on the snapshot path (limit: nullon the wire): unchanged here, not in this card. The console switch-over to the server parameters is thedomain:uifollow-up the card names.Verification
Head
868cfd7e(rework round after contract review 6711888512;origin/mainmerged once at248a01c7). Gate union derived bynode scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(60 families), run after a fullpnpm turbo run build --concurrency=2(VERDICT command-exit 0), each exit code captured before any pipe:--ran: "60 derived famil(ies) accounted for — 60 run, 0 NOT-MEASURED".check-plugin-teardown-shape --self-testneededgit fetch --depth=1 origin 621a4876for its fixture on this shallow clone.(narrowing)arm),pnpm --filter @objectstack/dogfood testunder the lock on868cfd7e: VERDICT command-exit 0, Test Files 435 passed, 3 skipped (438), Tests 3609 passed, 41 skipped (3650).pnpm lintscoped:eslint --no-inline-configover the two touched source files, exit 0.Generated by Claude Code