Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@

[![health](https://img.shields.io/endpoint?url=https://pyautolabs.github.io/PyAutoHeart/badge.json)](https://pyautolabs.github.io/PyAutoHeart/)

<!-- The block below is auto-updated by .github/workflows/heart-health.yml (everything -->
<!-- between the heart:begin/heart:end markers is replaced with the rendered strip). -->
<!-- Live board: https://pyautolabs.github.io/PyAutoHeart/ -->
<!-- heart:begin -->
## 🔵 PyAuto health — **STALE** (score 65) · [full board →](https://pyautolabs.github.io/PyAutoHeart/)
<!-- heart:end -->

**PyAutoHeart is the Heart of the PyAutoScientist** — the organism's health
authority. It continuously watches every repository (CI, branches, open PRs,
version skew, script and test timings, workspace validation) and rolls what it
Expand All @@ -28,6 +21,14 @@ failing run and a one-tap 📋 button that copies a ready-made Claude prompt
(`/bug …`), so going from "something is red" to "an agent is fixing it" is
copy → paste, on a laptop or a phone.

## Current health

<!-- The line below is auto-updated by .github/workflows/heart-health.yml (everything -->
<!-- between the heart:begin/heart:end markers is replaced with the rendered strip). -->
<!-- heart:begin -->
🔵 **STALE** · score 65 · [full board →](https://pyautolabs.github.io/PyAutoHeart/)
<!-- heart:end -->

## How PyAutoHeart works

1. **Observe.** `pyauto-heart tick` (or the 5-minute daemon) runs the cheap
Expand Down
13 changes: 7 additions & 6 deletions heart/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,15 +949,16 @@ def _render_md(board: Board) -> str:


def _render_md_brief(board: Board) -> str:
"""The README strip: one glance, not a wall. A single verdict line with
the board link inline; blockers/warnings appear only when there ARE any
(stale evidence gaps and timestamps live on the board, not the README —
the strip earns its README lines only when something needs a human)."""
"""The README strip: one glance, not a wall. It renders under the README's
own "## Current health" heading, so it carries no heading of its own — a
single verdict line with the board link inline; blockers/warnings appear
only when there ARE any (stale evidence gaps and timestamps live on the
board, not the README — the strip earns extra lines only when something
needs a human)."""
word = _VERDICT_WORD.get(board.verdict, "GREEN")
emoji = _STATE_MD[_VERDICT_STATE.get(board.verdict, OK)]
lines = [
f"## {emoji} PyAuto health — **{word}** (score {board.score}) · "
f"[full board →]({PAGES_URL})"
f"{emoji} **{word}** · score {board.score} · [full board →]({PAGES_URL})"
]
if board.verdict in ("red", "yellow"):
label, items = _shown_reasons(board)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,12 @@ def test_md_brief_is_a_strip_not_a_table():
v = make_verdict("red", 45,
red_reasons=["autolens_workspace: Smoke Tests failure on main"])
out = dashboard.render(_failing_snapshot(), v, fmt="md-brief", now=FRESH_NOW)
assert "PyAuto health" in out and "RED" in out
assert "**RED**" in out
assert "[autolens_workspace](" in out
assert dashboard.PAGES_URL in out
assert "| Check |" not in out # no table — the Pages board carries it
assert "snapshot" not in out # no timestamp clutter — the board has it
assert not out.startswith("#") # the README supplies the section heading


def test_md_brief_is_one_line_unless_something_is_wrong():
Expand Down
Loading