⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
Context
Commit 84fcb0960 (#913, "fix: sanitize reward ranking scenario snapshots") added estimated[-\s]?rewards?|rewards?|...|rankings? to src/scenarios/input-model.ts:32-33's regex but touched only that file and its test -- src/scenarios/scenario-summary.ts:95-96's own copy of the same-purpose guard (assertPublicSummaryClean, used by renderPublicScenarioSummary) still reads /wallet|hotkey|coldkey|mnemonic|seed phrase|payout|reward[-\s]?estimate|farming|raw trust|trust[-\s]?score|scoreability|private[-\s]?reviewability|public[-\s]?score[-\s]?(?:estimate|prediction)/i -- missing rewards?/estimated rewards/rankings? entirely.
Requirements
Sync the two regexes -- ideally extract one shared constant both files import -- so scenario-summary.ts's guard catches the same terms input-model.ts's does, and add a test to scenario-summary.test.ts asserting a headline/note containing bare "rewards" or "rankings" is caught, mirroring the #913 test added to scenario-input-model.test.ts.
Deliverables
All of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.
Test Coverage Requirements
src/** -- 99%+ patch coverage, branch-counted, on the synced regex and its new test.
Expected Outcome
A public scenario summary containing bare 'rewards' or 'rankings' language is caught by assertPublicSummaryClean, closing a public-safety leak that the sibling guard already fixed.
Links & Resources
src/scenarios/input-model.ts:32-33
src/scenarios/scenario-summary.ts:95-96
test/unit/scenario-input-model.test.ts
Context
Commit
84fcb0960(#913, "fix: sanitize reward ranking scenario snapshots") addedestimated[-\s]?rewards?|rewards?|...|rankings?tosrc/scenarios/input-model.ts:32-33's regex but touched only that file and its test --src/scenarios/scenario-summary.ts:95-96's own copy of the same-purpose guard (assertPublicSummaryClean, used byrenderPublicScenarioSummary) still reads/wallet|hotkey|coldkey|mnemonic|seed phrase|payout|reward[-\s]?estimate|farming|raw trust|trust[-\s]?score|scoreability|private[-\s]?reviewability|public[-\s]?score[-\s]?(?:estimate|prediction)/i-- missingrewards?/estimated rewards/rankings?entirely.Requirements
Sync the two regexes -- ideally extract one shared constant both files import -- so
scenario-summary.ts's guard catches the same termsinput-model.ts's does, and add a test toscenario-summary.test.tsasserting a headline/note containing bare "rewards" or "rankings" is caught, mirroring the #913 test added toscenario-input-model.test.ts.Deliverables
scenario-summary.test.tsasserting a headline/note containing bare "rewards" or "rankings" is caught byassertPublicSummaryClean, mirroring Fix public scenario reward/ranking sanitization #913's test inscenario-input-model.test.tsAll of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.
Test Coverage Requirements
src/**-- 99%+ patch coverage, branch-counted, on the synced regex and its new test.Expected Outcome
A public scenario summary containing bare 'rewards' or 'rankings' language is caught by
assertPublicSummaryClean, closing a public-safety leak that the sibling guard already fixed.Links & Resources
src/scenarios/input-model.ts:32-33src/scenarios/scenario-summary.ts:95-96test/unit/scenario-input-model.test.ts