Skip to content

feat(miner): migrate policy-doc-cache onto the SqliteDriver store seam#7294

Merged
JSONbored merged 1 commit into
mainfrom
fix/miner-policy-doc-cache-driver-seam
Jul 19, 2026
Merged

feat(miner): migrate policy-doc-cache onto the SqliteDriver store seam#7294
JSONbored merged 1 commit into
mainfrom
fix/miner-policy-doc-cache-driver-seam

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Advances #7282

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused (one store migrated, no unrelated changes) 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 advances (Advances #7282 above -- deliberately not
    Closes, since feat(miner): finish rolling the SqliteDriver seam onto AMS's remaining local stores #7282 tracks migrating the remaining ~11 stores too, not just this one).

Validation

  • git diff --check
  • npm run typecheck (root -- clean)
  • npm run test:coverage on the changed module -- 100% statements/branches/functions/lines
    (28/28, 14/14, 7/7, 24/24), verified against the raw coverage report.
  • Every existing test in test/unit/miner-policy-doc-cache.test.ts and
    test/unit/opportunity-fanout-policy-doc-cache.test.ts (20 tests total) passes completely
    unmodified -- direct evidence this migration changed no observable behavior.
  • Full npm run test:ci green end to end, run under the repo's pinned Node 22 (.nvmrc), on a
    clean coverage directory (a prior run hit a transient coverage-tmp-file race from overlapping
    local gate invocations; re-run clean to confirm).
  • npm audit --audit-level=moderate -- clean except the same pre-existing, unrelated
    adm-zip/github-actionlint advisory with no fix available.

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.
    (N/A -- local SQLite cache store, not an auth surface.)
  • API/OpenAPI/MCP behavior is updated and tested where needed. (N/A -- no OpenAPI-documented
    surface touched.)
  • UI changes use live API data -- N/A, no UI change.
  • Visible UI changes include a UI Evidence section -- N/A, backend-only change, no visible UI.
  • Public docs/changelogs are updated where needed; changelogs are only edited for
    release-prep PRs. (No CHANGELOG.md edit; internal storage-abstraction detail.)

Notes

Continues #7175/#7194's storage-abstraction pattern (currently only run-state.js had migrated):
routes policy-doc-cache's get/put through openLocalStoreAdapter's driver.query instead of raw
DatabaseSync-backed prepared statements. Public API stays synchronous -- this is a pure seam
migration, no behavior change, proven by every existing test passing unmodified.

Advances #7282
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored JSONbored self-assigned this Jul 19, 2026
@JSONbored
JSONbored merged commit aa95c0a into main Jul 19, 2026
11 checks passed
@JSONbored
JSONbored deleted the fix/miner-policy-doc-cache-driver-seam branch July 19, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant