Repository navigation
Conversation
Additive: the key is written only when a run-level cap tripped, so an uncapped payload keeps yesterday's shape. `stop_reason`, the human status line and `status.json` are unchanged.
|
Full suite at The 19 red ids are all host-environment, none of them touches this diff:
Clean main at the PR's parent |
|
Full suite at the tip, as Tip SHA: 72a1d74 Command: The 19, by file:
None of them is in No other write on this PR. |
|
Parity, measured now — the baseline finished after the comment above.
So no new red, and the body's |
|
Review (Birfy) Tip SHA: 72a1d74
|
Fixes #1192. ## What changed `.github/scripts/controller.py`: - `read_prs` records `draft` from the pull list it already fetches — no extra API request. - `plan` skips a draft PR right after `hold`, with reason `draft` in the existing `skipped` shape: `{"number": n, "label": "*", "reason": "draft"}`. A skip is no add and no remove, so a draft keeps the labels it already has; `hold` is still checked first, so an operator-held draft reports `hold`. - no new plan key: `plan()` still returns `{"ops", "skipped", "notes"}`, `render` prints the entry as `- #20 `?`: draft`, `validate_plan` and `apply` see exactly today's plan. `apply` is unchanged, so a PR converted to draft between plan and apply can still take one round of labels; that window is a recorded known gap, not fixed here. `AGENTS.md`: the controller paragraph now says "open non-draft PRs" instead of "open PRs" — the one clause this change makes stale. `changelog.d/1192-draft-skip.md`: `Fixed`. ## Why this is live, not hypothetical Run `44773778580` (`event: pull_request`, `created_at 2026-11-20T16:28:42Z`, `head_sha cd5a608…`) was `#1194`'s own `opened` event executing that branch's new trigger with main's script. Its `plan` job reported "4 operation(s), 0 skipped" (`16:28:54Z`) and `apply` succeeded; the labels landed as `#1194` `agent-pr` + `risk:T3` from `16:29:04Z` and the parked draft `#1191` `risk:T2` at `16:29:05Z`, `agent-pr` at `16:29:06Z` — no cron, no dispatch. Once `#1187` merges, every `opened`/`ready_for_review`/`reopened` fires that full pass, so skipping drafts in `plan` is what keeps a parked draft out of the queue. ## Red first at `050235a4` Clean worktree at `050235a4` with only the new test file copied in (`git status --short` → `?? tests/test_process_controller_draft.py`): ``` pytest tests/test_process_controller_draft.py -o addopts="" -q → 4 failed, 1 passed ``` - `test_read_prs_records_the_draft_flag_it_already_fetches` — `KeyError: 'draft'`: the base record has no such field. - `test_a_draft_pr_is_skipped_and_keeps_the_labels_it_has` — base `plan()` for a `draft: true` PR returns `add risk:T2` + `add agent-pr` with `skipped: []`. - `test_a_ready_pr_next_to_it_is_labelled_normally` — the same ops appear beside the `draft: false` control row, which must stay untouched. - `test_the_draft_reason_needs_no_new_plan_key_and_renders` — the base renders `| PR #30 | add | risk:T2 | risk-tier |` where the skip belongs. The one pass is the `hold` control, which must hold before and after. At this tip: 144 passed in the ten-file focused set; `python -m tools.changelog_fragments check` → 7 fragments OK. Full offline suite on the pre-rebase tree (`b64388b0`, identical diff): 7940 passed, 32 failed, 29 skipped — the same 32 environment rows red at the base (15 `test_era_*` without numpy in the sandbox runner, 12 `test_sandbox_container` without a Docker daemon, 2 `test_integrations`, `test_genesis_example::test_a_shared_toolchain_directory_is_not_mounted`, `test_merge_golden`, `test_test_package_resolution`). Tip SHA: 83bae39 Ran: - the ten-file focused set (`test_process_controller`, `test_process_controller_draft`, `test_controller`, `test_workflow_actions_pinned`, `test_process_labels`, `test_process_risk_gate`, `test_process_review_gate`, `test_process_merge_lane_base`, `test_changelog_fragments`, `test_safety_controller`) at this tip → 144 passed - `python -m tools.changelog_fragments check` → 7 changelog fragment(s) OK - full offline suite at `b64388b0`, the same diff before the rebase onto `050235a4` → 7940 passed, 32 failed, 29 skipped, the same 32 ids red at the base Not run: - full offline suite at this exact tip — the rebase replayed `b64388b0` onto `050235a4`; the focused set was re-run at the tip - Docker sandbox rows and the wheel smoke — host environment, unrelated to a label filter - `mkdocs build --strict` — no `docs/` or `mkdocs.yml` change No UI surface: the controller script, its tests, and one clause in AGENTS.md.
|
State field change, announced before the flip: this PR goes draft → ready, and gains the label Reason: the head
The merge stays the owner's click. |
Fixes #1190.
What changed
--json evolveand--json showprinted"stop_reason": "budget"and nothing that named the limit, so a caller could not tell the operator ceiling (AGENTDESCENT_MAX_CALLS) from its own--max-callswithout openingstatus.json; the human status line already said it (#1166). Both payload builders now copystop_detailfrom the run status when it is set, and omit the key when no cap tripped, so an uncapped payload keeps its previous shape.stop_reason,_status_lineandstatus.jsonare unchanged.show_payloadis also the MCPshowpath, so that surface gains the same additive key (Partial: #1166— the gap its acceptance left, not drift). No model or network call.Verification at the tip
Tip SHA: 72a1d74
Ran:
88a0a92e(basef5017f93plus the new test):pytest -o addopts='' tests/test_cli_json_stop_detail.py -q-> 2 failed, 2 passed;
test_evolve_json_names_the_limit_that_firedandtest_show_json_names_the_limit_that_firedbothKeyError: 'stop_detail'Noneinstead of the guarded write)-> 2 failed, 2 passed (
..._omits_stop_detail_without_a_capx2); probe reverted, tree greps cleanshow_samples, show_fusion_stats, latest_run_alias, evolve_provider_error,
runstore_cli -> 113 passed
python -m tools.gen_api_docs --check-> up to date (re-read at the tip)python -m tools.changelog_fragments check-> 5 fragments OK (re-read at the tip)pytest -qat this tip ->19 failed, 7930 passed, 51 skipped, 0 errors(junit tests=8000); clean main
f5017f93under the same interpreter ->19 failed, 7926 passed, 51 skipped; the 19 red ids are set-identical,0 tip-only and 0 main-only, and the +4 passed are this PR's four new rows;
all 19 are docker/
era_srbench/toolchain host rowsNot run:
mkdocs build --strict— no docs change