Skip to content

fix(miner): include laptop-state in doctor integrity and migrate store lists#8749

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
philluiz2323:fix/8641-laptop-state-store-integrity-migrate
Jul 26, 2026
Merged

fix(miner): include laptop-state in doctor integrity and migrate store lists#8749
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
philluiz2323:fix/8641-laptop-state-store-integrity-migrate

Conversation

@philluiz2323

Copy link
Copy Markdown
Contributor

Summary

  • Add laptop-state to doctor's storeIntegrityChecks and migrate's STORES so the eighteenth durable store gets the same deep PRAGMA integrity_check and proactive schema migration as the other seventeen.
  • Extract openLaptopStateStore(dbPath) for migrate's open adapter (initLaptopState now reuses it).
  • Correct DEPLOYMENT.md: LOOPOVER_MINER_LAPTOP_STATE_DB override is real, and store-integrity:laptop-state is part of the deep integrity sweep.

Closes #8641

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • 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 (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint — not applicable (no workflow changes)
  • npm run typecheck — skipped locally (Windows path; changes match existing TypeScript patterns)
  • Focused unit tests: npx vitest run test/unit/miner-migrate-cli.test.ts test/unit/miner-status.test.ts -t "eighteen|#8641|laptop-state|corrupted store|healthy setup" (5 passed)
  • npm run test:coverage — full suite left to CI; patch coverage aimed at 100% via healthy + corrupted integrity branches and migrate needs-migration path
  • npm run test:workers — not applicable
  • npm run build:mcp — not applicable
  • npm run test:mcp-pack — not applicable
  • npm run ui:openapi:check — not applicable
  • npm run ui:lint — not applicable
  • npm run ui:typecheck — not applicable
  • npm run ui:build — not applicable
  • npm audit --audit-level=moderate — not applicable
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Non-miner / non-touched surfaces skipped. Local focused vitest covers doctor integrity (healthy presence, healthy absence, corrupted) and migrate (pre-baseline → migrated → up-to-date) for laptop-state.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

Not applicable — miner CLI / docs only; no visible UI changes.

Notes

…e lists

Add laptop-state.sqlite3 to doctor's deep store-integrity sweep and migrate's STORES list, extract openLaptopStateStore for the migrate adapter, and correct DEPLOYMENT.md override/integrity claims.

Closes JSONbored#8641
@philluiz2323
philluiz2323 requested a review from JSONbored as a code owner July 26, 2026 02:34
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.67%. Comparing base (f094067) to head (9840034).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8749      +/-   ##
==========================================
- Coverage   93.80%   90.67%   -3.14%     
==========================================
  Files         797       99     -698     
  Lines       79491    22842   -56649     
  Branches    24085     4012   -20073     
==========================================
- Hits        74565    20711   -53854     
+ Misses       3555     1946    -1609     
+ Partials     1371      185    -1186     
Flag Coverage Δ
backend 97.72% <100.00%> (+2.64%) ⬆️

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

Files with missing lines Coverage Δ
packages/loopover-miner/lib/laptop-init.ts 95.77% <100.00%> (-1.37%) ⬇️
packages/loopover-miner/lib/migrate-cli.ts 100.00% <ø> (ø)
packages/loopover-miner/lib/status.ts 98.83% <ø> (ø)

... and 698 files with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-26 02:41:09 UTC

6 files · 1 AI reviewer · no blockers · readiness 95/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR extracts `openLaptopStateStore(dbPath)` from `initLaptopState` and wires it into both `storeIntegrityChecks` (doctor) and `STORES` (migrate), giving laptop-state.sqlite3 the same deep integrity check and proactive migration path as the other seventeen stores. The refactor is correct: `initLaptopState` still creates the dir/reads `created` before opening, and `openLaptopStateStore` returns the same `DatabaseSync` handle with schema stamped via `applySchemaMigrations`. Tests cover healthy/corrupted/absent doctor paths and a pre-baseline migrate path, and DEPLOYMENT.md's corrections (env override exists, integrity sweep includes laptop-state) match the code as shown.

Nits — 4 non-blocking

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8641
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: 1025 registered-repo PR(s), 601 merged, 126 issue(s).
Contributor context ✅ Confirmed Gittensor contributor philluiz2323; Gittensor profile; 1025 PR(s), 126 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds laptop-state to both storeIntegrityChecks in status.ts and STORES in migrate-cli.ts via a shared openLaptopStateStore helper, updates both test files to eighteen stores with dedicated healthy/corrupted/migration test cases, and corrects DEPLOYMENT.md's stale override and integrity-check claims.

Review context
  • Author: philluiz2323
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, MDX, TypeScript, CSS, Cuda, HTML, Kotlin
  • Official Gittensor activity: 1025 PR(s), 126 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 713145f into JSONbored:main Jul 26, 2026
8 checks passed
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): laptop-state.sqlite3 is missing from both doctor's integrity sweep and migrate's proactive-migration list

1 participant