chore(miner): migrate batch 4.5 foundational lib modules to TypeScript - #7380
chore(miner): migrate batch 4.5 foundational lib modules to TypeScript#7380oktofeesh1 wants to merge 1 commit into
Conversation
Converts 8 packages/loopover-miner/lib/** modules to real TypeScript (in-place .ts -> .js/.d.ts emit, import paths unchanged): deny-hooks, policy-doc-cache, pr-outcome, attempt-log, coding-task-spec, stack-detection, ci-poller, self-review-context. Refs JSONbored#7313
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-19 23:29:09 UTC
Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentCI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (6), validate-tests (5), validate-tests (3), validate-tests (2), validate-tests (4), validate-tests (1), validate-code); AI reviewers agree on a likely critical defect: packages/loopover-miner/lib/ci-poller.ts githubHeaders (and the identical helper in self-review-context.ts) no longer calls `.trim()` on `githubToken` before setting the `Authorization` header — the prior `.js` did `const token = ...githubToken.trim() : ''`; a token sourced from `env.GITHUB_TOKEN` with trailing whitespace/newline (common when read from a mounted secret file) will now be sent un-trimmed, which can throw on the fetch header write or silently fail auth against the GitHub API on a reachable path.). 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. |
Summary
packages/loopover-miner/lib/**modules to real TypeScript (in-place.ts->.js/.d.tsemit, import paths unchanged):deny-hooks,policy-doc-cache,pr-outcome,attempt-log,coding-task-spec,stack-detection,ci-poller,self-review-context.test/unit/miner-coding-task-spec-path-guard.test.tsthat mocks@loopover/engine'sACCEPTANCE_CRITERIA_FILENAMEexport to a path-traversal value, provingassertContainedPath's defense-in-depth throw actually fires rather than deleting it as apparently-unreachable dead code (it's unreachable only because the real constant is currently a fixed safe basename).Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #7313
Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — 100%/100% on 7 of the 8 files.ci-poller.tsis 100% branches / 99% lines with one residual line that's provably unreachable at runtime (normalizeOptionsclampsmaxAttemptsto a minimum of 1, so the loop's trailingreturncan never execute; documented inline, kept only because TypeScript's control-flow analysis can't see that runtime guarantee).self-review-context.tsis 98.7% lines / 94.6% branches after extensive targeted test-writing — the remaining gaps are deeply nested combinations of optional ORB-probe/pagination/manifest-override paths with diminishing marginal value per additional test; documented as an accepted residual rather than chased further.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm audit --audit-level=moderatereports a pre-existing high-severityadm-zipadvisory (no fix available) viagithub-actionlint, inherited unchanged frommainand unrelated to this PR'spackages/loopover-miner/lib/**scope.Safety
self-review-context.ts's GitHub/ORB-probe fetch paths are covered by both positive and failure-path tests.)Notes
self-review-context.ts'senv?: NodeJS.ProcessEnvfield was widened toRecord<string, string | undefined>to match this file's own convention elsewhere (and how its tests construct minimal env objects); the one remaining call into the still-JSgithub-token-resolution.js'sresolveLoopoverBackendSession(typedenv?: NodeJS.ProcessEnv) is bridged with a documented cast, the same pattern already used forlaptop-init.ts'sresolveGitHubTokenin the prior batch.