fix(signals): guard focus-manifest's preferred linked-issue nudge on bodyObserved (#8326)#8448
Conversation
…bodyObserved (JSONbored#8326) buildFocusManifestGuidance's "required" linked-issue branch already carries a bodyObserved guard so a sparse webhook payload (body never observed, so linkedIssueCount === 0 only means "unknown", not "no issue") can't trip a false positive. Its "preferred" sibling immediately below was missing that same guard, so a linkedIssuePolicy: "preferred" repo could surface the "Maintainer prefers a linked issue" nudge for a PR whose body was never actually observed. Adds `&& bodyObserved` to the "preferred" condition, matching the "required" branch. Per the issue, hasNoIssueRationale is intentionally NOT added here -- only the concretely-verified bodyObserved gap. Adds a regression test asserting a preferred-policy repo with bodyObserved: false and linkedIssueCount: 0 does NOT produce the manifest_linked_issue_ preferred finding; the existing "prefers a linked issue" test already covers the bodyObserved: true arm.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8448 +/- ##
==========================================
- Coverage 92.42% 89.69% -2.74%
==========================================
Files 791 98 -693
Lines 79294 22949 -56345
Branches 23952 4021 -19931
==========================================
- Hits 73291 20583 -52708
+ Misses 4866 2187 -2679
+ Partials 1137 179 -958
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 13:59:27 UTC
Review summary Nits — 3 non-blocking
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.
|
Summary
Closes #8326.
buildFocusManifestGuidanceinsrc/signals/focus-manifest.tsbuilds contributor-facing findings from a repo's maintainer focus manifest. Its"required"linked-issue branch already carries abodyObservedguard:That guard exists to avoid a false positive on a sparse webhook payload where the PR body was never actually observed --
linkedIssueCount === 0then only means "we don't know", not "there really is no linked issue".The
"preferred"sibling immediately below was missing it, so a repo configured withlinkedIssuePolicy: "preferred"could surface the "Maintainer prefers a linked issue" nudge for a PR whose body was never observed -- the exact false-positive class the"required"branch was already fixed to avoid.Adds
&& bodyObservedto the"preferred"condition so it matches its sibling.Per the issue's guidance,
hasNoIssueRationaleis deliberately not added to the"preferred"branch -- only the concretely-verifiedbodyObservedgap is closed, leaving the stricter"required"contract's extra exemption where it is.Tests
Adds a regression test asserting a
preferred-policy repo withbodyObserved: falseandlinkedIssueCount: 0does not produce themanifest_linked_issue_preferredfinding. The existing "prefers a linked issue under the preferred policy" test directly above already covers thebodyObserved: truearm, so both sides of the new operand are exercised.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #8326).Validation
git diff --checknpm run actionlint- no workflow files touched.npm run typechecknpx vitest run test/unit/focus-manifest.test.ts- 793 pass (was 792).bodyObservedoperand exercised on both arms (true via the existing preferred test, false via the new one).npm run test:coverage(full) /test:workers/build:mcp/ui:*- not run: this is a one-line condition change plus one test, touching no worker, MCP, or UI surface.npm audit --audit-level=moderate- no dependency changes.If any required check was skipped, explain why:
src/**line is covered on both branch arms locally, socodecov/patchhas real coverage for the diff.Safety
UI Evidencesection - n/a: no visible UI/frontend/docs/extension change.Notes
infofinding is emitted; it can never introduce a new blocker.