Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <n> --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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions changelog.d/1197-controller-schedule-docs.md
Original file line number Diff line number Diff line change
@@ -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).
10 changes: 6 additions & 4 deletions tests/test_process_controller.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading