Skip to content

fix(agent-runner): replace hardcoded absolute paths with CARGO_MANIFEST_DIR in session_process tests#199

Merged
Shooksie merged 2 commits intomainfrom
fix/session-process-tests-cargo-manifest-dir
Apr 1, 2026
Merged

fix(agent-runner): replace hardcoded absolute paths with CARGO_MANIFEST_DIR in session_process tests#199
Shooksie merged 2 commits intomainfrom
fix/session-process-tests-cargo-manifest-dir

Conversation

@Shooksie
Copy link
Copy Markdown
Contributor

@Shooksie Shooksie commented Apr 1, 2026

Summary

  • 6 tests in crates/agent-runner/src/runner/session_process.rs had hardcoded /Users/samishukri/ao-cli/ absolute paths for fixtures and the ao binary
  • Replaced all occurrences with concat!(env!("CARGO_MANIFEST_DIR"), "/<relative-path>") so tests work on any developer machine
  • Fixture paths use /../llm-cli-wrapper/tests/fixtures/<name>.jsonl (one level up from agent-runner to crates/, then into llm-cli-wrapper/)
  • Binary path uses /../../target/debug/ao (two levels up to workspace root)
  • Assertion values in spawn_session_process_passes_claude_mcp_launch_args_and_preserves_primary_server updated to match the new variable-based inputs

Tests

All 113 agent-runner tests pass: cargo test -p agent-runner

Shooksie and others added 2 commits March 31, 2026 18:24
…with CARGO_MANIFEST_DIR-relative paths in session_process tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Shooksie Shooksie merged commit 4c7abb5 into main Apr 1, 2026
24 checks passed
@Shooksie Shooksie deleted the fix/session-process-tests-cargo-manifest-dir branch April 1, 2026 00:34
Shooksie added a commit that referenced this pull request Apr 1, 2026
…FEST_DIR

Same root cause as #199 — tests used hardcoded /Users/samishukri/ao-cli/
paths for fixture files. Use concat!(env!("CARGO_MANIFEST_DIR"), ...) so
tests pass regardless of checkout location.

Fixes 3 failing tests: claude, codex, and gemini backend fixture tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shooksie added a commit that referenced this pull request Apr 1, 2026
…FEST_DIR (#200)

Same root cause as #199 — tests used hardcoded /Users/samishukri/ao-cli/
paths for fixture files. Use concat!(env!("CARGO_MANIFEST_DIR"), ...) so
tests pass regardless of checkout location.

Fixes 3 failing tests: claude, codex, and gemini backend fixture tests.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 8, 2026
@Shooksie Shooksie mentioned this pull request Apr 8, 2026
Shooksie added a commit that referenced this pull request Apr 8, 2026
…ST_DIR in session_process tests (#199)

* fix(agent-runner): replace hardcoded /Users/samishukri/ao-cli/ paths with CARGO_MANIFEST_DIR-relative paths in session_process tests

* style: fix rustfmt formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Shooksie added a commit that referenced this pull request Apr 8, 2026
…FEST_DIR (#200)

Same root cause as #199 — tests used hardcoded /Users/samishukri/ao-cli/
paths for fixture files. Use concat!(env!("CARGO_MANIFEST_DIR"), ...) so
tests pass regardless of checkout location.

Fixes 3 failing tests: claude, codex, and gemini backend fixture tests.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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