Expand the agent task queue to cpu/gpu/runtime/shared/qa with deterministic checks

The queue now has three engineering tracks plus shared and qa work. Queue
rules move from shell/awk in workflows into a standard-library Python package
so they are testable offline: claim decisions (dependencies, cycles, file
overlap, area permission), leases renewed only by the holder, reassign and
release, acceptance-command approval by hash, pull request ownership/overlap/
stale/verification checks and a machine-readable summary. Workflows apply the
decisions with minimal permissions, never put user text in run blocks and
never check out pull request code. The sync script fetches the real upstream
so interface changes during work are reported.

Not yet run on GitHub.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
This commit is contained in:
elforeign committed 2026-11-24 00:09:38 -06:00
1 parent a89f9d8d06
commit e35df04069
28 files changed
+1822 -164

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: GPL-3.0-or-later
import json
AREAS = ("cpu", "gpu", "runtime", "shared", "qa")
PRIORITIES = ("critical", "high", "medium", "low")
DEFAULT = {"lease_hours": 24, "maintainers": [], "contributors": {}, "upstream": ""}
def parse(text):
data = json.loads(text)
cfg = dict(DEFAULT)
cfg.update({k: data[k] for k in DEFAULT if k in data})
if not isinstance(cfg["lease_hours"], (int, float)) or cfg["lease_hours"] <= 0:
raise ValueError("lease_hours must be a positive number")
return cfg
def load(path):
with open(path, encoding="utf-8") as fh:
return parse(fh.read())
def is_maintainer(cfg, login):
return login in cfg["maintainers"]
def may_work_on(cfg, login, area):
if is_maintainer(cfg, login):
return True
return area in cfg["contributors"].get(login, [])
def is_verifier(cfg, login):
return is_maintainer(cfg, login) or "qa" in cfg["contributors"].get(login, [])