Skip to content

feat(agent-actions): add a review-request nagging cooldown (#2463)#2530

Merged
JSONbored merged 1 commit into
mainfrom
feat/review-nag-cooldown
Jul 2, 2026
Merged

feat(agent-actions): add a review-request nagging cooldown (#2463)#2530
JSONbored merged 1 commit into
mainfrom
feat/review-nag-cooldown

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Adds a review-request nagging cooldown: when a PR/issue's own author repeatedly pings @gittensory on the same thread, the (N+1)th ping within a rolling window triggers the repo's configured policy — hold (deterministic cooldown reply, no further action) or close (labels + closes the PR through the same planner/executor gate stack — autonomy/dry-run/kill-switch/write-permission — as blacklist and the newly-landed contributor-cap short-circuit). Issue threads degrade to hold pending a dedicated closeIssue primitive (tracked separately).
  • Fully config-as-code: migration + Drizzle schema + RepositorySettings + DB round-trip (getRepositorySettings/upsertRepositorySettings) + .gittensory.yml parsing/precedence + OpenAPI schema + .gittensory.yml.example docs, all in this PR.
  • Adds a new shared autoCloseExemptLogins repo setting (a GitHub-login exemption list layered the same way, on top of the standing owner/admin/automation-bot exemption) intended for reuse by the per-contributor open-item cap too.
  • Off by default (reviewNagPolicy: "off") — byte-identical behavior for any repo that doesn't opt in.
  • Scoped to the thread's OWN author (issue.user.login === commenter) — a third party pinging on someone else's PR/issue is never tracked or throttled.
  • Fixes a pre-existing migration-number collision on main (two 0090_*.sql files landed by separately merged PRs) by renumbering the newer one to 0092; this repo's own migration takes 0091.

Scope

Validation

  • git diff --check
  • npm run actionlint (via npm run test:ci)
  • npm run typecheck
  • npm run test:coverage locally — all new/changed lines and branches in src/** covered (verified via manual coverage/lcov.info BRDA inspection); a handful of genuinely-unreachable defensive fallbacks (the resolver always resolves a concrete default) are v8 ignored, matching existing precedent elsewhere in this file.
  • npm run test:workers (via npm run test:ci)
  • npm run build:mcp (via npm run test:ci)
  • npm run test:mcp-pack (via npm run test:ci)
  • npm run ui:openapi:check (via npm run test:ci)
  • npm run ui:lint (via npm run test:ci)
  • npm run ui:typecheck (via npm run test:ci)
  • npm run ui:build (via npm run test:ci)
  • npm audit --audit-level=moderate
  • New/changed behavior has unit/integration tests: planner short-circuit (test/unit/agent-actions.test.ts), DB round-trip incl. invalid-value fallback (test/unit/data-spine.test.ts), the new count-in-window audit helper (test/unit/db-parsers.test.ts), .gittensory.yml parsing/precedence (test/unit/focus-manifest.test.ts), the new exemption-list module (test/unit/auto-close-exempt.test.ts), and full webhook-level integration tests covering off/under-threshold/hold/close/issue-degrade/exempt/third-party/owner/admin/dry-run/PR-already-closed/empty-autonomy-plan/no-installation scenarios (test/unit/queue.test.ts).

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text (the hold/close comments) stays sanitized, low-noise, and only interpolates public info (the author's own login and their own public ping count).
  • No auth/cookie/CORS/GitHub App/Cloudflare/session changes.
  • API/OpenAPI updated (src/openapi/schemas.ts + regenerated apps/gittensory-ui/public/openapi.json).
  • No UI changes — backend/webhook-only.
  • UI Evidence — not applicable (no visible UI change).
  • Docs updated (.gittensory.yml.example); no changelog edit.

Notes

Throttles a PR/issue author who repeatedly pings @gittensory for review on the
same thread: under the configured threshold, pings are just tracked; crossing
it applies the repo's policy ("hold" posts a deterministic cooldown reply,
"close" additionally closes the PR through the same planner/executor gate
stack as blacklist/contributor-cap). Issue threads degrade to "hold" pending a
dedicated closeIssue primitive. Off by default, per-repo configurable via
.gittensory.yml and a new shared autoCloseExemptLogins list, and scoped to the
thread's own author so a third party's pings never affect someone else's PR.

Also fixes a pre-existing migration-number collision on main (two 0090 files
from separately merged PRs) by renumbering the newer one to 0092.
@dosubot dosubot Bot added the size:L label Jul 2, 2026
@JSONbored JSONbored self-assigned this Jul 2, 2026
@loopover-orb

loopover-orb Bot commented Jul 2, 2026

Copy link
Copy Markdown

Important

🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪

🔍 Gittensory is reviewing…

AI analysis is in progress. This comment will update when the review is complete.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing

@loopover-orb loopover-orb Bot added gittensor gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jul 2, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui eba6b84 Commit Preview URL

Branch Preview URL
Jul 02 2026, 08:34 AM

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.04762% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.98%. Comparing base (357cf7a) to head (eba6b84).
⚠️ Report is 31 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/queue/processors.ts 97.82% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2530      +/-   ##
==========================================
+ Coverage   95.95%   95.98%   +0.03%     
==========================================
  Files         226      229       +3     
  Lines       25391    25807     +416     
  Branches     9234     9388     +154     
==========================================
+ Hits        24363    24770     +407     
- Misses        417      425       +8     
- Partials      611      612       +1     
Files with missing lines Coverage Δ
src/db/repositories.ts 96.54% <100.00%> (+0.03%) ⬆️
src/db/schema.ts 69.46% <ø> (ø)
src/openapi/schemas.ts 100.00% <ø> (ø)
src/settings/agent-actions.ts 94.11% <100.00%> (+1.32%) ⬆️
src/settings/auto-close-exempt.ts 100.00% <100.00%> (ø)
src/signals/focus-manifest.ts 99.26% <100.00%> (+0.02%) ⬆️
src/queue/processors.ts 92.09% <97.82%> (+0.33%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 1092bf3 into main Jul 2, 2026
15 checks passed
@JSONbored
JSONbored deleted the feat/review-nag-cooldown branch July 2, 2026 08:53
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 2, 2026
@github-actions github-actions Bot mentioned this pull request Jul 2, 2026
12 tasks
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 — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

feat(agent-actions): review-request nagging cooldown — throttle or close on repeated review pings

1 participant