Skip to content

ci: add a PR test workflow (and the sizing skill wrapper that blocks it) #194

Description

@Jammy2211

Overview

PyAutoBrain has no PR test workflow. .github/workflows/ holds only
docs.yml (path-filtered to docs/** + .readthedocs.yaml, so it never fires
for agents/, bin/ or tests/) and nightly-release.yml (a cron release
scheduler). A Brain PR's head sha returns total_count: 0 check runs — #193
merged that way earlier today. So the ~193 tests in tests/ execute in no CI
anywhere
, and a Brain PR's only gate is whatever the authoring session
happens to run locally.

Turning CI on requires fixing the suite first: test_skill_install.py:: test_every_public_agent_has_a_skill_wrapper is already red on main (the
sizing faculty has no skills/sizing/SKILL.md) — which is exactly what no CI
looks like. Both parts land in one PR, because merging a workflow that is known
to fail would be shipping a red gate.

Plan

  • Add the missing sizing skill wrapper, mirroring the sibling faculty
    wrappers — sizing is listed under "Faculties (read-only … also runnable
    directly)" in pyauto-brain help and ships its own sizing.sh, so the
    wrapper is the missing piece; delisting it from help would be the wrong fix.
  • Add a tests.yml modelled on PyAutoHeart/.github/workflows/heart-tests.yml,
    which is the house pattern for an organ's own unit suite.
  • Check out PyAutoBrain and PyAutoMind side by side — measured, not assumed:
    a lone-repo checkout cannot even collect the suite.
  • Keep the workflow to pytest only (no pyauto-brain agent runs, no network),
    the same discipline heart-tests.yml states for itself.
Detailed implementation plan

Affected Repositories

  • PyAutoBrain (primary, only)

Branch Survey

Repository Current Branch Dirty?
./PyAutoBrain main clean

No worktree claim on PyAutoBrain.

Suggested branch: feature/pyautobrain-pr-test-ci
Worktree root: ~/Code/PyAutoLabs-wt/pyautobrain-pr-test-ci/

Measured findings (2026-08-04, before writing anything)

Cloned PyAutoBrain alone into a scratch dir and ran the suite with a clean
env — it does not fail, it does not even collect:

ERROR collecting tests/test_policy_seams.py
ERROR collecting tests/test_sizing_paths.py
E   FileNotFoundError: .../ci-probe/PyAutoMind/repos.yaml
agents/faculties/sizing/_sizing.py:105: LIBRARY_REPOS, WORKSPACE_REPOS, ORGANISM_REPOS = _target_sets()

_sizing.py reads the body map at import time and is deliberately strict
(BODY_MAP_PATH = BRAIN_HOME.parent / "PyAutoMind" / "repos.yaml"). Adding
PyAutoMind alongside:

192 passed, 1 failed in 29.02s
FAILED tests/test_skill_install.py::test_every_public_agent_has_a_skill_wrapper — assert ['sizing'] == []

So: two repos are required, no others; the suite needs only pytest + PyYAML;
it takes ~30s; and the single failure is the sizing wrapper. Both repos are
public, so the default GITHUB_TOKEN can check out the sibling.

Implementation Steps

  1. skills/sizing/SKILL.md — frontmatter (name, description) plus the
    3-line body the other faculty wrappers use: read
    ../../agents/faculties/sizing/AGENTS.md, then run
    bin/pyauto-brain sizing. Must stay under the 200-line primary-file budget
    (bin/check_skill_line_counts.sh) and its markdown links must resolve
    (test_local_skill_links_resolve).
  2. skills/sizing/agents/openai.yaml — the Codex descriptor every sibling
    faculty carries (display_name / short_description / default_prompt).
  3. .github/workflows/tests.yml:
    • on: push to main + pull_request; concurrency group keyed on the ref
      with cancel-in-progress only off main (a cancelled main run reads as
      red CI in Heart's FAILURE_CONCLUSIONS).
    • matrix python 3.12, 3.13 (matches heart-tests.yml).
    • actions/checkout@v4 twice, with path: PyAutoBrain and
      repository: PyAutoLabs/PyAutoMind + path: PyAutoMind, so
      BRAIN_HOME.parent/PyAutoMind resolves.
    • pip install pytest PyYAML; run pytest tests/ -q with
      working-directory: PyAutoBrain.

Verification

  • Re-run the isolated two-repo probe after the wrapper lands: expect
    193 passed, 0 failed.
  • bash bin/check_skill_line_counts.sh — the new SKILL.md within budget.
  • bash bin/install.sh into a tmp HOME still passes
    test_installer_keeps_commands_and_installs_both_skill_homes.
  • The PR itself is the real proof: it must show a non-zero, green check
    count — the first Brain PR ever to have one.

Key Files

  • PyAutoBrain/.github/workflows/tests.yml — new.
  • PyAutoBrain/skills/sizing/SKILL.md, skills/sizing/agents/openai.yaml — new.
  • PyAutoHeart/.github/workflows/heart-tests.yml — read-only, the model.
  • PyAutoBrain/tests/test_skill_install.py — the test this makes green
    (unchanged).

Sizing note

Brain scored this large (9) / split-into-phases. Not taken, same as #192: the
score is prose-driven, repos_affected is one repo, and the change is a
workflow file plus a 3-line skill wrapper.

Original Prompt

Click to expand starting prompt

Filed from the #193 ship (PyAutoMind/draft/maintenance/pyautobrain/no_pr_test_ci.md).
Follow-up items 1 and 2 surfaced there: PyAutoBrain has no PR test CI, and the
sizing SKILL.md failure blocks it from ever being green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions