Skip to content

feat(enrichment): revert-recurrence detector for review brief#1699

Closed
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:feat/1696-revert-recurrence-detector
Closed

feat(enrichment): revert-recurrence detector for review brief#1699
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:feat/1696-revert-recurrence-detector

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add revert-recurrence REES analyzer detecting explicit revert titles, rollback language, and symmetric per-file churn
  • Wire into brief.ts, types.ts, and render.ts with a dedicated brief section
  • Unit tests under review-enrichment/test/revert-recurrence.test.ts

Fixes #1696

Validation

cd review-enrichment && npm test

Test plan

  • Explicit revert title/body detection
  • Rollback language flagged at medium confidence
  • Symmetric churn on imbalanced patches
  • Combined scan produces renderable findings

Add a REES analyzer that flags explicit revert titles, rollback language,
and symmetric per-file churn patterns associated with regression risk.

Fixes JSONbored#1696

Co-authored-by: Cursor <[email protected]>
@kiannidev kiannidev requested a review from JSONbored as a code owner June 28, 2026 23:25
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 28, 2026
@gittensory-orb

gittensory-orb Bot commented Jun 28, 2026

Copy link
Copy Markdown

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review — held for maintainer review

5 files · 1 AI reviewer · no blockers · readiness 55/100 · CI green · dirty

⏸️ Held for maintainer review

Review summary
The change adds a pure REES analyzer for revert/regression signals, wires it through the brief registry and renderer, and covers the main title/body/churn paths with unit tests. The wiring is coherent with the existing analyzer pattern, and the implementation is bounded and deterministic. The main concern is precision: the churn detector is named/rendered as symmetric churn but actually flags one-sided churn, which is useful but broad and should be described more accurately.

Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #1696
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Review load ❌ 8/20 Readiness component derived from cached public PR metadata and labels; size label size:L.
Validation evidence ❌ 5/25 Cached preflight status is hold.
Open PR queue ❌ 3/10 15 open PR(s), 11 likely reviewable, 4 unlinked.
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 3290 PR(s), 50 issue(s).
Gate result ✅ Passing No configured blocker found.
Nits — 8 non-blocking
  • nit: review-enrichment/src/analyzers/revert-recurrence.ts:42 names `isSymmetricChurn` as symmetric, but the predicate detects highly imbalanced churn; rename it or adjust the rendered/detail text so reviewers do not read this as add/delete symmetry.
  • nit: review-enrichment/src/analyzers/revert-recurrence.ts:12 does not match common explicit forms like `Reverts "..."` in a PR title, so confirm that omission is intentional or broaden the title regex.
  • nit: review-enrichment/src/analyzers/revert-recurrence.ts:28 relies on `patch.split("\n", 2000)` for bounding; a local `patchLines` generator like `redos.ts` would be more consistent with the repo's bounded attacker-controlled patch handling.
  • nit: review-enrichment/test/revert-recurrence.test.ts:54 only checks a 10:1 churn case and balanced/too-small cases; add boundary coverage for `total === 12`, `dominant === 8`, `minor === 0`, and the exact 4:1 threshold.
  • review-enrichment/src/analyzers/revert-recurrence.ts:42: rename `isSymmetricChurn` to `isRevertShapedChurn` or change the threshold logic to match true symmetry.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
  • Pull request duplicates other open work — Check for an existing pull request or issue covering this change and coordinate or consolidate before continuing.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 3290 PR(s), 50 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (issue #1514)
  • Related work: Items reference the same linked issue feat(enrichment): revert-recurrence detector for review brief #1696. (issue #1696)
  • Related work: Titles/paths share 8 meaningful terms. (PR #1687)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Review top overlaps.
  • Add scope summary.
  • Fix blocker.
  • Expect slower review.
  • Refresh registry data or choose a registered active repo.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Review load = cached public PR metadata such as size labels, changed paths, and preflight status.
  • Open PR queue = repo-wide review pressure; it is not a PR quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
Review details

Generated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative.

The change adds a pure REES analyzer for revert/regression signals, wires it through the brief registry and renderer, and covers the main title/body/churn paths with unit tests. The wiring is coherent with the existing analyzer pattern, and the implementation is bounded and deterministic. The main concern is precision: the churn detector is named/rendered as symmetric churn but actually flags one-sided churn, which is useful but broad and should be described more accurately.

Nits (5)

  • nit: review-enrichment/src/analyzers/revert-recurrence.ts:42 names `isSymmetricChurn` as symmetric, but the predicate detects highly imbalanced churn; rename it or adjust the rendered/detail text so reviewers do not read this as add/delete symmetry.
  • nit: review-enrichment/src/analyzers/revert-recurrence.ts:12 does not match common explicit forms like `Reverts "..."` in a PR title, so confirm that omission is intentional or broaden the title regex.
  • nit: review-enrichment/src/analyzers/revert-recurrence.ts:28 relies on `patch.split("\n", 2000)` for bounding; a local `patchLines` generator like `redos.ts` would be more consistent with the repo's bounded attacker-controlled patch handling.
  • nit: review-enrichment/test/revert-recurrence.test.ts:54 only checks a 10:1 churn case and balanced/too-small cases; add boundary coverage for `total === 12`, `dominant === 8`, `minor === 0`, and the exact 4:1 threshold.
  • review-enrichment/src/analyzers/revert-recurrence.ts:42: rename `isSymmetricChurn` to `isRevertShapedChurn` or change the threshold logic to match true symmetry.

🟩 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.

  • Re-run Gittensory review

@gittensory-orb gittensory-orb Bot added gittensor Gittensor contributor context gittensor:feature Gittensor-scored feature linked to a feature issue - worth 1.25x multiplier. labels Jun 28, 2026

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix merge conflicts before resubmitting:

This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/1699/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

@JSONbored JSONbored closed this Jun 29, 2026
@kiannidev

Copy link
Copy Markdown
Contributor Author

Hi, @JSONbored
Please reopen this PR so that I can resolve conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue - worth 1.25x multiplier. gittensor Gittensor contributor context size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(enrichment): revert-recurrence detector for review brief

2 participants