Skip to content

fix: Update failing Q CLI unit tests due to working directory validation#94

Merged
haofeif merged 8 commits into
awslabs:mainfrom
patricka3125:fix/qcli-wd-tests
Mar 7, 2026
Merged

fix: Update failing Q CLI unit tests due to working directory validation#94
haofeif merged 8 commits into
awslabs:mainfrom
patricka3125:fix/qcli-wd-tests

Conversation

@patricka3125

Copy link
Copy Markdown
Collaborator

Description of changes:
Fix failing Q CLI tests that were introduced in working directory validation logic introduced in commit 2b1128d

FAILED test/providers/test_q_cli_integration.py::TestQCliProviderWorkingDirectory::test_session_starts_in_custom_directory - ValueError: Working directory not allowed: /tmp/pytest-of-bajablast69/pytest-14/test_session_starts_in_custom_0 (resolves to /tmp/pyte...
FAILED test/providers/test_q_cli_integration.py::TestQCliProviderWorkingDirectory::test_working_directory_changes_are_detected - ValueError: Working directory not allowed: /tmp/pytest-of-bajablast69/pytest-14/test_working_directory_changes0 (resolves to /tmp/pyte...
FAILED test/providers/test_q_cli_integration.py::TestQCliProviderWorkingDirectory::test_symlink_resolution - ValueError: Working directory not allowed: /tmp/pytest-of-bajablast69/pytest-14/test_symlink_resolution0/link (resolves to /tmp/pytest...

@patricka3125 patricka3125 marked this pull request as draft March 4, 2026 07:57
@patricka3125 patricka3125 marked this pull request as ready for review March 4, 2026 07:58
@patricka3125 patricka3125 changed the title [Fix] Update failing Q CLI unit tests due to working directory validation fix: Update failing Q CLI unit tests due to working directory validation Mar 4, 2026
@haofeif haofeif requested review from a team and gutosantos82 March 5, 2026 07:53
@haofeif haofeif added the bug Something isn't working label Mar 5, 2026
@codecov-commenter

codecov-commenter commented Mar 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@8d6d1c0). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #94   +/-   ##
=======================================
  Coverage        ?   84.01%           
=======================================
  Files           ?       38           
  Lines           ?     2209           
  Branches        ?        0           
=======================================
  Hits            ?     1856           
  Misses          ?      353           
  Partials        ?        0           
Flag Coverage Δ
unittests 84.01% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@haofeif haofeif 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.

@patricka3125 LGTM — the root cause (pytest tmp_path lives under /private/var on macOS, which fails the working directory home-prefix validation) is correctly diagnosed and the fix is clean.

One suggestion: add a session-scoped cleanup fixture for orphaned .cao_test_tmp_* dirs in case test runners get killed before yield cleanup runs. See inline comment. Not a blocker — happy to approve with minor suggestion.

Comment thread test/providers/test_q_cli_integration.py
@patricka3125

Copy link
Copy Markdown
Collaborator Author

@haofeif added the session cleanup fixture. Please lmk if anything else needed

@haofeif haofeif 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.

@patricka3125 LGTM, thanks again for your great contribution!

@haofeif haofeif merged commit 2c66773 into awslabs:main Mar 7, 2026
12 checks passed
aziz0220 pushed a commit to aziz0220/cli-agent-orchestrator that referenced this pull request Mar 8, 2026
…ion (awslabs#94)

* fix: Fix regex to catch Claude Code Processing spinner (awslabs#2)

* Add custom agent store

* fix: Fix failing Q-CLI working directory tests

* unstage custom change

* fix formatting

* add pre-session cleanup fixture

---------

Co-authored-by: haofeif <56006724+haofeif@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants