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:
Current main already contains a substantially more mature Jules control plane than the original pilot:
agent:jules-eligible routing for trusted low-risk issues;agent-ready approval;AUTO_CREATE_PR;agent:jules-needs-attention fail-closed quarantine.Live queue inspection found six open Jules-eligible issues and four open
agent:jules-dispatched reservations.
The repository review cap was still tied to the lifetime of the parent GitHub issue.
Examples observed on 2026-09-24:
agent:jules-dispatched;agent:jules-dispatched;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.
The current official Jules REST API documents:
Session.outputs[];SessionOutput.pullRequest;PullRequest.url;References:
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.
Issue #813 records the defect and acceptance criteria.
Implementation branch:
fix/jules-review-lifecycle-20260924
Changed surfaces:
config/jules-dispatch.json;tools/jules_dispatcher.py;tests/test_jules_dispatcher.py;tools/check_jules_contract.py;docs/operations/JULES_AUTOMATION.md.The dispatcher now:
outputs[].pullRequest.url;agent:jules-completed once all output PRs are closed/merged;This change does not:
Normal IDKMesh CI and explicit review remain authoritative.
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.
Focused regression coverage was added for:
Repository-wide PR Gate remains the integration authority for the exact branch.
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.
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.