Repository navigation
Description
Overview
Preserve tracked workspace content during smoke output cleanup.
Plan
- Keep tracked files and their parent directories while removing stale untracked output.
- Fail closed if git cannot enumerate tracked files; never follow output symlinks.
- Exercise a real temporary git repository including nested tracked files, generated output and symlinks.
- Audit the test-results cleanup path for the same defect.
Tier: glance — merge mode: human /prm (this session stops at PR review).
Detailed implementation plan
Primary repo PyAutoHeart; clean main checkout, no active Mind claim or open Heart PR. Branch feature/smoke-preserve-tracked. Update heart/smoke.py::_wipe_output using git ls-files -z and a traversal preserving indexed paths. Add regression tests in tests/test_smoke.py. Run focused smoke tests and applicable suite. No workspace source edit anticipated; autolens_workspace_test is the reported consumer. Heart at door STALE (missing local evidence; published feed unreachable).
Authorization
User requested four linked dashboard tasks on 2026-10-17. This is member 1, coordinated sequentially with result provenance, timing baseline and Euclid gate tasks. No merge or release authorization inferred.
Original prompt
Heart smoke runner deletes the tracked output/.gitignore when wiping output/
Type: bug
Target: PyAutoHeart
Repos:
- PyAutoHeart
- autolens_workspace_test
Difficulty: small
Autonomy: safe
Priority: medium
Status: formalised
Consequence: glance
Witness: after the fix, running the smoke wipe against a workspace whose output/ holds a tracked .gitignore leavesgit status --shortempty; before the fix it showsD output/.gitignore.
Review-minutes: 3
Unattended: ready
Observed 2026-09-16 during the config-priors-drift ship (PyAutoGalaxy#618): pyauto-heart smoke autolens autogalaxy howtolens autolens_test --root ~/Code/PyAutoLabs-wt/<task> ran green (136/136) but left autolens_workspace_test with D output/.gitignore — the pre-run output/* wipe removed a TRACKED file (the .gitignore sentinel that keeps the empty output/ folder in git). A ship step that does git add -A after smoke would commit that deletion into the workspace PR. The ship subagent restored it by hand with git checkout -- output/.gitignore before opening the PR.
Fix: the wipe in PyAutoHeart's smoke command (the step documented as "wipes stale output/* immediately before execution") must skip tracked paths — e.g. git ls-files output/ to exclude, or delete only untracked/ignored entries (git clean -fdX -- output semantics) — and a regression test that a tracked file under output/ survives a wipe. Check the same for test-results/.
Witness: after the fix, running the smoke wipe against a workspace whose output/ holds a tracked .gitignore leaves git status --short empty; before the fix it shows D output/.gitignore.
Reconciliation — 2026-10-01
Keep open — source confirms the defect. Heart origin/main ff7003f, heart/smoke.py:540-548, iterates every output child and unlinks files or recursively removes directories, with no tracked-file exemption. No destructive smoke run was performed during this audit. The reconciler's referenced tenant-firewall completion is a different defect and is not completion evidence for this task.
Activity
Jammy2211 commentedon Oct 17, 2026
Implementation ready for review: #306
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 #306 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.