Skip to content

fix(miner): delegate three resolve*DbPath helpers to resolveLocalStoreDbPath (#8336)#8496

Closed
claytonlin1110 wants to merge 2 commits into
JSONbored:mainfrom
claytonlin1110:fix/miner-resolve-local-store-db-path-8336
Closed

fix(miner): delegate three resolve*DbPath helpers to resolveLocalStoreDbPath (#8336)#8496
claytonlin1110 wants to merge 2 commits into
JSONbored:mainfrom
claytonlin1110:fix/miner-resolve-local-store-db-path-8336

Conversation

@claytonlin1110

Copy link
Copy Markdown
Contributor

Summary

  • Delegate resolveOrbExportDbPath, resolveDenyHookSynthesisDbPath, and resolveLaptopStateDbPath to resolveLocalStoreDbPath (same one-line pattern as resolvePredictionLedgerDbPath).
  • Add LOOPOVER_MINER_LAPTOP_STATE_DB as the laptop store's explicit override (paths unchanged when unset). Leave private resolveMinerStateDir in laptop-init.ts for non-SQLite callers.
  • Regenerate packages/loopover-miner/docs/env-reference.md and apps/loopover-ui/src/lib/ams-env-reference.ts via npm run miner:env-reference ("" to (none) for the two pure refactors; new laptop row).

Closes #8336

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
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Miner-package path-resolution refactor only (packages/loopover-miner/** is not Codecov-gated). Locally verified: typecheck, miner env-reference check, targeted vitest for orb-export / deny-hook-synthesis / laptop-init (path + override + parity cases), test:workers, engine/live-gate/driver parity, ui:typecheck, docs/branding drift checks, and npm audit. Full npm run test:ci hits a known Windows path double-prefix in miner check-syntax.mjs and Windows npm pack failures unrelated to this diff; those steps run on Linux CI.

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

N/A — generated AMS env-reference sync only; no visible UI change.

State / title JPG/PNG evidence
N/A

Notes

  • Pure refactor for orb-export and deny-hook-synthesis (existing env var names unchanged).
  • laptop-init adds LOOPOVER_MINER_LAPTOP_STATE_DB; default path resolution unchanged when unset.

@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 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.25%. Comparing base (5bfc9d3) to head (e91313e).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
packages/loopover-miner/lib/deny-hook-synthesis.ts 0.00% 1 Missing ⚠️
packages/loopover-miner/lib/laptop-init.ts 0.00% 1 Missing ⚠️
packages/loopover-miner/lib/orb-export.ts 0.00% 1 Missing ⚠️

❌ Your patch status 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    #8496      +/-   ##
==========================================
- Coverage   92.53%   88.25%   -4.29%     
==========================================
  Files         793      100     -693     
  Lines       79483    23049   -56434     
  Branches    24017     3980   -20037     
==========================================
- Hits        73547    20341   -53206     
+ Misses       4799     2530    -2269     
+ Partials     1137      178     -959     
Flag Coverage Δ
backend 0.00% <0.00%> (?)
shard-1 ?
shard-2 ?
shard-3 ?

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

Files with missing lines Coverage Δ
packages/loopover-miner/lib/deny-hook-synthesis.ts 0.00% <0.00%> (-96.97%) ⬇️
packages/loopover-miner/lib/laptop-init.ts 0.00% <0.00%> (-99.30%) ⬇️
packages/loopover-miner/lib/orb-export.ts 0.00% <0.00%> (-100.00%) ⬇️

... and 693 files with indirect coverage changes

@JSONbored
JSONbored force-pushed the fix/miner-resolve-local-store-db-path-8336 branch from df15f70 to 166a2fe Compare July 24, 2026 17:22
@andriypolanski

Copy link
Copy Markdown
Contributor

Hi @JSONbored, you updated bot, why doesn’t the bot detect two-shot submissions?

@JSONbored

JSONbored commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Hi @JSONbored, you updated bot, why doesn’t the bot detect two-shot submissions?

Because it's a one-shot bot, not a two-shot bot, and there's currently a large backlog/lag from all the submissions it's working through. Have some patience.

@loopover-orb loopover-orb Bot closed this Jul 24, 2026
@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

This repository reviews pull requests one-shot: the PR must be correct as originally opened. Pushing an additional commit closes it automatically instead of restarting review — open a fresh pull request with every fix included.

@loopover-orb loopover-orb Bot added review-evasion Gittensor contributor context gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels 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. review-evasion Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(miner): orb-export.ts, deny-hook-synthesis.ts, and laptop-init.ts hand-duplicate local-store.js's resolveLocalStoreDbPath

3 participants