Skip to content

test: fail closed when fixture temp-root allocation fails - #2758

Merged
Chris0Jeky merged 2 commits into
mainfrom
issue-1855/temp-root
Sep 6, 2026
Merged

test: fail closed when fixture temp-root allocation fails#2758
Chris0Jeky merged 2 commits into
mainfrom
issue-1855/temp-root

Conversation

@Chris0Jeky

Copy link
Copy Markdown
Owner

Summary

  • validate both mktemp -d forms before deriving any fixture child path
  • fail with setup exit 2 when neither allocation form returns a non-empty directory
  • make the cleanup trap no-op when fixture-root allocation failed
  • add fixture-local executable probes for fallback success and total allocation failure

Verification

  • bash -n scripts/worktree_guard.tests.sh — passed
  • bash scripts/worktree_guard.tests.sh — 38 passed, 0 failed, 0 skipped
  • git diff --check — passed

The failure probe asserts that no primary, bare-repository, or empty-root fixture paths are created or named after both allocation forms fail. No user machine configuration or global cleanup was changed.

Refs #1855

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@Chris0Jeky

Copy link
Copy Markdown
Owner Author

Fresh-context review record (coordinator, 2026-09-06; read-only Opus 5 reviewer over the diff against the merge base; route: the standing D-12 rule for Codex-session PRs — review, fix MEDIUM+ in-PR, merge, disposition comment).

VERDICT: SHIP, nothing fixed in-PR. The destructive-path checks come back clean: every rm -rf -- "$FIXTURE_ROOT" is fenced by empty/not-a-directory guards with -- and no trailing slash, the trap early-returns on an empty root, and the old FIXTURE_ROOT="" path really would have run git init "/primary" at the filesystem root, so the fix is real; the failure path exits non-zero through FAIL. LOWs recorded for #1855: three new knobs undocumented in the usage header; an ambient WT_GUARD_ALLOCATE_ONLY makes the suite exit 0 silently having run zero cases; a non-numeric value prints integer expression expected; a noexec temp mount would fail both probes spuriously (hypothesis; no CI caller). Hosted Windows red at the previous head was the #2378 launcher-suite class; the branch is updated past #2608.

@Chris0Jeky
Chris0Jeky merged commit 27370fd into main Sep 6, 2026
35 checks passed
@Chris0Jeky
Chris0Jeky deleted the issue-1855/temp-root branch September 6, 2026 12:41
@github-project-automation github-project-automation Bot moved this from Pending to Done in Taskdeck Execution Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant