diff --git a/AGENTS.md b/AGENTS.md index 88d2fbc3..a4dbadda 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,7 +43,9 @@ When a class of mistake repeats, date a lesson in LESSONS.md (`Seen N×`); after The tier comes from the diff, never from the PR text: `python3 .github/scripts/risk_gate.py --pr --repo ThinkFlowLab/agentdescent`, and the -controller sets the `risk:T*` label within ~30 minutes. Rules: +controller sets the `risk:T*` label on `opened` / `ready_for_review` / +`reopened` for a same-repo PR, or on the next four-a-day cron tick for a +fork PR. Rules: [`.github/agent/risk-rules.json`](.github/agent/risk-rules.json) (docs T0; tests, examples and `changelog.d/` T1; other package code and unknown paths T2; the core loop, model adapters, installers, release files, `.github/**` and these @@ -103,8 +105,10 @@ question in a comment. Agents develop **only** `agent-ready` issues. ## Controller -[`.github/workflows/controller.yml`](.github/workflows/controller.yml) runs every -30 minutes with the built-in `GITHUB_TOKEN` only (no GitHub App, no secrets) and +[`.github/workflows/controller.yml`](.github/workflows/controller.yml) runs on +the `pull_request` events `opened`, `ready_for_review` and `reopened` (a +fork-head run is skipped: that token cannot write) and on a four-a-day cron +backstop, with the built-in `GITHUB_TOKEN` only (no GitHub App, no secrets) and changes labels and nothing else: it sets `risk:T*` and `agent-pr` on open non-draft PRs, removes `agent-ready`/`agent-working` when a non-maintainer set or edited an issue after it was approved, and expires a claim after 6 h with no diff --git a/changelog.d/1197-controller-schedule-docs.md b/changelog.d/1197-controller-schedule-docs.md new file mode 100644 index 00000000..2772f9b7 --- /dev/null +++ b/changelog.d/1197-controller-schedule-docs.md @@ -0,0 +1,4 @@ +Changed +`AGENTS.md` now describes the label controller as event-driven (`opened` / +`ready_for_review` / `reopened`, with a four-a-day cron backstop) instead of +"every 30 minutes" (#1197). diff --git a/tests/test_process_controller.py b/tests/test_process_controller.py index 1fa80312..0caa798d 100644 --- a/tests/test_process_controller.py +++ b/tests/test_process_controller.py @@ -1,9 +1,11 @@ """The label-only controller (AGENTS.md › Controller). -It runs every 30 minutes with a write token, so its contract is tested -offline: it touches only the labels it manages, only in the allowed direction, -never adds ``agent-ready``, stops entirely on ``AGENT_PAUSE`` and is a dry run -unless ``CONTROLLER_LIVE`` is exactly ``true``. +It runs on ``pull_request`` ``opened`` / ``ready_for_review`` / +``reopened`` (same-repo) and on a four-a-day cron backstop, with a write +token, so its contract is tested offline: it touches only the labels it +manages, only in the allowed direction, never adds ``agent-ready``, stops +entirely on ``AGENT_PAUSE`` and is a dry run unless ``CONTROLLER_LIVE`` is +exactly ``true``. """ import importlib.util