IDKMesh

Jules review-reservation lifecycle and development-speed hardening — 2026-09-24

Owner request

Continue hardening the Google Jules + GitHub automation so IDKMesh can develop quickly while keeping the dispatch process solid, documented, and safe.

The owner previously asked for:

Repository state inspected

Current main already contains a substantially more mature Jules control plane than the original pilot:

Live queue inspection found six open Jules-eligible issues and four open agent:jules-dispatched reservations.

Throughput defect found

The repository review cap was still tied to the lifetime of the parent GitHub issue.

Examples observed on 2026-09-24:

Because max_in_flight=4 counts open dispatch reservations, long-running umbrella issues can pin review slots after the actual Jules candidate review has ended.

Provider contract checked

The current official Jules REST API documents:

References:

Durable decision

Repository review capacity should follow the actual Jules candidate review lifecycle, not the lifetime of an umbrella issue.

The lifecycle becomes:

agent:jules-eligible / agent-ready
 -> agent:jules-dispatched
 -> provider work
 -> open Jules PR keeps repository review reservation
 -> PR closed/merged
 -> agent:jules-completed

agent:jules-completed is terminal for that bounded attempt and is a hard automatic-redispatch veto. A maintainer must explicitly re-triage the broader issue before another agent attempt.

A completed Jules Session with no usable PR output fails closed to agent:jules-needs-attention.

Implementation

Issue #813 records the defect and acceptance criteria.

Implementation branch:

fix/jules-review-lifecycle-20260924

Changed surfaces:

The dispatcher now:

  1. fetches the full completed Jules Session;
  2. extracts outputs[].pullRequest.url;
  3. requires each PR URL to belong to the same GitHub repository;
  4. checks current GitHub PR state;
  5. keeps the reservation while any output PR is open;
  6. releases it to agent:jules-completed once all output PRs are closed/merged;
  7. moves completed sessions with no usable PR output to attention.

Safety / authority

This change does not:

Normal IDKMesh CI and explicit review remain authoritative.

Expected development-speed effect

The change removes false review occupancy from long-lived parent issues while keeping the actual number of active/open Jules candidates bounded.

That means waiting small tasks can start when prior Jules PR review is actually finished instead of waiting for an unrelated umbrella issue to close.

Verification

Focused regression coverage was added for:

Repository-wide PR Gate remains the integration authority for the exact branch.

CI metadata correction

The first PR Gate run correctly rejected a free-form Fixes #813 phrase in the pull-request body. IDKMesh’s closing-keyword guard requires intentional issue closure to use the PR template’s dedicated Closes on merge line. The PR metadata was corrected accordingly; this is a repository process guard, not an implementation failure.

Post-merge label-bootstrap correction

After PR #814 merged as cf6241d6, the trusted Issue Model Router push run reached the Jules reusable workflow but failed during managed-label bootstrap. GitHub returned HTTP 422 because the first agent:jules-completed description exceeded the platform’s 100-character label-description limit. Reconciliation therefore did not run on that first post-merge attempt.

The follow-up hardening shortens the description and makes the limit part of both load_policy() and the machine-checkable Jules control-plane contract. Managed-label metadata must now be valid before any GitHub label write is attempted. This converts an observed platform constraint into a repository invariant rather than relying on operator memory.