Skip to content

fix(miner): cover worktree-allocator's slot pool in the right-to-be-forgotten purge - #8515

Closed
boskodev790 wants to merge 1 commit into
JSONbored:mainfrom
boskodev790:fix/miner-worktree-allocator-purge-8320
Closed

fix(miner): cover worktree-allocator's slot pool in the right-to-be-forgotten purge#8515
boskodev790 wants to merge 1 commit into
JSONbored:mainfrom
boskodev790:fix/miner-worktree-allocator-purge-8320

Conversation

@boskodev790

Copy link
Copy Markdown
Contributor

Summary

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (Closes #8320).

Validation

  • git diff --check
  • npm run typecheck
  • Branch coverage on the diff: purge-cli.ts 57/57 branches (100%); the new worktree-allocator.ts purgeByRepo/countWorktreeSlotsToPurge paths are fully covered (verified via targeted vitest --coverage).
  • Full miner unit suites affected by the change are green: miner-worktree-allocator, miner-purge-cli, miner-attempt-cli, plus the broader affected set (11 files, 268 tests) and test:miner-pack.
  • command-reference:check, test:miner-deployment-docs-audit, docs:drift-check
  • New/changed behavior has tests for new branches (free-stale purge, active-slot no-op, no-match, dry-run count parity for both cases).

If any required check was skipped, explain why:

  • This is a miner-only change under packages/loopover-miner/**, which Codecov does not gate and which touches no workflows, UI, MCP, OpenAPI, Cloudflare Workers, or auth/cookie/CORS surfaces. So actionlint, test:workers, build:mcp/test:mcp-pack, ui:openapi:check, and ui:* are not applicable and were not run. Full-repo test:coverage was not run in one pass (environment constraint); coverage was measured on the changed files directly (100% of changed lines/branches) and the affected unit suites were run in full and are green.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and implies no compensation/optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests — N/A (no such change).
  • API/OpenAPI/MCP behavior is updated and tested where needed — N/A (no such change).
  • UI changes use live API data or real states — N/A (no UI change).
  • Visible UI changes include a UI Evidence section — N/A (no visible UI/frontend/docs change; miner CLI internals only).
  • Public docs/changelogs are updated where needed — N/A (no user-facing doc change; command-reference/deployment-docs drift checks pass).

Notes

  • Mirrors the exact precedents named in the issue: governor-state's on-store purgeByRepo for a non-uniform store, and release()/reclaimOrphanedAllocations()'s field-blanking UPDATE. No generic spec/specs entry is registered for this store, by design.

@boskodev790
boskodev790 requested a review from JSONbored as a code owner July 24, 2026 17:27
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.78%. Comparing base (5bfc9d3) to head (da0feb7).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
packages/loopover-miner/lib/worktree-allocator.ts 0.00% 5 Missing ⚠️
packages/loopover-miner/lib/purge-cli.ts 0.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #8515       +/-   ##
===========================================
+ Coverage   60.98%   88.78%   +27.80%     
===========================================
  Files         793       99      -694     
  Lines       79483    22910    -56573     
  Branches    24017     3930    -20087     
===========================================
- Hits        48471    20341    -28130     
+ Misses      27218     2391    -24827     
+ Partials     3794      178     -3616     
Flag Coverage Δ
backend 0.00% <0.00%> (?)
shard-2 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-miner/lib/purge-cli.ts 0.00% <0.00%> (ø)
packages/loopover-miner/lib/worktree-allocator.ts 0.00% <0.00%> (-83.48%) ⬇️

... and 694 files with indirect coverage changes

@JSONbored
JSONbored force-pushed the fix/miner-worktree-allocator-purge-8320 branch from 57ae39a to da0feb7 Compare July 24, 2026 17:45
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 24, 2026
@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-24 18:02:55 UTC

5 files · no blockers · CI failing · unstable

🛑 Suggested Action - Fix Blockers

  • AI review already in progress for this PR head: Another LoopOver pass is already running the AI review for this exact PR head. This pass is skipping to avoid a duplicate LLM call.

Review summary
AI review is already running for this PR head in another LoopOver pass. LoopOver is holding this PR for manual review until that pass completes.

Nits — 1 non-blocking
  • AI review already in progress for this PR head — The gate is held for a human reviewer rather than passed automatically; it re-evaluates once the in-flight review completes or on the next update.

CI checks failing

  • codecov/patch — 0.00% of diff hit (target 99.00%)

Decision drivers

  • ✅ Code review — No blockers (No AI review summary)
  • ⚠️ Gate result — Not blocking (Advisory; not blocking this PR.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8320
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 41 registered-repo PR(s), 7 merged, 13 issue(s).
Contributor context ✅ Confirmed Gittensor contributor boskodev790; Gittensor profile; 41 PR(s), 13 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The PR adds purgeByRepo to WorktreeAllocator with an UPDATE that only clears status='free' rows matching the repo (never deleting, never touching active slots), registers worktree-allocator in REAL_PURGE_TARGETS via the countDryRun mechanism mirroring governor-state's non-uniform precedent, and wires a matching dry-run counter plus comprehensive tests covering stale-free, active, no-match, and dry

Review context
  • Author: boskodev790
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 41 PR(s), 13 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(miner): worktree-allocator.ts's worktree_slots (has repo_full_name) is absent from purge-cli.ts's right-to-be-forgotten sweep

1 participant