fix(agent): exclude repo identifier from scenario-summary guard - #625
Conversation
assertPublicSummaryClean serialized the whole summary -- including the un-sanitized repoFullName -- and threw on FORBIDDEN_PUBLIC_LANGUAGE, so a legitimately named repo (hotkey/coldkey/wallet are Bittensor terms) made renderPublicScenarioSummary throw and fail entirely. Scan only the rendered free-text content; repoFullName/generatedAt are structural identifiers, not sanitized output.
|
gittensory · advisory review Reviewed 2 changed file(s) — two independent AI reviewers. Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
|
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. |
ghost
left a comment
There was a problem hiding this comment.
🔎 Gittensory inline review — 1 line-level note(s). Advisory only; a maintainer merges. See the summary comment for the full review.
JSONbored
left a comment
There was a problem hiding this comment.
@philluiz2323 this is ready.
A few notes:
- The fix is scoped to structural identifiers instead of weakening the sanitizer for rendered public text.
- The regression test covers the real failure mode: a legitimate repo name containing protocol terms should not make the scenario summary throw.
- No broad sanitizer behavior changed.
No code changes requested.
Closes #624.
assertPublicSummaryCleanserialized the entire summary and rejected it onFORBIDDEN_PUBLIC_LANGUAGE, butrepoFullNameis passed through un-sanitized (it is the repo identifier, not rendered content). So a legitimately named repo — andhotkey/coldkey/walletare literal Bittensor protocol terms — maderenderPublicScenarioSummarythrow, failing the public scenario summary entirely. The guard's own/* v8 ignore … all fields are sanitized */rationale was false forrepoFullName.Change
repoFullName/generatedAt(structural identifiers) before the forbidden-language check.repoFullName: "octo/hotkey-wallet"renders without throwing and preserves the name.Verification
scenario-summary.test.ts9/9 (the new case throws on the old code);tsc --noEmitclean; full suite green; branch coverage holds (>= 97% gate).Same accepted class as #457 (sanitizer breaking valid repo names like
wallet-adapter), different surface: a public-output guard that hard-threw on the un-sanitizedrepoFullName.