feat(enrichment): add revert-recurrence detector for review brief - #1753
feat(enrichment): add revert-recurrence detector for review brief#1753jeffrey701 wants to merge 1 commit into
Conversation
Add a REES analyzer that flags when a PR is reverting or re-introducing previously reverted work — a common regression / review-churn source the no-checkout reviewer cannot spot at a glance. Two signals, from the request the engine already has (no repo checkout): - explicit-revert: revert/rollback/re-introduce language in the PR title or body, including GitHub's `Revert "…"` titles (captures the subject) and `reverts commit <sha>` (captures the sha). - symmetric-churn: a file whose diff removes lines that re-appear as additions (overlap >= 3 and >= half the larger side) — the textual fingerprint of a revert / re-introduce, while ordinary mostly-new or mostly-deleted edits are not flagged. Wires the analyzer into the registry (brief.ts), the structured findings (types.ts), and a dedicated "Revert / re-introduce recurrence" brief section (render.ts). Fail-safe: returns [] on empty input. Tests cover explicit titles/bodies, the commit-sha body line, free-text rollback language, symmetric churn (incl. ignoring +++/--- headers), non-revert edits, empty input, and the rendered section. Closes JSONbored#1696
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-06-29 21:52:11 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 6 non-blocking
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.
|
JSONbored
left a comment
There was a problem hiding this comment.
The PR itself is valid/no problems, but there are now merge conflicts (previously submitted PR was merged that touched the same files).
This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/1753/conflicts) or the command line to resolve conflicts before continuing.
review-enrichment/src/brief.ts
review-enrichment/src/render.ts
review-enrichment/src/types.ts
Closing.
Summary
Adds a REES analyzer that detects when a PR is reverting or re-introducing previously reverted work — a common source of regressions and review churn the no-checkout
claude --printreviewer cannot spot at a glance.Closes #1696.
Signals (pure; only the request the engine already has — no repo checkout)
Revert "…"titles (captures the reverted subject) andreverts commit <sha>(captures the sha).Changes (all within
review-enrichment/)src/analyzers/revert-recurrence.ts— newscanRevertRecurrence(req)(fail-safe:[]on empty input).src/types.ts—RevertRecurrenceFinding+revertRecurrence?onBriefFindings.src/brief.ts— register the analyzer.src/render.ts— a dedicated "Revert / re-introduce recurrence" brief section.test/revert-recurrence.test.ts— explicit titles/bodies,reverts commit <sha>, free-text rollback, symmetric churn (incl. ignoring+++/---headers), non-revert edits, empty input, and the rendered section.Acceptance criteria
[]on empty inputValidation
npm --prefix review-enrichment test(build + sourcemap validation +node --test) → 165 tests pass.review-enrichment/package (inwantedPaths);src/**does not import it, so the root typecheck/coverage/workers/UI gate is unaffected, and there is nosrc/**Codecov-patch surface.