Skip to content

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

Closed
galuis116 wants to merge 1 commit into
JSONbored:mainfrom
galuis116:fix/8641-laptop-state-store-integrity-migrate
Closed

fix(miner): include laptop-state in doctor integrity and migrate store lists#8747
galuis116 wants to merge 1 commit into
JSONbored:mainfrom
galuis116:fix/8641-laptop-state-store-integrity-migrate

Conversation

@galuis116

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 Node path; changes are TypeScript-compatible with existing 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 locally — full suite not run here; 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 (no UI/OpenAPI)
  • 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 (no dependency changes)
  • 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. Full test:coverage left to CI; 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
@galuis116
galuis116 requested a review from JSONbored as a code owner July 26, 2026 02:19
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

LoopOver closed this because @galuis116 has 3 open pull requests, above this repository's configured limit of 2. Close or merge an existing one to open a new one. This is an automated maintenance action.

@loopover-orb loopover-orb Bot closed this Jul 26, 2026
@loopover-orb loopover-orb Bot added the mod:warning Gittensor contributor context label Jul 26, 2026
@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 (48ddabc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8747      +/-   ##
==========================================
- 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:warning Gittensor contributor context

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