Skip to content

purge-cli's right-to-be-forgotten spec list is missing ranked-candidates, replay-snapshot, and deny-hook-synthesis stores #8009

Description

@JSONbored

Context

packages/loopover-miner/lib/store-maintenance.ts's purge-spec constants (consumed by packages/loopover-miner/lib/purge-cli.ts:94-104) define which repo-scoped stores get swept when an operator runs a right-to-be-forgotten purge for a given repo. This list has already been extended three times specifically because sweeps kept missing stores: #5564 (original six), #7091 (three more), #6987 (a fourth) — the file's own comments document this as a recurring gap.

Three stores with a genuine repo_full_name/repo_scope-keyed table are currently missing from the purge spec, despite not being documented as "not purgeable" the way attempt-log.js explicitly is:

  • ranked-candidates.ts — table miner_ranked_candidates, repo_full_name column.
  • replay-snapshot.ts — table replay_snapshots, repo_full_name TEXT NOT NULL (line 226) — this table embeds commit SHAs and README content.
  • deny-hook-synthesis.ts — tables deny_rule_proposals/deny_rule_proposals_v2, repo_full_name + api_base_url composite key (lines 134-141/168-174).

An operator's right-to-be-forgotten purge for a repo currently leaves that repo's ranked-candidate history, replay snapshots, and deny-rule proposals behind.

⚠️ Required pattern — read store-maintenance.ts's existing *_PURGE_SPEC constants and how #7091/#6987 added theirs before starting. Add three new *_PURGE_SPEC constants following the exact same shape, and register them in purge-cli.ts the same way the existing specs are registered — do not invent a new purge mechanism.

Requirements

  • Add a *_PURGE_SPEC constant in store-maintenance.ts for each of ranked-candidates, replay-snapshot, and deny-hook-synthesis, keyed on their real repo_full_name (and, for deny-hook-synthesis, api_base_url) columns.
  • Register all three in purge-cli.ts alongside the existing specs.
  • If any of the three genuinely should NOT be purgeable (e.g. for an audit-trail reason), that must be an explicit decision documented the same way attempt-log.js's exemption already is — not a silent omission. Default assumption per this issue: all three should be purgeable, since none currently has a documented exemption.

Deliverables

  • Three new purge specs added and registered, covering ranked-candidates, replay-snapshot, and deny-hook-synthesis.
  • A repo-scoped purge run removes rows from all three stores for the target repo, and leaves rows for other repos untouched.

Test Coverage Requirements

packages/loopover-miner/** — 99%+ Codecov patch target. Add/update unit tests: a purge for repo A removes A's rows from all three new stores and leaves repo B's rows in the same stores untouched.

Expected Outcome

A right-to-be-forgotten purge for a repo removes that repo's data from every repo-scoped store that holds it, closing the gap this list has needed patching for three times before.

Links & Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions