Skip to content

feat(review): record review-memory suppression on @gittensory resolve - #3953

Merged
loopover-orb[bot] merged 4 commits into
JSONbored:mainfrom
andriypolanski:feat/review-record-memory
Jul 7, 2026
Merged

feat(review): record review-memory suppression on @gittensory resolve#3953
loopover-orb[bot] merged 4 commits into
JSONbored:mainfrom
andriypolanski:feat/review-record-memory

Conversation

@andriypolanski

Copy link
Copy Markdown
Contributor

Summary

  • Add maybeProcessResolveCommand to handle @gittensory resolve [finding-code] on PR threads.
  • Classify via classifyPrCommandRequest, authorize via evaluateCommandAuthorization("resolve"), and record github_app.finding_resolved keyed to repo#pr.
  • When GITTENSORY_REVIEW_MEMORY and review.memory are both on, write bounded suppression signals via recordReviewSuppression and audit github_app.review_memory_recorded.
  • Post a public-safe confirmation comment; the Gate check-run and advisory are never mutated.

Closes #1964

Depends on #2160 action-command parsing (resolve verb recognized in parseGittensoryMentionCommand).

Overlaps with #2166 (resolve dispatch scaffold); this PR adds the review-memory record path the epic still lacked after #2178#2181.

Scope

Changed files

File Change
src/review/review-memory-record.ts Pure helpers: normalize finding ref, select warnings, build suppression writes
src/queue/processors.ts maybeProcessResolveCommand, skip/denied helpers, webhook wiring
test/unit/review-memory-record.test.ts Pure helper coverage
test/unit/queue.test.ts Authorized/denied/skipped/flag-off/whole-PR integration coverage
apps/gittensory-ui/src/routes/docs.tuning.tsx Document @gittensory resolve as the record trigger

Validation

git diff --check
npm exec vitest run test/unit/review-memory-record.test.ts test/unit/queue.test.ts -t "resolve|#1964"
npm run test:coverage -- test/unit/review-memory-record.test.ts test/unit/queue.test.ts
npm run test:ci
npm audit --audit-level=moderate

@andriypolanski
andriypolanski requested a review from JSONbored as a code owner July 7, 2026 07:39
@andriypolanski andriypolanski changed the title Feat/review record memory feat(review): record review-memory suppression on @gittensory resolve Jul 7, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.69%. Comparing base (b8a1186) to head (10412ce).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3953   +/-   ##
=======================================
  Coverage   93.68%   93.69%           
=======================================
  Files         373      373           
  Lines       34895    34928   +33     
  Branches    12768    12783   +15     
=======================================
+ Hits        32692    32725   +33     
  Misses       1584     1584           
  Partials      619      619           
Files with missing lines Coverage Δ
src/queue/processors.ts 94.60% <100.00%> (+0.05%) ⬆️
src/review/review-memory-wire.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 7, 2026
@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-07 08:19:57 UTC

6 files · 1 AI reviewer · no blockers · readiness 82/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR wires `@​gittensory resolve` into the issue_comment webhook path: it classifies the command, authorizes the actor, normalizes the finding reference (whole-PR or single code), recomputes live gate state via `buildAuthorizedPrActionAdvisory`/`evaluateGateCheck`, and — when `GITTENSORY_REVIEW_MEMORY` and the per-repo `review.memory` manifest flag are both on — writes bounded suppression signals via `recordReviewSuppression`, always posting a confirmation comment without touching the Gate check-run. The control flow (skip/deny/skip-not-found/dry-run/paused/live) is sound and each branch is exercised by a corresponding queue.test.ts case with matching audit-event assertions. The main defect worth noting is a description/diff mismatch: the PR description claims a new `src/review/review-memory-record.ts` module, but the actual helpers (`normalizeResolveFindingRef`, `selectWarningsForResolve`) land in the existing `src/review/review-memory-wire.ts`, and no `review-memory-record.ts` appears anywhere in the diff.

Nits — 5 non-blocking
  • The PR description's file table lists `src/review/review-memory-record.ts` as a new pure-helpers module, but the diff adds `normalizeResolveFindingRef`/`selectWarningsForResolve` to the existing `src/review/review-memory-wire.ts` instead — the description doesn't match the actual diff and should be corrected.
  • `maybeProcessResolveCommand` in src/queue/processors.ts is written as one dense, unbroken statement spanning ~25 lines with no line breaks between the many audit/usage-recording branches, which is much harder to review/maintain than the multi-line style used by neighboring handlers like `recordGateOverrideSkip` just above it in the same file.
  • The suppression write in src/queue/processors.ts always sets `pathGlob: ""` for every finding — worth a one-line comment or confirmation that the matcher (feat(review): deterministic finding-fingerprint + suppression matcher for review memory #2180) treats empty as an intentional repo-wide wildcard rather than an oversight.
  • selecting warnings for a whole-PR resolve and mapping each to a suppression write doesn't dedupe by `finding.code`, so if two gate warnings share the same code the same category/patternHash gets written twice via `Promise.all` — confirm `recordReviewSuppression` is idempotent/unique-constrained for that case.
  • test/unit/sweep-watchdog.test.ts's `shouldAdvanceTime`/timeout tweak is unrelated to the `@​gittensory resolve` feature and could be split into its own small PR to keep this change focused on the review-memory record slice.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #1964
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 136 registered-repo PR(s), 79 merged, 23 issue(s).
Contributor context ✅ Confirmed Gittensor contributor andriypolanski; Gittensor profile; 136 PR(s), 23 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: andriypolanski
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, Python, Rust, Cuda, Kotlin, MDX, Scala
  • Official Gittensor activity: 136 PR(s), 23 issue(s).
  • Related work: Titles/paths share 9 meaningful terms. (issue #2165, issue #2166)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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

@andriypolanski
andriypolanski marked this pull request as ready for review July 7, 2026 07:49
@andriypolanski
andriypolanski marked this pull request as draft July 7, 2026 07:50

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit d652a37 into JSONbored:main Jul 7, 2026
9 checks passed
@andriypolanski
andriypolanski deleted the feat/review-record-memory branch July 16, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review memory — repeat false-positive suppression

1 participant