feat(enrichment): add CODEOWNERS blast-radius analyzer - #1645
Conversation
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge Review summary Blockers
Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. Well-structured new analyzer: type-safe, fail-safe network layer, SLUG_RE guards URL interpolation before encodeURIComponent, last-match-wins wired correctly at the query layer. Two correctness bugs undermine the CODEOWNERS semantic model — one silently drops ownership-clearing patterns, the other lets `**` match partial path-component suffixes — both generate false-positive violations on real repos. Blockers
Nits (5)
🟩 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.
|
Summary
Adds a CODEOWNERS + blast-radius analyzer to REES (#1515) that surfaces
changed files governed by a CODEOWNERS rule whose owner is not the PR author.
.github/CODEOWNERS(with fallbacks toCODEOWNERSanddocs/CODEOWNERS) via the GitHub contents API using the installation token.uses only
[^/]*,.*, and[^/]— no catastrophic backtracking onattacker-controlled input.
@and is case-insensitive;Alicematches
@alice.rule that excludes the author are reported.
CODEOWNERS file returns
[]without throwing. Caps at 20 findings.promptSectionas a### CODEOWNERS violations — N ownership domain(s) affectedblock withper-file owner lists and blast-radius count derived at render time.
SLUG_REvalidates owner/repo segments before API URL interpolation,preventing path-traversal on attacker-controlled
repoFullName.Resolves #1515.
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:
test:workers— no Cloudflare Worker bindings touched; REES is a standalone Node.js service.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
No visible UI changes — REES is a backend enrichment service; output appears
only in the review engine's prompt section.
Notes
**(across separators),*(within a pathsegment),
?(single non-/char), leading/(repo-root anchor),trailing
/(any descendant), and interior/(implicit anchor) —matching GitHub's documented CODEOWNERS semantics.
handles/teams) across all flagged files; derived at render time from the
full findings set so it requires no extra data in the finding struct.