Skip to content

AMS contribution-profile: local cache store + doctor integration #6797

Description

@JSONbored

Part of #6793. Depends on #6795 (schema) and #6796 (extraction logic this store persists the output of).

Context

Extraction (#6796) shouldn't run on every discover invocation — label taxonomy and docs are cheap to fetch but not free, and a profile is stable enough to cache with a refresh policy, matching the pattern already established by the miner's existing local stores.

Requirements

  • A new local SQLite store (e.g. contribution-profile-cache.sqlite3 under the standard miner config dir, following the same LOOPOVER_MINER_CONFIG_DIR/LOOPOVER_MINER_<NAME>_DB override convention every other miner store already uses — see packages/loopover-miner/DEPLOYMENT.md's store table) keyed by owner/repo, storing the profile plus a fetch/refresh timestamp.
  • A sensible default TTL (informed by how often labels/docs realistically change — err toward the existing policy-doc-cache.sqlite3's ETag-based approach if that pattern fits better than a flat TTL).
  • doctor's store-integrity:* checks extended to cover this new store, matching every other store's existing coverage.

Deliverables

  • The cache store implementation and its doctor integration.
  • Regression tests for the cache read/write/expiry behavior.

Expected Outcome

A repeated discover run against the same repo within the cache's freshness window doesn't re-fetch/re-parse the same signals every time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions