test(daemon): e2e regression guard for spawn cwd stability#3005
Open
illegalcall wants to merge 1 commit into
Open
test(daemon): e2e regression guard for spawn cwd stability#3005illegalcall wants to merge 1 commit into
illegalcall wants to merge 1 commit into
Conversation
Adds test/daemon/cwd-stability-check.sh: a small, linear end-to-end check against the real `ao daemon` and real tmux, mirroring test/cli/install-check.sh. Verifies: - a daemon launched from a directory that is then deleted stays healthy, has chdir'd to its data dir, and preserves its startup cwd in /healthz; - a relative AO_DATA_DIR is absolutized (no reldata/reldata double-nest); - the tmux `cd <ws> || exit` launch guard lands the pane in the workspace even against a poisoned (deleted-cwd) tmux server. Each daemon is discovered via its own running.json, so the check is immune to port collisions (the daemon falls back to an ephemeral port). tmux check skips cleanly when tmux is absent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
|
Thanks for contributing to Agent Orchestrator. This PR is being picked up by the current external contributor on-call pair: If someone is already working on this, please continue as usual. For faster context or live questions, you can also join the AO Discord. Join the session here: Come by if you want to see what is being built, ask questions, or just hang around with the community. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a small end-to-end regression guard for the daemon spawn working-directory
fix (#2871, RCA #2780 / symptom #2775). It runs the real
ao daemonandreal tmux, mirroring the style of
test/cli/install-check.sh.test/daemon/cwd-stability-check.shasserts:(the Squirrel/ShipIt "poisoned cwd"), the daemon stays healthy, has
chdir'dto its data dir, and preserves its startup cwd in
/healthz(
startupWorkingDirectory).AO_DATA_DIRis absolutized. Noreldata/reldatadouble-nestafter the daemon
chdirs.cd <ws> || exitguard. The pane lands in the workspace evenagainst a tmux server whose own cwd was deleted.
Each daemon is discovered via its own
running.json, so the check is immune toport collisions (the daemon falls back to an ephemeral port when its configured
one is taken). The tmux check skips cleanly when
tmuxis absent.Test
Notes
workflow step (build
ao, run the script) if wanted.cwd; the
-c-ignored tmux failure mode it defends against isversion/OS-specific and does not reproduce on every host.
🤖 Generated with Claude Code