Repository navigation
Description
Overview
fix: reject foreign validation results and tracked reports
Plan
Share a result-path validation helper across validate.py and the test_run/script_timing collectors. Under an explicitly known runner root reject foreign absolute paths and traversal with a warning naming source shard and file. Preserve local/non-CI behavior when no runner root is declared. Add a tracked-result lint to the reusable smoke workflow and prove it using a temporary git repo. Test clean and rejected inputs; ensure invalid evidence cannot yield ready=true.
Tier: glance — merge mode: human /prm; stop at PR review.
Detailed implementation and validation
Primary repo PyAutoHeart, clean main at 2919e9e; no other-session active claim or open PR. Branch feature/result-provenance-guards. One task per PR; this four-task request is coordinated sequentially in isolated worktrees by the same session. Heart published 2026-10-17T09:00:24Z: STALE, release validation stale: source moved since rehearsal (PyAutoFit, PyAutoGalaxy, PyAutoLens). Run focused tests and applicable Heart suite. No release or merge is authorized.
Authorization
User requested four linked dashboard tasks on 2026-10-17.
Original prompt
release-integrate: analyze-side foreign-path filter and a workspace-repo lint for tracked result files
Type: bug
Target: PyAutoHeart
Repos:
- PyAutoHeart
- autolens_workspace_test
Difficulty: medium
Autonomy: supervised
Priority: low
Status: formalised
Consequence: glance
Witness: A planted*__script.jsoncarrying a foreign path is excluded from the analyze/collector results with a warning naming the shard and the path (test), and a planted trackedtest-results/file fails the workspace lint (test); both tests live inPyAutoHeart/tests.
Review-minutes: 3
Unattended: ready
Filed: 2026-09-11
The remainder of complete/2026/09/release-integrate-discard-stale-result-files.md,
which shipped option 1 of the three guards the original prompt offered
(PyAutoHeart#225: every shard now deletes any result file the workspace checkout
carries before the runner starts, and warns per file). Two defence-in-depth
layers were left open and are re-filed here so the dashboard does not offer the
shipped prompt as backlog:
- Analyze-side path filter. In the analyze/collector path
(heart/validate.pyrglob over*.json;heart/checks/test_run.pyand
script_timing.pyglob*__script.json), drop or flag any result entry whose
filepath is not under the runner workspace (does not start with
$GITHUB_WORKSPACE, or starts with a home directory such as/home/<user>),
and log a loud warning naming the shard and the foreign path. This catches a
leak that arrives by any route the pre-run discard does not see (a result
written under a different name, or a future runner that changes the layout). - Workspace-repo lint. A Heart required workflow, or a check in the workspace
CI, that fails whentest-results/or any*__script.json/smoke_timings.json
is tracked in git — so the leak is refused at the workspace PR rather than
laundered at the release.
Tests in PyAutoHeart/tests for each layer, using a fixture that plants a stale
*__script.json carrying a foreign path and asserts it is excluded and warned
about (layer 1), and a planted tracked result file that the lint rejects (layer 2).
Background: nightly Release Integrate runs 34323573912 (2026-09-09) and
34449490363 (2026-09-10) failed at Stage 3 on three stale jax_likelihood
failures that autolens_workspace_test#311 had committed by accident; awt#313
removed them and the 2026-09-11 nightly went green. See the record above for
the trap that cost a CI round (the tenant firewall reads test modules).
Reconciliation — 2026-10-01
Keep open — this is deliberately unshipped remainder. GitHub confirms PR #225 merged on 2026-09-11; complete/2026/09/release-integrate-discard-stale-result-files.md explicitly says only the pre-run deletion shipped and re-files the two other guards here. Heart origin/main ff7003f still reads JSON in heart/validate.py, heart/checks/test_run.py, and heart/checks/script_timing.py without the requested foreign-result-path warning/filter. The earlier record's phrase “Scope shipped vs filed” describes the parent task, not completion of this remainder.
Activity
Jammy2211 commentedon Oct 17, 2026
Implementation ready for review: #307
Validation, exact changes and limitations are in the PR. Mind active.md records the branch/head and next step. Stop at human /prm; no merge or release performed.
Jammy2211 commentedon Oct 17, 2026
Shipped
PR #307 merged on 2026-10-17 following the user's /prm. Both Python 3.12 and 3.13 Heart Tests jobs passed on the exact shipped head, with no skipped test legs. Git ancestry confirms the head is in main. Scope and validation details are in the PR. Mind completion and dashboard close-out are being recorded. This is a development merge, not a release-readiness claim.