Skip to content

fix: stabilize Treehouse spawn and teardown validation - #28

Open
ruby-dlee wants to merge 9 commits into
mainfrom
fm/fm-test-fixtures-t3
Open

fix: stabilize Treehouse spawn and teardown validation#28
ruby-dlee wants to merge 9 commits into
mainfrom
fm/fm-test-fixtures-t3

Conversation

@ruby-dlee

Copy link
Copy Markdown
Owner

Intent

Repair three stale Firstmate test suites so unattended fleet validation is green without network or access to the live Treehouse pool. The tests must use faithful local Treehouse lease fixtures that acquire, print, and return worktrees, and isolate Treehouse and checkout-refresh state so they pass when ~/.treehouse is empty or absent. Preserve production behavior except for the two explicitly authorized defects the fixtures exposed: canonicalize symlinked project paths before exact-root preflight, and make cleanup of an already-absent exact /tmp/fm- task root idempotent while still refusing wrong paths, symlinks, or traversal. Keep the existing symlink regression pin, add repeat-cleanup and wrong-path pins, and require all three suites plus changed-file fm-lint to pass.

What Changed

  • Canonicalize symlinked project paths before checkout refresh and exact-root Treehouse preflight.
  • Make cleanup of an already-absent exact /tmp/fm-<id> task root idempotent while preserving unsafe-path refusals.
  • Replace stale spawn and teardown test doubles with isolated local Treehouse lease, checkout-refresh, and repeat-cleanup fixtures; update the backend documentation accordingly.

Risk Assessment

✅ Low: The production changes are narrowly scoped and satisfy the stated path-canonicalization and idempotent-cleanup requirements while retaining strict rejection of unsafe paths; the revised fixtures isolate Treehouse and checkout-refresh state without introducing a substantiated defect.

Testing

Completed 1 recorded test check.

  • Outcome: ⚠️ 1 error across 4 runs (6h8m56s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 error
  • 🚨 tests failed with exit code 1
  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"

🔧 Fix: Isolate Treehouse fixtures from detached checkout state
1 error still open:

  • 🚨 tests failed with exit code 1
  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"

🔧 Fix: Stabilize Treehouse fixtures and idempotent teardown cleanup
1 error still open:

  • 🚨 tests failed with exit code 1
  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"

🔧 Fix: Stabilize Treehouse fixtures and idempotent teardown cleanup
1 error still open:

  • 🚨 tests failed with exit code 1
  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"
⏭️ **Document** - skipped
  • ⚠️ Captain, canonical fm-lint remains red on unrelated pre-existing ShellCheck findings across unchanged files; resolving them requires a separate executable/test change.
⏭️ **Lint** - skipped
  • ⚠️ linter found issues (exit code 1)
✅ **Push** - passed

✅ No issues found.

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.

1 participant