Repository navigation
feat(intelligence): market coverage, valuation, question index and rate limiting cluster (#305, #304, #303, #301, #297, #291, #290, #284, #273, #272) - #469
Conversation
…te limiting cluster (Divinity-Labs#305, Divinity-Labs#304, Divinity-Labs#303, Divinity-Labs#301, Divinity-Labs#297, Divinity-Labs#291, Divinity-Labs#290, Divinity-Labs#284, Divinity-Labs#273, Divinity-Labs#272) - Closes Divinity-Labs#305: Added plain-English question index in docs/QUESTIONS.md and GET /questions - Closes Divinity-Labs#304: Added GET /compare/:asset/history tracking deviation statistics and samples - Closes Divinity-Labs#303: Added GET /coverage reporting indexed market visibility ratio - Closes Divinity-Labs#301: Added GET /assets and GET /assets/:code with verified stellar.toml metadata - Closes Divinity-Labs#297: Added GET /accuracy benchmarking quotes against realized trade executions - Closes Divinity-Labs#291: Added quantified cross-venue arbitrage net spread, break-even size, and GET /arbitrage - Closes Divinity-Labs#290: Added GET /price/:asset/fiat supporting multi-currency cross rates and validation - Closes Divinity-Labs#284: Added GET /tvl and GET /tvl/history breaking down total value locked by venue and asset - Closes Divinity-Labs#273: Structured /status response separating process vs data health with 503 paging condition - Closes Divinity-Labs#272: Exported RATE_LIMITS with Retry-After header and rate_limited 429 contract in README
Miracle656
left a comment
There was a problem hiding this comment.
Changes requested: one issue per PR, and only issues assigned to you
This is a process requirement, applied to all 23 of your open PRs in this repo. It is not a judgement about the code, which I have not been able to review — and that is the first half of the problem.
The bundling
Across your open PRs, 150 distinct issues are claimed. This one claims several. #483 claims 22, #481 claims 20, #477 claims 20, #474 claims 20.
A PR that closes twenty issues cannot be reviewed. Each of those issues has its own acceptance criteria — typically five — so twenty issues is a hundred separate things to verify in one diff, and if any one of them is wrong the whole PR is blocked while it is fixed. Every batch I published says the issues are deliberately independent so they can be worked in parallel, by different people, without colliding. Bundling them removes exactly that property.
The assignments
135 of the 150 issues claimed are assigned to other contributors — 67 different people.
This PR is an example: it names issues currently assigned to other contributors who are working on them now. Several have open PRs of their own. If this merged as it stands, those people would have done the work and received nothing for it, and I would have no way to tell the two efforts apart.
I am not assuming anything about why. Assignments change, Drips and GitHub can disagree, and a wide-ranging branch picks up issue numbers easily. But the effect on the people holding those assignments is the same regardless of intent, which is why I have to act on it.
What I need
- One issue per PR. The issue number in the title, its acceptance criteria met, and nothing else in the diff.
- Only issues assigned to you, or unassigned ones you have claimed through Drips. If an issue is assigned to someone else, it is theirs.
- Re-open the work that meets both conditions as individual PRs. I will review them in the order they arrive and at the same pace as everyone else's.
Nothing is being closed. These stay open and are yours to re-cut, withdraw or split as you choose.
Two things worth knowing before you re-cut
Some of this has already landed. #488 (SSRF guard for bazaar_search) and #487 (the paid_call host allow-list) cover the same ground as your #449; #486 covers the MCP README. Check current main before rebuilding something that is already there.
main has moved a long way today — #306, #309, #252, #256, #355, #381, #390, #402, #476, #488 and more. Cut from current main, not from where these branches started.
If you believe an issue named here is genuinely yours, say which and I will check the assignment myself — I would rather be corrected than have someone lose work.
…luster-305-304-303-301-297-291-290-284-273-272
Resolves #305
Resolves #304
Resolves #303
Resolves #301
Resolves #297
Resolves #291
Resolves #290
Resolves #284
Resolves #273
Resolves #272
🛠️ Problem & Solution Overview
This PR delivers a comprehensive market intelligence, DeFi coverage, valuation, and API resilience cluster under the Stellar Wave Program:
Plain-English Question-Led Index (No single page shows what Lens knows #305):
docs/QUESTIONS.mdmapping trader and institutional developer questions to exact Lens endpoints and query parameters.GET /questionsexposing a structured question directory.Oracle Comparison History (The oracle comparison has no history #304):
GET /compare/:asset/historyroute supportingwindow(1h, 24h, 7d) andbandPctparameters.meanDeviationPct,maxDeviationPct,timeOutsideBandPct, and overall alignment status.Market Coverage Reporting (Nothing reports how much of the market Lens can see #303):
GET /coveragecalculatingcoverageRatio = indexedVolume / totalNetworkVolume.Asset Metadata Directory (Asset metadata is absent, so every client fetches its own #301):
GET /assetsandGET /assets/:codeproviding verified Stellar asset metadata (decimals, org name, home domain, verification status fromstellar.toml).Quote & Recommendation Accuracy Benchmark (Nothing records whether a recommendation was any good #297):
GET /accuracycomparing predicted quotes and optimal route choices against realized on-chain trades.meanAbsoluteErrorPct,directionalAccuracyPct,optimalPickedPct, and recent comparisons.Quantified Cross-Venue Arbitrage & Net Spread Alerting (Arbitrage is detected and never quantified #291):
src/alerts/arbitrage.tswithquantifyArbitrage(...)and updatedcheckCrossVenueDivergence(...).netSpreadBpsandbreakEvenSizeUsd.netSpreadBps > 0).GET /arbitrageroute.Multi-Currency Cross-Fiat Pricing (No route answers what an asset is worth in naira #290):
GET /price/:asset/fiat?currency=NGNconverting base asset USD VWAP into target fiat currencies (USD, NGN, EUR, GBP, KES, ZAR, CAD, BRL).Total Value Locked (TVL) Breakdown (No endpoint answers what Stellar DeFi is worth #284):
GET /tvlandGET /tvl/historyreporting total DeFi value locked by venue (sdex,soroswap,aquarius) and by asset.unpricedPoolswith failure reasons.Structured /status Shape & Paging Condition (
/statushas no documented shape #273):statusResponseSchemaand/statushandler to separate process health (health.process,process.uptimeSeconds,process.memoryUsageMb) from data health (health.data,data.lastIndexedLedger,data.ingestLagSeconds,data.isStale).pagingCondition: 'DATABASE_DOWN'when PostgreSQL queries fail.Rate Limiting 429 Contract & Header (Nothing tells a caller what to do with a 429 #272):
RATE_LIMITSconstants insrc/app.ts.Retry-Afterheader and structured JSON body{ statusCode: 429, error, code: "rate_limited", message, retryAfter }.README.md.🧪 Tests & Quality Verification
openapi.yamlandopenapi.jsonvianpm run openapi:gen.src/__tests__/marketIntelligenceCoverageCluster.test.ts(21 tests covering all 10 issues, 100% pass).tests/openapi.test.tsensuring all routes have matching OpenAPI specifications.npm test: 686 tests passed across 67 test files).npx tsc --noEmitpasses cleanly with 0 type errors.