Skip to content

test_run: never fabricate counts; ingest the validation-report artifact #119

Closed

Description

@Jammy2211

Problem

Readiness reported workspace validation not passing (0 failed, cloud#30516167217) while that run had 2 failed + 1 timeout. heart/checks/test_run.py takes ready from the cloud run conclusion but counts from a local run_logs/latest/report.json that doesn't exist for cloud runs — counts default to 0 and readiness.py:328, dashboard.py (0p/0f/0s) and test_run.py main() print them as fact. The run's own workspace-validation-report artifact holds the real counts and per-script failures, and is never fetched — hence manual archaeology on every red.

Plan

High-level

  • A summary must never carry counts nobody measured: new explicit counts_measured flag, honest reason/label text when false.
  • When the verdict comes from a cloud run, fetch that run's workspace-validation-report artifact (cached per run id) and surface real counts plus the failing script names in the readiness reason and dashboard details.
  • Preserve run()'s strict no-network/side-effect-free library contract (PyAutoHeart#83 discipline).

Detailed

  1. test_run.py: _from_report also extracts failing_scripts (project, directory/basename, status; cap 10); new _cloud_report(run_id) downloads + parses the artifact (60s timeout, never raises); run(..., cloud_report_fetcher=None) — fetcher injected only by the tick entrypoint; artifact counts promoted to top level when no local report exists; cloud_report_run_id recorded. main() builds a caching fetcher over the previously persisted sidecar and fixes its own NOT ready (0 failed) label.
  2. readiness.py: measured → workspace validation not passing (2 failed, 1 timeout, cloud#…: <top 3 scripts>, +N more); unmeasured → workspace validation failing (cloud#…; counts not ingested — see run); legacy cloud-shaped sidecars treated as unmeasured.
  3. dashboard.py: same honesty in the test-run section; failing scripts in details.
  4. Tests in the existing monkeypatch style across all three surfaces.

Branch: feature/test-run-honest-reason · Worktree: ~/Code/PyAutoLabs-wt/test-run-honest-reason/
Prompt: PyAutoMind/active/test_run_honest_reason_and_artifact_ingest.md · Series: CI/release audit 2026-07-30

Activity

  1. Jammy2211 commented on Jul 30, 2026

    @Jammy2211
    ContributorAuthor

    Implemented — PR #120 open, awaiting human merge.

    Live before/after on this box (same snapshot, same failing run):

    • before: workspace validation not passing (0 failed, cloud#30516167217)
    • after: workspace validation not passing (2 failed, 1 timeout, cloud#30516167217: autogalaxy scripts/interferometer/start_here.py, autolens scripts/group/start_here.py, autolens scripts/interferometer/start_here.py)

    Suite 316 passed. The artifact fetch is cached per run id (one download per new validation run); run() keeps its no-network contract; when no count evidence exists the reason says "counts not ingested — see run" instead of asserting zeros. Dashboard and the check's own CLI line carry the same guard.

  2. added a commit that references this issue on Jul 30, 2026
    0a9fc04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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