Skip to content

A repository's requires apply to every one of its tasks - #322

Merged
dinoderek merged 5 commits into
mainfrom
feat/repo-requires
Nov 27, 2026
Merged

dinoderek merged 5 commits into
mainfrom
feat/repo-requires

Conversation

@dinoderek

Copy link
Copy Markdown
Owner

Objective

A repository now carries requires, which every one of its tasks adds to its card's for placement and for the heavy-session flag. engine repo add --requires sets it, and operator-only engine repo edit <id> --version <n> --requires <caps> replaces it without touching the repo's identity. This keeps BOGA3's tasks off devbox, which has no iOS simulator, whatever capabilities a planner puts on a card. Planners are excluded because they run no gates.

Gates

Lane Result Evidence
./dev test (every required lane) PASS format, vet, lint, unit, coverage, file-length, imports, versions, docs-check, harness-names: all PASS on 87fbde4
  • New or changed tests:
    • internal/control/repo_test.go: a repo edit replaces only requires. It needs the current version (409), refuses any other field (400) and is operator-only (403). The union lists the repo's caps, then the card's, each once.
    • internal/controlrun/placement_test.go: a repo requirement keeps a task off a host without that capability, then places it and makes it heavy once the host has it. A mutation check showed both halves fail without the change.
    • internal/controlrun/coordinator_test.go: a planner for a repo with a heavy requirement is not heavy. This also failed under a mutation check.
    • internal/controlcmd/command_test.go: the CLI runs repo add --requires and repo edit --requires.
  • Not run, with reason: none

Rulings

None

Review

  • Fresh reviewer: Claude Code, Claude Opus 5.5 subagents.
    • Round 1: CHANGES_REQUESTED. Planners were marked heavy (fixed, with a test). Optional findings, all fixed: the restored host-name rule, rejecting every non-requires field, a stale spawn.go comment, "replaces" in the usage line.
    • Round 2: APPROVED. Two stale "card requires" comments and a vague doc phrase were fixed.
    • Round 3: APPROVED. Only optional findings.
  • Declined findings:
    • The race where a placement was decided before a repo edit: the window is one pass, and engine task move recovers it. Bumping every task's version on a repo edit costs more than it saves.
    • Stating the repo edit in control-server.md too: hosts-and-sessions.md owns it (one place per fact), and control-server is at its budget.
    • Running operator(a) before the version check: workerItem already returns 403 first, so the order exposes nothing.
    • Reflowing the comments: they are gofmt-clean.
  • Review hard: internal/controlrun/dispatch.go (the heavy flag uses the union for tasks only) and internal/control/repo.go (what a repo edit accepts).

Deviations

None

🤖 Generated with Claude Code

@dinoderek
dinoderek merged commit 0ab1607 into main Nov 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant