Skip to content

mac-static: keep each full run's results in its own directory - #522

Merged
juliankang4 merged 2 commits into
midagedev:mainfrom
juliankang4:fix-mac-static-overlap
Oct 20, 2026
Merged

juliankang4 merged 2 commits into
midagedev:mainfrom
juliankang4:fix-mac-static-overlap

Conversation

@juliankang4

@juliankang4 juliankang4 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

mac-static을 겹쳐 실행해도 실패와 경고가 유지되고, 원격 실행의 실패 로그를 정확히 읽도록 고쳤습니다.

Fixes #516

What and why

Full mac-static runs keep their step results in separate target/mac-static/run.XXXXXX/ directories. Cargo modes also keep separate logs, so an overlapping green run cannot erase the warnings that decide a lint's result or seed eligibility. Worktree retirement checks each full and check-only run directory, and remote failure logs use the raw result path before account-name redaction.

Release notes: Added: Per-run results and cargo logs for the Mac static tier, with remote failure-log selection preserved through display redaction.

Code shape

  • No second copy. Result-file overlap uses the existing fixture; warning overlap reuses the fake toolchain. Production and fixture output capture share one pipeline.
  • Model code holds only architecture facts. No model code changes.
  • Dead code is gone. No unused helpers or flags added.
  • No silent failure. Missing step results remain failures; directory creation errors are named.
  • Comments state what is true now.
  • No relaxed gate. No tolerance, band or lint level changes.
  • cargo fmt and cargo clippy: not run here; this diff contains only shell scripts.

Duplication found or removed: the existing overlap case in tools/mac-static.sh exercises both entry points. tools/mac-remote.sh uses one capture pipeline for the FIFO reader and account-name fixtures.

What I ran

Linux fixture checks at 7fbe3e9d40c9287b3e7c97f3e5b0774120191f00:

bash tools/mac-static.sh --self-test
mac-static: overlap result cases 2 exercised (--checks and --full)
mac-static: self-test ok
bash tools/mac-check.sh --self-test
mac-check: overlap warning case: red rc 1, green rc 0, seed lines 1
mac-check: self-test ok
python3 tools/recipes.py --self-test
self-test: ok (193 gate recipes, 0 failures)
bash tools/mac-remote.sh --self-test
mac-remote: result capture account st-user: path target/mac-static/run.current
mac-remote: result capture account mac: path target/mac-static/run.current
mac-remote: result capture account run: path target/mac-static/run.current
mac-remote: self-test ok (the flow against a fake remote needs macOS: skipped on Linux)

Worktree-reader checks at 0195aa4f268d6bee0784bafa730bd677bf78666e:

bash tools/wt.sh --self-test
wt: check-only in-flight case exercised
wt: self-test ok

The other checked scripts are unchanged between these commits.

The warning-overlap case runs the real full-entry scripts with fake cargo: one run emits a warning and waits until the green run finishes. It must stay red and must not add a green seed record. The result-capture cases return only the selected run's failed-step output for each account name.

FAIL-first

Each fix was reverted alone on top of the final head, with the tests left as they are. Both self-tests then fail with exit code 1.

Revert of the lint log: tools/mac-check.sh writes target/mac-check-$MODE.log again instead of the PID-qualified name.

bash tools/mac-check.sh --self-test
mac-check self-test FAIL: the overlapping lint lost its warning verdict
mac-check self-test FAIL: the overlapping red lint wrote a green seed record: ...	lint
mac-check: overlap warning case: red rc 0, green rc 0, seed lines 2
mac-check: self-test 3 failed

Revert of the results directory: tools/mac-static.sh keeps its results in the shared target/mac-static directory again instead of a mktemp directory per run.

bash tools/mac-static.sh --self-test
mac-static self-test FAIL: --full: the red run ends rc 0 when a green run overlaps it, not its model-tax's 7: ...
mac-static self-test FAIL: --full: the red run does not name model-tax: ...
mac-static: self-test 2 failed

The portable result-directory and hangup checks ran. The macOS-only seed-copy and fake-remote flows and a full native mac-static run were not run here.

Hardware (if the change is for a machine)

Linux host, fixture scripts only. No GPU or model files are needed for these self-tests.

What I ran into

This does not block the PR. A nohup-launched hangup fixture must restore signal defaults before starting Bash. The fixture does so without weakening its lock-removal or child-exit assertions.

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

@github-actions github-actions Bot added the tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo label Oct 20, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: No must-fix defect was found in the result isolation or its readers.

Non-blocking

⚠ Add FAIL-first evidence: tools/mac-check.sh:835 and tools/mac-static.sh:444. The PR reports passing regression cases but no failing run before the fixes.
Attach output with the shared lint log and shared full-run result directory restored separately. Their exit-code assertions must fail. Record this while the regression setup is available.

Checked

Duplicates: 1 new function checked, capture_run; no duplicate owner found. No dryer pairs supplied.
Complexity: no Rust function changed; no crapper report.
Silent failure: 5 production result/capture sites followed. Directory errors return 69, missing step results remain failures, and raw paths select the remote logs.
Tests: bash -n passed for all four scripts. Static mutation analysis: shared result paths fail the red-run assertion; shared lint logs fail warning/seed assertions; bypassed raw capture fails the path assertion; omitted check-run scanning fails the retirement assertion. Removing signal restoration under ignored HUP fails the hangup assertions.
Gates: no production gate, tolerance or lint pin moved.
Escape catalog: no C1–C4 match. The new capture and parsing pipelines retain pipefail.

Notes

Dryer and crapper did not run because no Rust file changed.
Self-tests were not rerun under the output-file-only constraint. The PR reports Linux fixture passes and identifies the unrun native macOS flows.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit 03f8f3a into midagedev:main Oct 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mac-static: overlapping full runs can overwrite a failed run's status

1 participant