Context
packages/loopover-engine/src/signals/engine.ts:1419-1424 — for publicAudienceMode === "oss_maintainer", the function returns settings.commentMode === "all_prs" || detection.detected || detection.source !== "official_gittensor_api". In every real construction site, detection.source is only ever "official_gittensor_api" (always paired with detected: true) or undefined — no construction path produces detected: false with source: "official_gittensor_api". So the third disjunct is true whenever detected is false, making the whole expression unconditionally true: for any oss_maintainer-audience repo, commentMode: "detected_contributors_only" behaves identically to "all_prs". The correct semantics already exist in the actual production implementation, shouldPublishPrComment in src/signals/settings-preview.ts:31-36 (the documented single source of truth for the live webhook processor and dry-run preview), which correctly gates on commentMode with no audience carve-out. shouldPublishPrIntelligenceComment has zero production callers anywhere in src/ — it's a superseded duplicate, still exported and able to mislead a future caller. Every existing test uses publicAudienceMode: "gittensor_only"; the oss_maintainer branch has zero test coverage, which is why the always-true collapse was never caught.
Requirements
- Either delete
shouldPublishPrIntelligenceComment in favor of the already-correct shouldPublishPrComment/decidePublicSurface, or fix the oss_maintainer branch to actually respect commentMode (e.g. settings.commentMode === "all_prs" || detection.detected, dropping the disjunct that defeats the gate).
- Add test coverage for the
oss_maintainer branch either way.
Deliverables
Test Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch, plus a regression test that reproduces the exact failure mode described above and asserts it's fixed.
Expected Outcome
No exported function in this codebase silently ignores commentMode for oss_maintainer-audience repos.
Links & Resources
packages/loopover-engine/src/signals/engine.ts:1419-1424, src/signals/settings-preview.ts:31-36,127-131, src/queue/processors.ts:7886,13843-13875.
Context
packages/loopover-engine/src/signals/engine.ts:1419-1424— forpublicAudienceMode === "oss_maintainer", the function returnssettings.commentMode === "all_prs" || detection.detected || detection.source !== "official_gittensor_api". In every real construction site,detection.sourceis only ever"official_gittensor_api"(always paired withdetected: true) orundefined— no construction path producesdetected: falsewithsource: "official_gittensor_api". So the third disjunct istruewheneverdetectedisfalse, making the whole expression unconditionallytrue: for anyoss_maintainer-audience repo,commentMode: "detected_contributors_only"behaves identically to"all_prs". The correct semantics already exist in the actual production implementation,shouldPublishPrCommentinsrc/signals/settings-preview.ts:31-36(the documented single source of truth for the live webhook processor and dry-run preview), which correctly gates oncommentModewith no audience carve-out.shouldPublishPrIntelligenceCommenthas zero production callers anywhere insrc/— it's a superseded duplicate, still exported and able to mislead a future caller. Every existing test usespublicAudienceMode: "gittensor_only"; theoss_maintainerbranch has zero test coverage, which is why the always-true collapse was never caught.Requirements
shouldPublishPrIntelligenceCommentin favor of the already-correctshouldPublishPrComment/decidePublicSurface, or fix theoss_maintainerbranch to actually respectcommentMode(e.g.settings.commentMode === "all_prs" || detection.detected, dropping the disjunct that defeats the gate).oss_maintainerbranch either way.Deliverables
shouldPublishPrIntelligenceCommentdeleted or fixedoss_maintainer+commentMode: "detected_contributors_only"+ an undetected contributor returnsfalseTest Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch, plus a regression test that reproduces the exact failure mode described above and asserts it's fixed.
Expected Outcome
No exported function in this codebase silently ignores
commentModefoross_maintainer-audience repos.Links & Resources
packages/loopover-engine/src/signals/engine.ts:1419-1424,src/signals/settings-preview.ts:31-36,127-131,src/queue/processors.ts:7886,13843-13875.