Skip to content

test_run: honest counts + validation-report artifact ingest (fixes #119) - #120

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/test-run-honest-reason
Jul 30, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/test-run-honest-reason

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Fixes #119 — CI/release-audit series task 2 (the 0 failed contradiction).

Contract: a summary may only carry counts somebody measured. New counts_measured flag (with a precise legacy-shape fallback for old sidecars), honored by all three consumers: the readiness reason, the dashboard section, and test_run's own CLI line.

Artifact ingest: when the verdict comes from a cloud run, the tick entrypoint fetches that run's workspace-validation-report artifact (cached per run id via the persisted sidecar — one download per new validation run, not per 30 s tick) and surfaces real counts + compact failing-script names (failing_scripts, tracebacks never enter the sidecar). run() itself keeps its strict no-network / side-effect-free library contract (the fetcher is injected only by main(); the #83 discipline tests still pass).

Reason text, verified live against the real state on this box:

  • 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)
  • when the artifact is unavailable (no gh, expired): workspace validation failing (cloud#…; counts not ingested — see run) — never a fabricated zero.

Tests: 316 passed (13 new across test_test_run.py / test_readiness.py / test_dashboard.py: artifact promotion, fetch-failure honesty, in-progress skip, legacy shapes, per-run-id caching, script naming, dashboard rendering; one existing entrypoint test made hermetic against the new fetch).

Note: the persisted release_ready.json refreshes on the next daemon tick after merge — readiness without --profile serves the cached verdict by design.

🤖 Generated with Claude Code

…fact

The 2026-07-30 live bug: readiness said 'workspace validation not passing
(0 failed, cloud#30516167217)' while that run had 2 failed + 1 timeout —
ready came from the cloud run conclusion, the counts from a local
run_logs/latest/report.json that does not exist for cloud runs, and every
consumer printed the zero-filled placeholders as fact (PyAutoHeart#119).

- test_run.py: summaries carry an explicit counts_measured flag; _from_report
  extracts compact failing_scripts (no tracebacks); new _cloud_report()
  downloads the run's workspace-validation-report artifact; run() takes a
  cloud_report_fetcher injected only by the tick entrypoint (run() itself
  stays no-network/side-effect-free), promotes artifact counts when no local
  report exists, and records cloud_report_run_id; main() caches the artifact
  per run id via the previously persisted sidecar and stops printing
  fabricated counts in its own CLI line.
- readiness.py: measured -> 'not passing (2 failed, 1 timeout, cloud#…:
  <top 3 scripts>, +N more)'; unmeasured -> 'failing (…; counts not ingested
  — see run)'; legacy cloud-shaped sidecars treated as unmeasured.
- dashboard.py: same guard (no 0p/0f/0s placeholders); failing scripts in the
  section details.

Verified live: the tick now writes 585p/2f/91s @ cloud#30516167217 with the
three failing scripts, and compute() emits the honest reason above. Suite:
316 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 0a9fc04 into main Jul 30, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/test-run-honest-reason branch July 30, 2026 13:41
@Jammy2211 Jammy2211 mentioned this pull request Oct 7, 2026
2 tasks done
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.

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

1 participant