feat(identity): cache official miner detection - #50
Merged
Conversation
JSONbored
previously requested changes
May 29, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
PR #50 — request changes
feat(identity): cache official miner detection
Required changes:
- Replace
{ ...snapshot, hotkey: undefined }with an explicit allowlist of cacheable miner fields. - Ensure no wallet/coldkey/hotkey-like fields can be cached if the upstream API shape changes.
- Keep unavailable TTL short and test recovery after an outage window expires.
- Add tests proving cached unavailable fails closed publicly but does not suppress confirmed miners longer than intended.
Cache official miner detection statuses with short TTLs so public GitHub output can reuse confirmed, not_found, and unavailable results without failing open. Add audit coverage for cache hits, misses, unavailable source checks, and public-surface skips while keeping GitHub-history-only contributors quiet. Closes JSONbored#37
oktofeesh1
force-pushed
the
codex/identity-miner-cache
branch
from
May 29, 2026 07:47
5c793ee to
c4c6e83
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.
Summary
What changed
official_miner_detectionsD1 storage forconfirmed,not_found, andunavailablestatuses.@gittensorycommand gating.Why
Closes #37.
Official miner detection was previously fetched for each public-gating path. The cache keeps confirmed-miner gating cheaper while preserving the official-source boundary and failing closed when the source is unavailable.
Validation
npm run test:cinpx vitest run test/unit/db-parsers.test.ts test/unit/queue.test.ts