[test] Cover token-registry cache fallback and read-through behavior
维护者通常 7 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 73/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- redis, typescript
调研方向
Start with backend/src/services/token-registry.service.ts at line 15, then read the existing backend tests for the metadata store and token list route to follow their setup. Add tests with injected or mocked dependencies for Redis hits, invalid cached JSON, Redis outages, database hits, and cold lookups. Done means DB cache hits skip RPC, Redis write failures preserve successful lookups, and the backend suite runs in CI.
由索引模型根据 Issue 内容生成。
描述
Labels: testing, backend, points: 150
File/location: backend/src/services/token-registry.service.ts:15
Description:
Existing token metadata tests cover the separate in-memory metadata store and token list route, not the TokenRegistry service. Redis corruption/outage and database cache hit/miss behavior lack tests, risking unnecessary network traffic and failed lookups.
Acceptance Criteria:
- Test Redis hit, invalid cached JSON, unavailable Redis, database hit and cold lookup paths using injected/mocked dependencies.
- Assert DB cache hits avoid RPC and Redis write failures do not turn a successful metadata lookup into an error; run the suite in backend CI.
Notes:
Searched backend/tests: existing metadata/route tests target lib/token-metadata; none import services/token-registry.service.
Audited commit: 649b6976a100fd964ce191428eef1faeb50aaa39. Closest prior issues reviewed: #1323. This report concerns the specific failure or uncovered test paths described above, rather than repeating the original feature request.
- 主要语言
- TypeScript
- 星标
- 18
- 派生
- 250
- 平均合并
- 5 天 6 小时
- 30 天内合并 PR
- 83
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LabsCrypt/flowfi 的其他 Issue
-
backend points: 150 testing
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 7 天内回复
-
backend points: 150 testing
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 7 天内回复
-
backend points: 150 testing
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 7 天内回复
-
backend points: 150 testing
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 7 天内回复
-
backend points: 150 testing
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 7 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
awslabs/visual-asset-management-system#804 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
restatedev/sdk-typescript#813 ·
-
bug desktop P1 session XS
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
Merit-Systems/x402scan#1312 ·
-
type:bug
难度 2/5 1-3 小时 新手友好度 78/100
Azure/apiops-cli#331 ·
维护者通常 3 天内回复