Repository navigation
Description
Overview
declared_repos() in agents/conductors/batch/_batch.py always unions a prompt's Target: into its repo set, even when the prompt declares an explicit Repos: header. Target: is often only an epic label, so the batch claim gate (_held_for) reports false "claimed" conflicts: on 2026-11-18 readiness ruling Q8 blocked results_library_p5c_dr1_census (Repos: PyAutoCortex, Target: autofit) on a PyAutoFit claim held by ep-projected-model-shared-prior. It was worked around with a coordination line; this fixes the cause.
Plan
- When a prompt's
Repos:names known repos,declared_repos()returns those alone. - When
Repos:is absent or names no known repo, keep the fallback:Target:, then the survey repos. - That fixes every claim-gate caller (readiness pass, origin check, named-task check), since they all read
declared_repos. - Leave
_premise.declared_reposas it is: it chooses where to look for premise evidence, where an extra repo is harmless. - Add regression tests; run the batch/readiness suites, then the full suite.
- Tier + merge mode:
effective level: supervised; merge mode: auto-merge on green(declaredConsequence: notify).
Detailed implementation plan
Affected Repositories
- PyAutoBrain (primary)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoBrain | main | clean |
Suggested branch: feature/batch-claim-gate-declared-repos
Implementation Steps
agents/conductors/batch/_batch.py:119declared_repos(p): collect known repos from theRepos:block; return them sorted if any; otherwise addTarget:if it is a known repo and return that, elsep["repos"]. Update the docstring (Target is often an epic label).- Regression tests (
tests/test_batch_ready.pyor newtests/test_batch_declared_repos.py): (a)Target: autofit+Repos:PyAutoCortex only → PyAutoCortex alone; (b)orch._held_foragainst an active.md claiming PyAutoFit →Nonefor that prompt; (c) noRepos:→ still its Target; (d)Repos:naming only unknown names → falls back to Target. pytest tests/test_batch_*.py tests/test_questions_inbox.py tests/test_m31_live_shift_findings.py tests/test_premise_check.py, then the full suite. An existing test that relied on the union is changed only if its premise was wrong; otherwise stop and report.- Ship via
/ship_library, auto-merge on green.
Key Files
agents/conductors/batch/_batch.py—declared_reposagents/conductors/batch/_ready.py:340,agents/conductors/batch/_orchestrator.py:1604,1628— callers (unchanged)agents/conductors/batch/_premise.py:98— separate helper, left unchanged
Original Prompt
Click to expand starting prompt
Batch claim gate counts a prompt's Target: as a repo even when Repos: is declared
Type: bug
Target: PyAutoBrain
Repos:
- PyAutoBrain
Difficulty: medium
Autonomy: safe
Priority: high
Status: formalised
Consequence: notify
Witness: a new test in PyAutoBrain tests/ passes wheredeclared_reposon a prompt withTarget: autofitand aRepos:block naming only PyAutoCortex returns["PyAutoCortex"]and_held_foragainst an active.md claiming PyAutoFit returns None; a prompt with noRepos:still returns its Target; the full batch test suite passes
Review-minutes: 0
Unattended: ready
Lane: any
Bug
declared_repos() (agents/conductors/batch/_batch.py:119) builds a prompt's repo
set from its Repos: header and its Target:, always unioned. Target: is
often only an epic grouping, not a repo the task edits. Example:
draft/feature/autofit/results_library_p5c_dr1_census.md has Target: autofit
but Repos: lists only PyAutoCortex (the census is read-only on RAL against the
released stack and writes one Cortex ledger line).
The claim gate (_held_for, called from _ready.py:340 and
_orchestrator.py:1604 / :1628) therefore treated the census as a PyAutoFit
task. The readiness pass ready-2026-11-18 filed ruling Q8: "results_library_p5c_dr1_census
cannot start: repo PyAutoFit is claimed by ep-projected-model-shared-prior".
The human resolved it on 2026-11-18 by adding a coordination line to that claim
in active.md. That is a workaround; the false conflict recurs for any task
whose Target is an epic label.
Fix
- When a prompt declares a
Repos:header with at least one known repo, use it
alone. Fall back toTarget:, then the surveyrepos, only whenRepos:is
absent (or names no known repo). - Check the other callers of
declared_repos(batch grading, lanes, premise,
_orchestrator.py:1604) still behave;_premise.declared_reposis a separate
helper, confirm whether it has the same union. - Regression test: a prompt with
Target: autofitandRepos: PyAutoCortex
is not held by a PyAutoFit claim; a prompt with noRepos:still falls back to
its Target. - Optional, once fixed: the Q8 coordination line on
ep-projected-model-shared-priorinactive.mdbecomes redundant; leave it
(it is harmless and the claim clears when that task ships).
Activity
Jammy2211 commentedon Nov 18, 2026
Shipped in #676 (merged).
declared_repos()now uses a declaredRepos:block alone;Target:, then survey repos, are fallbacks only. Regression tests intests/test_batch_declared_repos.py(5 passing, full suite 2370 passed). CI's tenant-firewall lint flagged an instance repo name in the first test draft; tests now use organ names.