fix(review): drop unsafe enrichment sections#3949
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-07 09:10:10 UTC
🛑 Suggested Action - Manual Review
Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
CI checks failing
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.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3949 +/- ##
==========================================
- Coverage 93.66% 93.66% -0.01%
==========================================
Files 372 372
Lines 34856 34872 +16
Branches 12743 12748 +5
==========================================
+ Hits 32649 32663 +14
Misses 1588 1588
- Partials 619 621 +2
🚀 New features to boost your workflow:
|
Motivation
Description
sanitizeEnrichmentPromptSectionwith a section-aware fallback that drops a heading's entire section when the heading failssanitizePublicComment.markdownHeadingLevel,isPublicSafeEnrichmentLine, andretainPublicSafeEnrichmentSectionsinsrc/review/enrichment-wire.tsto detect markdown headings and retain only public-safe sections.it("drops non-public-safe enrichment sections with adjacent unlabeled values")totest/unit/enrichment-wire.test.tsthat asserts unlabeled values adjacent to a forbidden heading are not retained.Testing
npx vitest run test/unit/enrichment-wire.test.ts, which passed (44 tests).npm run typecheck(tsc --noEmit), which passed with no type errors.npx vitest run --coverage test/unit/enrichment-wire.test.tsfailed during coverage remapping withTypeError: jsTokens is not a function, and a fullnpm run test:coveragerun encountered unrelated runtime coverage errors and was terminated.npm audit --audit-level=moderatecould not complete due to a registry403 Forbiddenwhen hitting the audit endpoint.Codex Task