fix(signals): reuse shared linked-issue-required predicate in AI signal bundle#4631
Conversation
|
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 #4631 +/- ##
==========================================
- Coverage 94.11% 94.11% -0.01%
==========================================
Files 432 432
Lines 38370 38365 -5
Branches 13989 13988 -1
==========================================
- Hits 36113 36108 -5
Misses 1600 1600
Partials 657 657
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-10 08:47:36 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
…al bundle buildPublicCommentSignalBundle re-derived the linked-issue-gate condition independently of publicSafePreflightFindings, checking only requireLinkedIssue and omitting the linkedIssueGateMode !== "off" half. A repo that opts into the gate purely via linkedIssueGateMode: "block" in .gittensory.yml (never touching the legacy requireLinkedIssue boolean) had the missing-linked-issue finding silently dropped from the context handed to the optional AI-rewrite layer, even though the main preflight/comment surface correctly kept it. Have buildPublicCommentSignalBundle call publicSafePreflightFindings directly instead of duplicating the condition a third time, so the two call sites can never diverge again. Fixes #4606
bb9a123 to
1431a13
Compare
Summary
buildPublicCommentSignalBundlere-derived the "is a linked issue effectively required" conditionindependently of
publicSafePreflightFindings, checking onlysettings.requireLinkedIssueandomitting the
settings.linkedIssueGateMode !== "off"half that the doc comment on the sharedfilter says both call sites must agree on.
.gittensory.yml'slinkedIssueGateMode: "block"(themodern config-as-code path, never touching the legacy DB-backed
requireLinkedIssueboolean) gotcorrect behavior in the main preflight/comment surface, but the AI-rewrite signal bundle silently
dropped the
missing_linked_issuefinding from the context handed to the optional AI-rewrite layer.buildPublicCommentSignalBundlenow callspublicSafePreflightFindingsdirectly and maps theresult to titles, instead of re-deriving the filter chain a third time. This also picks up the
bounty-lifecycle filter and the broader private-term check (detail/publicText/action, not just
code/title) that the shared function already applies — strictly more conservative than before, never
less.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlint(no workflow files touched)npm run typechecknpm run test:coveragelocally (scoped totest/unit/signals.test.ts+test/unit/signals-coverage.test.tswith coverage restricted tosrc/signals/engine.ts); the new line (publicFindingTitles = publicSafePreflightFindings(...)) is exercised by both the pre-existing bundle tests and the new regression test — no new branches are introduced at the call site itself, the branches live inside the already-covered shared predicate.npm run test:workers(no worker-pool code touched)npm run build:mcp(ran as part of confirming a fresh worktree needed the workspace packages built before other test files would resolve; unaffected by this change)npm run test:mcp-pack(no MCP package changes)npm run ui:openapi:checknpm run ui:lint(no UI files touched)npm run ui:typecheck(no UI files touched)npm run ui:build(no UI files touched)npm audit --audit-level=moderate(no dependency changes)test/unit/signals.test.ts) covering both sides of the fixed condition:linkedIssueGateMode: "block"withrequireLinkedIssue: false(previously dropped, now correctly surfaced) andlinkedIssueGateMode: "off"withrequireLinkedIssue: false(correctly still dropped).If any required check was skipped, explain why:
src/signals/engine.ts; the skipped checks (actionlint, workers, MCP pack, UI lint/typecheck/build, dependency audit) have no surface this diff touches.npm run db:migrations:checkandnpm run db:schema-drift:checkwere also run locally and pass (no DB/schema change). Full CI (test:ci) will run the complete gate on push.Safety
ui:openapi:checkandui:openapi:settings-parityboth pass unchanged.)UI Evidencesection below with JPG/JPEG or PNG screenshots... (N/A — no visible UI change; backend-only fix.)docs:drift-checkunaffected.)UI Evidence
N/A — backend-only fix, no visible UI surface.
Notes
refactor
publicSafeNextSteps's separatecontainsPrivatePublicTermusage, which is unrelated tothe linked-issue-gate condition this issue is about.