Repository navigation
fix(market-subgraph)!: hold Market.items to the 100-item batch cap and require Market.catalog's category - #30
Merged
Hebilicious merged 1 commit intoOct 14, 2026
Conversation
|
Hebilicious
added this pull request to stack #37
October 13, 2026 20:10
Hebilicious
force-pushed
the
audit/summary-and-catalog-limits
branch
from
October 13, 2026 20:12
97c5426 to
b295480
Compare
Hebilicious
force-pushed
the
audit/summary-and-catalog-limits
branch
from
October 14, 2026 06:04
b295480 to
b41fab3
Compare
Hebilicious
removed this pull request from stack #37
October 14, 2026 06:05
Hebilicious
added this pull request to stack #42
October 14, 2026 06:05
Hebilicious
force-pushed
the
audit/summary-and-catalog-limits
branch
from
October 14, 2026 06:10
b41fab3 to
5c2aad8
Compare
Hebilicious
force-pushed
the
audit/summary-and-catalog-limits
branch
from
October 14, 2026 07:09
5c2aad8 to
7de6340
Compare
…d require Market.catalog's category - S3: the 100-item cap was enforced only for Item.marketSummary, so one Market.items(ids:) argument could carry thousands of IDs into a single upstream search-list call. The request-scoped reader now refuses a summary read over MARKET_SUMMARY_BATCH_LIMIT distinct items before it reaches Pearl Abyss, so both fields share one rule and one QUERY_BUDGET_EXCEEDED error. - S4: Market.catalog without a category needed 180 upstream calls against a 50-call budget and could never succeed. Its category is now required in the schema, and isPearlAbyssMarketCategory turns an unknown category into BAD_USER_INPUT that names it instead of an internal error. The schema artifacts are regenerated. market-error-semantics proves the cap at 101 and 100 items, the 400 for a missing category, and the BAD_USER_INPUT for unknown ones; docs/api.md says so. Refs #10 Refs #11
Hebilicious
force-pushed
the
audit/summary-and-catalog-limits
branch
from
October 14, 2026 08:50
7de6340 to
2e17466
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10
Closes #11
What changed
MARKET_SUMMARY_BATCH_LIMITandMarketSummaryBatchLimitErrormove intorequestScopedMarketReader(market-reader.ts). It refuses a summary read over 100 distinct items before it reaches Pearl Abyss.Market.items(ids:)andItem.marketSummarynow share one rule and oneQUERY_BUDGET_EXCEEDEDerror.Market.catalog(category:)is required in the schema, and its description says what a main category reads.isPearlAbyssMarketCategory(pearl-abyss/protocol/categories.ts) turns an unknown category into aBAD_USER_INPUTerror that names it, such asUnknown Central Market category: main 1, sub 99. Before, it was an internal error.docs/api.mdis updated.market-error-semanticsscenarios, plus the two category rows ofmarket-client-input-errors.How it was reproduced
I ran this layer's
market-error-semanticsfeature against the parent layer (audit/throttle-and-budget-errors):market-items-summary-batch-limit(101 IDs)AssertionError: the answer has no errors. All 101 IDs went upstream in one batchmarket-catalog-needs-categoryThe query needs more Pearl Abyss requests than this deployment's subrequest limit allows…, not answered 400 as invalid for the schema. This is the 180-pair read against a 50-request budgetmarket-client-input-errors(category rows){"message":"The market subgraph could not answer this field.", … "code":"INTERNAL_SERVER_ERROR"}formain: 0, notBAD_USER_INPUTmarket-items-summary-batch-at-limit(100 IDs)Not reproduced
market-items-summary-batch-at-limitpasses on the parent. It guards that exactly 100 IDs still go in one upstream request.catalogwithout a category answered 503.Refs #21 (security audit tracking issue). Part of stack #42; review bottom-up, each layer shows only its own diff.