fix(signals): catch plural private terms in the public-safe comment backstop - #1380
fix(signals): catch plural private terms in the public-safe comment backstop#1380minion1227 wants to merge 4 commits into
Conversation
…ackstop containsPrivatePublicTerm is the sole public-safe gate for next-step lines and public finding titles/details on the converged PR comment (no scrub partner, unlike the unified-comment bridge). Its denylist wrapped bare-singular terms in word boundaries, so plural forms — "rewards", "payouts", "wallets", "hotkeys", "trust scores", "estimated scores" — passed the boundary and could surface on a public GitHub comment, while every sibling denylist (advisory.ts, queue-intelligence.ts, unified-comment-bridge.ts) already uses the plural-aware `s?` forms. Add `s?` to the pluralizable terms so the backstop matches singular and plural alike. Add a regression test asserting plural private terms are dropped from public finding titles, with a singular control proving no regression.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Important Gittensory found maintainer review notesScoped related-work signals were found for this PR. They are advisory unless the gate reports a blocker. Readiness score: 48/100
Signal definitions
Review context
Maintainer notes
Contributor next steps
💰 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1380 +/- ##
=======================================
Coverage 95.37% 95.37%
=======================================
Files 192 192
Lines 20852 20852
Branches 7540 7540
=======================================
Hits 19887 19887
Misses 383 383
Partials 582 582
🚀 New features to boost your workflow:
|
JSONbored
left a comment
There was a problem hiding this comment.
Closing this, and I want to be transparent about why.
This account is permanently blocked from contributing to our repositories — for plagiarism. You filed two PRs that were copies of another contributor's open work, submitted as your own to claim the credit:
- #1377 was an identical copy of kiannidev's #1376 (same source changes, tests only reworded to disguise the lift), filed ~90 minutes later against the same issue.
- #1378 was a byte-identical copy of kiannidev's #1373, filed ~2 hours later against the same issue.
Lifting another contributor's diff is a hard line for us, not a warning-track offense — that's two strikes. Our Code of Conduct now states it plainly: plagiarism and reward-farming result in a permanent block from contributing, across JSONbored/gittensory, JSONbored/metagraphed, and JSONbored/awesome-claude.
For the record, this particular change — the plural-term backstop in containsPrivatePublicTerm — read as genuine, original work, and I'm not disputing the code. But the block is on the account, not the diff, so it doesn't get a merit review. Closed and labeled slop as enforcement of the ban. This decision is final.
Summary
containsPrivatePublicTerm(src/signals/engine.ts) is the fail-safe public-safe backstop that drops a public-comment line if it still names private reward/wallet/trust internals. It is the sole gate at four public-surface call sites —publicSafeNextSteps,publicSafePreflightFindings, the inline next-steps filter inbuildPublicPrIntelligenceComment, andbuildPublicCommentSignalBundle— with no scrub step before it (unlikesrc/review/unified-comment-bridge.ts, whose byte-identicalPRIVATE_DROP_TERMSis safe only becausepublicSafeNitfirst scrubs with the plural-awarePRIVATE_FORBIDDEN_TERMS).rewardmatched butrewardsdid not — likewisepayouts,wallets,hotkeys,trust scores,estimated scores. A finding/step whose text used a plural (e.g. a title"Quarterly rewards summary") therefore passed the backstop and could surface on a public GitHub PR comment.s?plural form to the pluralizable terms, matching the intent already established by every sibling denylist —CHECK_RUN_FORBIDDEN_TERMS(src/rules/advisory.ts),PRIVATE_FORBIDDEN_TERMS(src/review/unified-comment-bridge.ts), andFORBIDDEN_PUBLIC_COMMENT_WORDS(src/queue-intelligence.ts), which all userewards?/wallets?/trust\s+scores?. Purely additive: every input matched before still matches; plurals now match too.linkedIssuePolicyispreferred(not required) andissueDiscoveryPolicyisdiscouraged, so a direct PR with this rationale is the intended path rather than filing a discovery issue.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥97% coverage of the lines AND branches you changed (aim for 98%+ on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Safety
UI Evidencesection below. (N/A — backend-only, no visible change.)UI Evidence
N/A — backend-only change to a sanitizer regex; no visible UI, frontend, docs, or extension change.
Notes
test/unit/signals-coverage.test.ts): builds the public comment signal bundle with a finding whose title carries each plural private term and asserts none survive intopublicFindingTitles; a singular-form control pins that the fix does not regress the cases already caught. Verified the test fails on the pre-fix regex (the plural leaks) and passes after the fix.