Skip to content

fix(parallel-issues): enforce the cap for every agent role - #837

Merged
thewrz merged 4 commits into
mainfrom
feat/issue-832
Sep 19, 2026
Merged

thewrz merged 4 commits into
mainfrom
feat/issue-832

Conversation

@thewrz

@thewrz thewrz commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

This was written agentically; verify its assertions:

Why

The parallel workflow limited issue-lead waves but left assessor, waiter, and other fan-outs outside its stated cap.

What

Apply the limit to every agent role, require a prospective total before each fan-out, and reject counts above the lower of the runtime cap and ten. Bound thin-Ready vetting by the same available slots.

Decisions

Count root and all live roles together. Overflow diagnostics preserve the supplied count and role, including integers too large for shell arithmetic. Existing size limits remain unchanged. Structured verification remains unknown because repository configuration cannot produce the installed validator’s required cache; native full verification passed.

Reject empty assertion flags, stop when cap advertisement fails, and advertise the effective runtime/workflow minimum. The root recovered the final pushed result after the worker provider failed during handback.

Diff size facts:
base=origin/main
files=5
total.insertions=125
total.deletions=41
total.lines=166
operational.files=5
operational.insertions=125
operational.deletions=41
operational.lines=166
generated.files=0
generated.insertions=0
generated.deletions=0
generated.lines=0
lockfile.files=0
lockfile.insertions=0
lockfile.deletions=0
lockfile.lines=0
fixture.files=0
fixture.insertions=0
fixture.deletions=0
fixture.lines=0
non_operational.files=0
non_operational.insertions=0
non_operational.deletions=0
non_operational.lines=0

Testing

  • Issue and accepted-review regressions pass.
  • Fresh full declared test suite passed: 20260918T085808Z-test.log, rc=0.
  • Root cross-write collection and pushed-diff review pass.
  • Current-head CI passed all four observed checks.

🤖 Co-authored by Codex / gpt-5.6-sol.

Closes #832

Apply the concurrency gate to every fan-out and reject prospective totals above the effective runtime and skill cap.

Co-Authored-By: Codex gpt-5.6-sol <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 8a802182-c2c5-4b2f-a453-630ad3ec8099

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Reject incomplete assertion inputs, distinguish cap discovery failures, and advertise the safely clamped effective concurrency limit.

Co-Authored-By: Codex gpt-5.6-sol <noreply@openai.com>
@thewrz

thewrz commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator Author

This was written agentically; verify its assertions:

Adversarial review receipt

  • Reviewer: provider=anthropic; model=claude-opus-5; effort=xhigh; mode=cross-provider (reason: n/a)
  • Launcher: adversarial-run.sh sha256=4d1fc623db1b387d5d6dc0792b56ea5fcc25bf1297a77b9aca4dab243902bd50; attempt=e02517b6-ba48-41c0-8210-2e929ea6472d
  • Procedure: one-shot diff review; no contract-blind or two-pass attestation
  • Counts: P1=0; P2=3; total=3
  • Reviewed head: 06b72eb
  • Diff payload: wrzonance/agent-kit:837:164ff379a2aeed82079f7ea2505558ded9621fbe544bd5ac81dec10022c70d65
  • Confirmed finding: Reject explicitly empty assertion arguments — verdict=fixed; fix commit SHA(s)=f0632f52ea9b39abb177fca2aaf300512861c77e
  • Confirmed finding: Stop when runtime concurrency cannot be advertised — verdict=fixed; fix commit SHA(s)=f0632f52ea9b39abb177fca2aaf300512861c77e
  • Confirmed finding: Advertise the effective concurrency limit — verdict=fixed; fix commit SHA(s)=f0632f52ea9b39abb177fca2aaf300512861c77e
  • Execution: performed; adjudication=recorded
  • Remediation: complete

🤖 Co-authored by Codex / GPT-6.

@thewrz

thewrz commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator Author

This was written agentically; verify its assertions:

Review ledger

Machine-readable record of every review already performed on this PR.

{
  "version": 1,
  "pr": 837,
  "repo": "wrzonance/agent-kit",
  "reviews": [
    {
      "kind": "adversarial",
      "provider": "anthropic",
      "model": "claude-opus-5",
      "effort": "xhigh",
      "mode": "cross-provider",
      "attemptId": "e02517b6-ba48-41c0-8210-2e929ea6472d",
      "launcherSha256": "4d1fc623db1b387d5d6dc0792b56ea5fcc25bf1297a77b9aca4dab243902bd50",
      "procedure": "one-shot diff review; no contract-blind or two-pass attestation",
      "reviewerOverride": "",
      "harness": "codex",
      "head_sha": "06b72eb6eebf7eccdb0f1f7a21f913e03bcf7176",
      "covered_heads": [
        "06b72eb6eebf7eccdb0f1f7a21f913e03bcf7176",
        "1e5fca2939c8d16d602162f83879fb5a7b578e78",
        "220610ef762db84cdd98f2c882fb4e2db14a7b5c",
        "f0632f52ea9b39abb177fca2aaf300512861c77e"
      ],
      "diff_payload": "wrzonance/agent-kit:837:164ff379a2aeed82079f7ea2505558ded9621fbe544bd5ac81dec10022c70d65",
      "findings": [
        {
          "title": "Reject explicitly empty assertion arguments",
          "severity": "P2",
          "verdict": "fixed",
          "sha": "f0632f52ea9b39abb177fca2aaf300512861c77e",
          "schemaVersion": 2,
          "evidence": {
            "finding": "Reject explicitly empty assertion arguments",
            "repairSha": "f0632f52ea9b39abb177fca2aaf300512861c77e",
            "head": "1e5fca2939c8d16d602162f83879fb5a7b578e78",
            "path": "agentkit/skills/parallel-issues/scripts/concurrency-cap.sh",
            "command": "tests/run-tests.sh",
            "status": "passed",
            "log": "/home/adam/github/agent-kit/.worktrees/feat/issue-832/.agent/logs/20260919T014434Z-test.log",
            "logSha256": "b213c42464338667b875bcb814c69a41176f89d2a1568876fd89957838c2584d"
          },
          "history": [
            {
              "title": "Reject explicitly empty assertion arguments",
              "severity": "P2",
              "verdict": "open",
              "rationale": "Track whether assertion flags were supplied and reject empty values; test both empty and missing partner arguments.",
              "schemaVersion": 2
            }
          ]
        },
        {
          "title": "Stop when runtime concurrency cannot be advertised",
          "severity": "P2",
          "verdict": "fixed",
          "sha": "f0632f52ea9b39abb177fca2aaf300512861c77e",
          "schemaVersion": 2,
          "evidence": {
            "finding": "Stop when runtime concurrency cannot be advertised",
            "repairSha": "f0632f52ea9b39abb177fca2aaf300512861c77e",
            "head": "1e5fca2939c8d16d602162f83879fb5a7b578e78",
            "path": "agentkit/skills/parallel-issues/SKILL.md",
            "command": "tests/run-tests.sh",
            "status": "passed",
            "log": "/home/adam/github/agent-kit/.worktrees/feat/issue-832/.agent/logs/20260919T014434Z-test.log",
            "logSha256": "b213c42464338667b875bcb814c69a41176f89d2a1568876fd89957838c2584d"
          },
          "history": [
            {
              "title": "Stop when runtime concurrency cannot be advertised",
              "severity": "P2",
              "verdict": "open",
              "rationale": "Restore terminal stop/report behavior for config or capability errors; distinguish it from capacity refusal.",
              "schemaVersion": 2
            }
          ]
        },
        {
          "title": "Advertise the effective concurrency limit",
          "severity": "P2",
          "verdict": "fixed",
          "sha": "f0632f52ea9b39abb177fca2aaf300512861c77e",
          "schemaVersion": 2,
          "evidence": {
            "finding": "Advertise the effective concurrency limit",
            "repairSha": "f0632f52ea9b39abb177fca2aaf300512861c77e",
            "head": "1e5fca2939c8d16d602162f83879fb5a7b578e78",
            "path": "agentkit/skills/parallel-issues/scripts/concurrency-cap.sh",
            "command": "tests/run-tests.sh",
            "status": "passed",
            "log": "/home/adam/github/agent-kit/.worktrees/feat/issue-832/.agent/logs/20260919T014434Z-test.log",
            "logSha256": "b213c42464338667b875bcb814c69a41176f89d2a1568876fd89957838c2584d"
          },
          "history": [
            {
              "title": "Advertise the effective concurrency limit",
              "severity": "P2",
              "verdict": "open",
              "rationale": "Return the effective min(runtime,10) to callers so PR-loop formulas agree with enforcement; test a runtime above10.",
              "schemaVersion": 2
            }
          ]
        }
      ],
      "counts": {
        "p1": 0,
        "p2": 3
      },
      "reviewed_at": "2026-09-18T09:48:05Z",
      "coverage": [
        {
          "sha": "220610ef762db84cdd98f2c882fb4e2db14a7b5c",
          "reason": "merge-down:2a21b3f9eb77c2993201b6522fa3bdd18390e01d",
          "covered_at": "2026-09-19T01:37:08Z"
        },
        {
          "sha": "1e5fca2939c8d16d602162f83879fb5a7b578e78",
          "reason": "merge-down:09989b1738845d41d737cbb342d0b5bfaffd7498",
          "covered_at": "2026-09-19T01:49:35Z"
        }
      ]
    }
  ]
}

🤖 Co-authored by Codex.

mergetest and others added 2 commits September 18, 2026 18:32
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@thewrz
thewrz marked this pull request as ready for review September 19, 2026 01:49
@thewrz
thewrz merged commit e0c2a5b into main Sep 19, 2026
4 checks passed
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.

fix(parallel-issues): every spawn bound is scoped to the dispatch set, so an improvised grooming pass spawned 20 agents against a stated maximum of 10

1 participant