Skip to content

ci(controller): stop adding the retired agent-pr label (#1161) - #1163

Draft
HugoXK wants to merge 3 commits into
mainfrom
agent/1161-controller-drop-agent-pr
Draft

HugoXK wants to merge 3 commits into
mainfrom
agent/1161-controller-drop-agent-pr

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Canonical candidate for the agent-pr retirement change, with main merged in at 8aea052 (merge commit, no rebase). No further commits while it is under review.

Nothing here closes an issue: #1161 was closed as completed by #1162 (76223fda), which is a different fix, and this body carries no closing keyword, so a merge here neither re-closes nor re-opens it.

The owner banned agent-pr repo-wide and the sweep stripped it from every
object, but the controller still added it back on each run, so the two kept
undoing each other. This removes the add and the code that existed only to
decide it.

  • .github/scripts/controller.py: MANAGED["add"] is RISK only, the
    agent-pr reason is gone, and the is_agent_pr rule (author allowlist,
    agent/ branch prefix, "closes an agent issue") is deleted with the
    agent_issues plumbing it was the only reader of. The docstring no longer
    advertises the label.
  • .github/agent/controller.json: drops agentAuthors and
    agentBranchPrefixes, which nothing reads any more.
  • AGENTS.md, .claude/skills/fix-issue/SKILL.md: the state-label list, the
    PR checklist and the controller description now say the label is retired
    instead of telling agents to add it.
  • tests/test_process_controller.py: new row
    test_a_plan_never_adds_agent_pr_not_even_on_an_agent_branch (red on main),
    the ops assertion expects the risk label only, and one extra "bad plan" row
    pins that apply refuses a hand-written agent-pr add.
  • changelog.d/1161-controller-drop-agent-pr.md.

labels.json still defines the label and is untouched: the sync is
create/update-only, so the definition is inert once nothing adds it.

Not a gate change: review-gate.yml triggers on pull-request events, not on
labels, so no check stops judging a PR either way.

Merge of main after #1162

#1162 landed ttl_refs() in the same part of controller.py one commit before this branch was reviewed, so main (76223fda) is merged in. One textual conflict, in controller.py, resolved like this:

  • kept from main, unchanged: _LINKING, _REF, ttl_refs(), so the Refs #N claim-TTL fix stays exactly as merged and linked_prs() still reads it.
  • dropped with the rest of the retirement: is_agent_pr(). Its test, test_a_refs_pull_request_is_still_not_an_agent_pr (added by #1162, it called that function), is rewritten rather than deleted: test_a_refs_pull_request_never_gets_the_agent_pr_label now asserts the same safety property on the surviving path — a PR whose body only references the issue, a Part of body and a closing body alike produce no agent-pr operation, and is_agent_pr is gone rather than merely unused.
  • #1162's other two claim-TTL rows are untouched.

Scope: no change outside that conflict and that one test — historically named #1161, which now belongs to the claim-TTL fix, so the references and the fragment filename are left as they were and the record question is tracked separately.

Tip SHA: 8aea052

Ran:

  • red at live main f2eda2e7 with only the new row applied: 1 failed, 28 passed
  • pytest tests/test_process_controller.py tests/test_process_labels.py at this tip: 38 passed
  • pytest tests/test_controller.py at this tip: 11 passed
  • python3 -m tools.changelog_fragments check: 80 changelog fragment(s) OK
  • pytest tests/test_site_navigation.py tests/test_repo_hygiene.py: 4 passed
  • grep -n "agent-pr" .github/scripts/controller.py .github/agent/controller.json returns nothing
  • git diff --stat origin/main: 6 files, +58/-56; git diff --stat c0bcb116..HEAD: 6 files, +80/-18
  • parents of the merge commit: c0bcb116 + 76223fda

Not run:

  • mkdocs build --strict — no docs page or nav changed; AGENTS.md and the skill file are not part of the site
  • the full offline suite — main at 76223fda carries the known 31 red node ids, and this diff touches only the controller and its test file

Review path

  • Tip 8aea052, one review request to Birfy, asked once and not repeated.
  • .github/agent/review-policy.json is reviewers: ["Birfy"], selfReview: ["Birfy"]. A report from this seat is dropped as self-review because the pull request's author login is the same one: measured with the repo's own review_gate.decide(), a seat PASS reads counts False while a Birfy PASS at the same tip reads counts True. A Birfy report at this tip is the countable path.
  • .github/** is T3, so the merge needs an explicit owner click; the review-gate step is report-only and does not block it.
  • Open point from the review, for the owner rather than for this pull request: the repo has no written record of the label ban that Birfy could find. The code and the docs already follow it and no check depends on it, so a line from the owner settles it without another commit here.

No UI surface: CI controller script, its config, tests and markdown files.

The owner banned `agent-pr` repo-wide and the sweep stripped it from every
object, but the controller still added it back on each run, so the two kept
undoing each other. Drop the add from MANAGED, its reason, the docstring line,
and the `is_agent_pr` rule with the agent-author/branch-prefix heuristics that
only it read. The two `controller.json` keys that fed those heuristics go with
it; `labels.json` still defines the label (create-only sync, inert) and is left
alone.

Not a gate change: `review-gate.yml` has no label filter, so no check stops
judging PRs either way.
@HugoXK
HugoXK requested a review from Birfy November 19, 2026 02:47
@HugoXK
HugoXK marked this pull request as ready for review November 19, 2026 02:47
@HugoXK HugoXK added the awaiting-approval Green T2/T3 PR: waits for a PASS at its tip and Danyang's merge click label Nov 19, 2026
@Birfy

Birfy commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Not reviewed at c0bcb11 yet, two things first:

  1. This now conflicts with main: ci(controller): keep a claim alive while a "Refs #N" pull request is still pushing #1162 merged as 76223fd and touches the same part of .github/scripts/controller.py, and it adds test_a_refs_pull_request_is_still_not_an_agent_pr, which calls the is_agent_pr() this PR deletes. Please merge origin/main into the branch (no rebase) and drop or rewrite that test.
  2. The body says the owner banned agent-pr repo-wide. I can't find that decision on record in this repo (no issue or comment from the owner), and removing it changes the AGENTS.md process, so I'm leaving this one for Danyang to confirm rather than auto-merging. A link to the decision would settle it. Also, ci(controller): a "Refs #N" pull request does not keep its issue claim alive #1161 is now closed by ci(controller): keep a claim alive while a "Refs #N" pull request is still pushing #1162, so the changelog fragment and the "(ci(controller): a "Refs #N" pull request does not keep its issue claim alive #1161)" refs may want their own issue.

Conflict: #1162 added _LINKING/_REF/ttl_refs() next to the is_agent_pr() this
branch deletes. Kept _LINKING/_REF/ttl_refs() as merged; dropped is_agent_pr()
with the rest of the retirement. Its test is rewritten on the new path: a
reference-only PR and one that closes the issue alike get no agent-pr op.
No rebase; no other change.
@HugoXK

HugoXK commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

Merge resolution: main (76223fda, i.e. after #1162) is merged in with one merge commit 8aea052bed5b0ed75711a329bc8442f051617367, no rebase.

Why: #1162 added _LINKING, _REF and ttl_refs() in the same part of controller.py that this pull request removes is_agent_pr() from, so the branch conflicted. Resolved by keeping ttl_refs() exactly as merged, dropping is_agent_pr(), and rewriting its test on the surviving path (test_a_refs_pull_request_never_gets_the_agent_pr_label: a reference-only body, a Part of body and a closing body alike produce no agent-pr operation, and is_agent_pr is gone rather than unused).

Semantics are otherwise identical to the original pull request: MANAGED["add"] is RISK only, the label reason is gone, the agent-author/branch heuristics are gone from controller.json, and no file outside that conflict and that one test changed.

@Birfy

Birfy commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Owner decision: the agent-pr label is not being deprecated. Keeping the label and current controller behaviour, so this PR won't be merged as-is.

@github-actions github-actions Bot added risk:T3 Risk tier T3 (core loop, release, process; needs Danyang's click), set by the controller agent-pr Pull request opened by an agent labels Nov 19, 2026
@HugoXK

HugoXK commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

Not mergeable on the current premise: at head 8aea052bed5b0ed75711a329bc8442f051617367 this removes agent-pr and calls it retired, while the owner decision in this thread (comment 7002716826) keeps the label and says this will not be merged as-is. Back to draft so the ready bit does not carry it into the click queue; rework to the owner's decision or the owner closes it.

@HugoXK
HugoXK marked this pull request as draft November 19, 2026 14:06

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-pr Pull request opened by an agent awaiting-approval Green T2/T3 PR: waits for a PASS at its tip and Danyang's merge click risk:T3 Risk tier T3 (core loop, release, process; needs Danyang's click), set by the controller

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants