feat(scripts): scan the AI review-pipeline source roots in selfhost-env-reference#7065
Conversation
…nv-reference gen-selfhost-env-reference.mjs's DEFAULT_SOURCE_ROOTS never scanned src/services/ai-review.ts, src/queue/ai-review-orchestration.ts, or src/queue/processors.ts, so four self-host-relevant env vars read there -- AI_SUMMARIES_ENABLED, AI_PUBLIC_COMMENTS_ENABLED, AI_MAX_OUTPUT_TOKENS, AI_BYOK_DAILY_REPO_LIMIT -- never reached the generated reference, even though all four are already declared in src/env.d.ts's self-host doc-comment block. Added the three files to DEFAULT_SOURCE_ROOTS, regenerated apps/loopover-ui/src/lib/selfhost-env-reference.ts (npm run selfhost:env-reference), and added a regression test that scans the real repo's default source roots and asserts all four vars are found.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
❌ 7 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-17 20:38:54 UTC
Review summary Nits — 3 non-blocking
CI 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 (1))). 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
scripts/gen-selfhost-env-reference.mjs'sDEFAULT_SOURCE_ROOTSnever scannedsrc/services/ai-review.ts,src/queue/ai-review-orchestration.ts, orsrc/queue/processors.ts, so four self-host-relevant env vars actually read in those files --AI_SUMMARIES_ENABLED,AI_PUBLIC_COMMENTS_ENABLED,AI_MAX_OUTPUT_TOKENS,AI_BYOK_DAILY_REPO_LIMIT-- never reached the generated reference, even though all four are already declared insrc/env.d.ts's self-host doc-comment block.DEFAULT_SOURCE_ROOTS.apps/loopover-ui/src/lib/selfhost-env-reference.tsvianpm run selfhost:env-referenceand committed the result (purely additive diff -- 70 lines added, 0 removed, no reordering of unrelated entries).collectSelfHostEnvVars()against the real repo (defaultrootDir/sourceRoots, not a synthetic fixture -- the point is confirming the actual new source roots are scanned) and asserts all four vars are found.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #6993
Validation
git diff --checknpm run actionlint(no workflow changes in this PR)npm run typechecknpm run test:coverage(verified rather than assumed per the issue's own caution:scripts/**is explicitly incodecov.yml'signorelist, and the regeneratedapps/loopover-ui/src/lib/selfhost-env-reference.tsfalls under theapps/**ignore too, so neither changed file is in the Codecov patch-coverage scope; ran the new/existing test suite locally instead -- see below)npm run test:workers(not applicable to this change)npm run build:mcp(not applicable to this change)npm run test:mcp-pack(not applicable to this change)npm run ui:openapi:check(not applicable to this change)npm run ui:lint(not applicable to this change)npm run ui:typecheck(not applicable to this change)npm run ui:build(not applicable to this change)npm audit --audit-level=moderate(no dependency changes in this PR)If any required check was skipped, explain why:
npm run typecheck,npm run docs:drift-check, andnpm run selfhost:validate-observabilityall pass locally.npx vitest run test/unit/selfhost-env-reference-script.test.tspasses all 6 tests (5 pre-existing + 1 new), andnpm run selfhost:env-reference:checkconfirms the committed generated file matches a fresh regeneration (not stale).Safety
apps/loopover-uifile is a generated data reference, not a rendered component.)UI Evidencesection below with JPG/JPEG or PNG screenshots. (N/A -- this PR has no visual surface; it's a build-time generator + its generated output.)Notes