test(signals): cover decidePublicSurface's oss_maintainer not_checked label fallback (#8324)#8434
Conversation
… label fallback (JSONbored#8324) decidePublicSurface in src/signals/settings-preview.ts is the single source of truth for the GitHub App's public surface, shared by the live webhook processor and the maintainer dry-run preview. Its willLabel has an inline fallback disjunct -- oss_maintainer + not_checked + autoLabelEnabled + (comment_and_label | label_only) -- that governs whether a PR is labelled before the official Gittensor miner lookup completes. It had no coverage (grep not_checked in the test file returned nothing). Because shouldApplyPrLabel returns false for an oss_maintainer repo whose miner status is not "confirmed", this inline condition is the only thing that can set willLabel for a not_checked PR, so these tests isolate it exactly. Adds a describe covering the four arms of that disjunct: comment_and_label and label_only surfaces label; comment_only does not (the disjunct's own publicSurface check); and autoLabelEnabled=false does not. Test-only, no production change.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-24 13:14:19 UTC
Review summary Nits — 2 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-merge)). 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
Closes #8324.
decidePublicSurfaceinsrc/signals/settings-preview.tsis documented as the single source of truth for the GitHub App's public surface, shared by the live webhook processor and the maintainer-facing dry-run preview. ItswillLabelcomputation has an inline fallback disjunct:shouldApplyPrLabelreturnsfalsefor anoss_maintainerrepo whose miner status isn't"confirmed", so for anot_checkedPR this inline condition is the only thing that can setwillLabel-- it governs whether the webhook processor labels a PR before the official Gittensor miner lookup completes. It had zero coverage (grep not_checked test/unit/settings-preview.test.tsreturned nothing).Adds a
describeisolating the four arms of the disjunct:comment_and_labelsurface -> labels (andactionsincludeslabel)label_onlysurface -> labelscomment_onlysurface -> does NOT label (the disjunct's ownpublicSurfacecheck excludes it)autoLabelEnabled: false-> does NOT labelTest-only, no production change.
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #8324).Validation
git diff --checknpm run actionlint- no workflow files touched.npm run typechecknpx vitest run test/unit/settings-preview.test.ts- 36 pass (was 32); the four new assertions prove both arms of the disjunct.npm run test:coverage/test:workers/build:mcp/ui:*- not run: this adds four assertions to one existing unit test file and touches no other surface.npm audit --audit-level=moderate- no dependency changes.If any required check was skipped, explain why:
src/**lines are modified, socodecov/patchhas no changed lines to score. The worker/MCP/UI suites are unaffected because no such code is touched.Safety
UI Evidencesection - n/a: test-only, no visible change.Notes
minerStatus: "not_checked"soshouldApplyPrLabel's own arm isfalse, isolating the inline fallback as the sole determinant ofwillLabel.