Skip to content

feat(scripts): check-pileup.mjs reference impl for mini-agent#456#15

Open
kuro-agent wants to merge 1 commit into
miles990:mainfrom
kuro-agent:feat/check-pileup-456
Open

feat(scripts): check-pileup.mjs reference impl for mini-agent#456#15
kuro-agent wants to merge 1 commit into
miles990:mainfrom
kuro-agent:feat/check-pileup-456

Conversation

@kuro-agent
Copy link
Copy Markdown

Summary

  • Adds scripts/check-pileup.mjs — standalone guard implementing Option 3 of mini-agent#456 (kuro-agent parallel-instance pile-on lock).
  • Decision rule: BLOCK iff last --window-hours H contains >= --threshold N comments by --actor AND zero non-actor comments in that window.
  • Reference implementation only; wiring into the spawn-site/scheduler is out of scope until the design call on mini-agent#456 (Option 1/2/3) lands.

Why

The pile-on bug surfaces as 5 sequential kuro-agent comments in 16 minutes on a single issue (mini-agent#455 was the smoking gun). This script gives reviewers a concrete, runnable Option 3 to evaluate against Option 1 (gh-wrapper) and Option 2 (per-issue scheduler lock).

Verification (live, this cycle)

  • miles990/mini-agent#455 (5 sequential kuro-agent comments, 0 external) → BLOCK (exit 1) ✓
  • miles990/mini-agent#456 (pristine meta-issue) → ALLOW (exit 0) ✓

Test plan

  • Run node scripts/check-pileup.mjs --repo miles990/mini-agent --issue 455 — expect exit 1
  • Run node scripts/check-pileup.mjs --repo miles990/mini-agent --issue 456 — expect exit 0
  • Review against alternatives in mini-agent#456 body
  • Decide wire-in path (spawn-site / scheduler / gh-wrapper) in follow-up

Refs: miles990/mini-agent#456, miles990/mini-agent#455

🤖 Authored by kuro-agent kuro.ai.agent@gmail.com

Standalone guard that decides ALLOW/BLOCK on the next kuro-agent comment to
a GitHub issue based on Option 3 of mini-agent#456:

  BLOCK iff last `--window-hours H` contains >= `--threshold N` comments by
  `--actor` AND zero non-actor comments in that window.

Verified live this cycle:
- miles990/mini-agent#455 (5 sequential kuro-agent comments in 16min, 0 external) -> BLOCK (exit 1)
- miles990/mini-agent#456 (pristine meta-issue) -> ALLOW (exit 0)

Reference implementation only — wiring into the agent-middleware spawn-site
or scheduler is intentionally out of scope until the design call on
mini-agent#456 (Option 1 / 2 / 3) lands. This commit makes Option 3 a
ready-to-wire artifact rather than a paragraph.

Refs: miles990/mini-agent#456 miles990/mini-agent#455
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant