Skip to content

hygiene ci + /ci_speedup: rank the slowest parts of CI off the Heart board - #369

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/smoke-test-perf-g8i2uq
Sep 8, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
claude/smoke-test-perf-g8i2uq

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

The Heart publishes per-script smoke timings, the slowest unit tests and every gate's wall-clock as the performance block of its board, but nothing read it: the only consumer was a human on the ⏱ section. This adds the conductor's read of that surface and a maintenance door that acts on it.

  • agents/conductors/hygiene/_hygiene_ci.py (stdlib): fetch the board (Pages / HYGIENE_HEART_BOARD / a local Heart checkout — the org is derived from the body map, never hardcoded; tenant firewall clean), rank three lanes, fold a script's python legs into one candidate whose cost is the slowest leg (the gate waits for it), carry the evidence (seconds, share of leg, cache_jax, run URL) and read the levers off the script text when it is checked out (env_knob / simulates / jax_jit / full_datasets / real_search / subprocess / plots). One 📋 per item for /ci_speedup. An unreachable board is exit 3, never a clean zero.
  • pyauto-brain hygiene ci [--top N] [--lane scripts|tests|gates|all] [--json]: on-demand mode (network, so never the default scan), flags passed through to the helper.
  • skills/ci_speedup/: the executor — reproduce the number under the smoke profile (cold + warm cache), name the split (compile / simulate / search / repeated construction / plots), pick the smallest lever that keeps the assertion, ship through start_dev → ship_*; never demote a script to get the number down.
  • docs: hygiene AGENTS.md + skill body, COMMANDS.md §5 maintenance doors.

First run, on the live board: the three slowest smoke scripts were fixed on same-named branches — PyAutoLabs/PyAutoArray (vectorised over-sampled grid builder), PyAutoLabs/autolens_workspace_test (profile knob + jit), PyAutoLabs/autocti_workspace (fast-plots profile) — each 2–4× faster locally under the smoke profile.

API Changes

New hygiene mode ci and new skill /ci_speedup; no existing verb, flag or output changes. hygiene ci is not part of the default scan and not in MODE_ORDER, so the default HygieneDecision is unchanged.
See full details below.

Test Plan

  • tests/test_hygiene_ci.py — 10 new tests (leg folding, null rows, levers, unreachable path, dispatcher round-trip)
  • full Brain suite: 936 passed, 1 failed — test_branch_sweep.py::test_a_failed_delete_reports_why, which fails identically on origin/main in this environment (git error-text dependent), unrelated
  • PyAutoMind/scripts/repos_sync.py checks: hygiene conductor coverage OK, tenant firewall OK
  • CI green on this PR
Full API Changes (for automation & release notes)

Removed

  • nothing

Added

  • pyauto-brain hygiene ci [--top N] [--lane scripts|tests|gates|all] [--board PATH|URL] [--json] — ranked CI-cost worklist from the Heart board
  • agents/conductors/hygiene/_hygiene_ci.py — the stdlib helper (rank_scripts, rank_tests, rank_gates, levers_from_text, build)
  • skills/ci_speedup/ — /ci_speedup maintenance door (SKILL.md + ci_speedup.md)

Migration

  • none

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_015J8ZLmc55ZT1nSRntZMz9K


Generated by Claude Code

…board

The Heart publishes per-script smoke timings, the slowest unit tests and every
gate's wall-clock as the `performance` block of its board, but nothing read
it: the only consumer was a human on the ⏱ section. This adds the conductor's
read of that surface and a maintenance door that acts on it.

- `_hygiene_ci.py` (stdlib): fetch the board (Pages / HYGIENE_HEART_BOARD /
  a local Heart checkout — org derived from the body map, never hardcoded),
  rank three lanes, fold a script's python legs into ONE candidate whose cost
  is the slowest leg (the gate waits for it), carry the evidence (seconds,
  share of leg, cache_jax, run URL) and read the levers off the script text
  when it is checked out (env_knob / simulates / jax_jit / full_datasets /
  real_search / subprocess / plots). One 📋 per item for /ci_speedup. An
  unreachable board is exit 3, never a clean zero.
- `hygiene ci [--top N] [--lane …] [--json]`: on-demand mode (network, so
  never the default scan), flags passed through to the helper.
- `skills/ci_speedup/`: the executor — reproduce the number under the smoke
  profile (cold + warm cache), name the split (compile / simulate / search /
  repeated construction / plots), pick the smallest lever that keeps the
  assertion, ship through start_dev → ship_*; never demote a script to get
  the number down.
- tests: leg folding, null rows, levers, unreachable path, dispatcher
  round-trip.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015J8ZLmc55ZT1nSRntZMz9K
@Jammy2211
Jammy2211 merged commit 8232bd1 into main Sep 8, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the claude/smoke-test-perf-g8i2uq branch September 8, 2026 03:16
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.

2 participants