Fix public scenario reward/ranking sanitization - #913
Conversation
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 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. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 3 changed file(s) — two independent AI reviewers. Changed files: Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #913 +/- ##
=======================================
Coverage 96.71% 96.71%
=======================================
Files 108 108
Lines 14641 14641
Branches 5298 5298
=======================================
Hits 14160 14160
Misses 102 102
Partials 379 379 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…idden-word gate (#8913) FORBIDDEN_PATTERN matched only the bare singular `ranking` — the trailing `\b` can never sit between "g" and "s", so "rankings" slipped past this secondary public-safety gate. Change `ranking` to `rankings?`, matching the sibling regex fix in input-model.ts (#913), and export the pattern so its plural coverage can be asserted directly (the term is unreachable through the public builder because sanitizePublicComment rewrites it before this gate is consulted). Closes #8886 Co-authored-by: RealDiligent <brave.challenge007@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Motivation
Description
sanitizePublicCommentpatterns to redact generic reward and ranking language so entrylabel/detailare normalized to "private context" when matched. (changes insrc/github/commands.ts)FORBIDDEN_PUBLIC_LANGUAGEdefensive regex to include the newly-covered reward/ranking variants so any surviving terms cause the public-serialization guard to fail closed. (changes insrc/scenarios/input-model.ts)estimateentry containing reward/ranking wording and extend the public-serialization sample list to include the new variants. (changes intest/unit/scenario-input-model.test.ts)Testing
npx vitest run test/unit/scenario-input-model.test.ts, and all tests passed (16 passed).prettier --checkand project checks) and fixed style issues so checks pass.Codex Task