Skip to content

mng/better-ratchet-tests#855

Open
joshalbrecht wants to merge 6 commits intojosh/faster_uploadsfrom
mng/better-ratchet-tests
Open

mng/better-ratchet-tests#855
joshalbrecht wants to merge 6 commits intojosh/faster_uploadsfrom
mng/better-ratchet-tests

Conversation

@joshalbrecht
Copy link
Contributor

Automated PR created by Claude Code session.

joshalbrecht and others added 6 commits March 12, 2026 18:48
1. Fix _get_all_files_with_extension to list actual files on disk
   instead of relying solely on git ls-files, which can list deleted
   files still in the index. Now uses --cached --others
   --exclude-standard and filters by existence on disk.

2. Replace time.time()-based agent names in provision and snapshot
   tests with get_short_random_string() for more robust naming
   under xdist parallelism.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add two tests for the key behaviors introduced by the previous commit:
- Deleted-but-tracked files are excluded from ratchet scans
- Untracked non-ignored files are included in ratchet scans

Also fix the get_ratchet_failures docstring which still referenced
"git-tracked files" after the implementation changed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The rename test and some provision tests check tmux session state
immediately after operations that restart or rename sessions. Under
heavy xdist parallelism, these checks can race with tmux propagation.
Use wait_for instead of bare assertions for session existence checks
after restart/rename operations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Remove dead parallelization scaffolding in provisioning.py: unused
   Future/ConcurrencyGroupExecutor imports, empty futures list, and
   commented-out executor.submit calls. The mng_ctx parameter is no
   longer needed without the executor.

2. Fix provisioning_test.py: remove temp_mng_ctx fixture dependency
   (which was unavailable in mng_recursive's conftest) and update
   _upload_deploy_files call sites to match the cleaned-up signature.

3. Add wait_for to test_rename and test_provision for tmux session
   checks after operations that restart or rename sessions, improving
   resilience under xdist parallelism.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restore the ConcurrencyGroupExecutor, futures list, and mng_ctx
parameter that were removed prematurely -- parallelization is being
finished in another branch.

Fix the provisioning tests to use _make_mock_mng_ctx() instead of the
unavailable temp_mng_ctx fixture, which was causing CI failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use keyword-arg assert_called_once_with to verify the correct path
and content are passed to host.write_file/write_text_file, matching
the keyword calling convention used in _upload_deploy_files.

Co-Authored-By: Claude Opus 4.6 (1M context) <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