Repository navigation
test(invariants): cover lock-file ownership, instance lock, channel stop and worker paths - #16
Merged
Merged
Conversation
…top and worker paths Closes the remaining gaps from the test audit (06-tests 1.3 a/c/d): - ChannelLockFileTests: the lock file carries the child PID after spawn; release_channel_lock() leaves a held or foreign lock alone unless the PID matches. - InstanceLockRealFlockTests (POSIX): a second recorder instance exits with status 1 while another process holds the instance flock. - StopChannelProcessRealChildTests (POSIX, fork): a channel worker that ignores SIGTERM is SIGKILLed within the deadline. - WorkerVodTaskPathTests: _safe_vod_task_path() rejects traversal, absolute names, temp/non-archive files and symlinks out of the archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 tests for the invariant functions that still had none (audit finding T1, 06-tests 1.3 a/c/d). No production code changes.
Split out of #14, which keeps only the error-handling changes.
Evidence
worker._safe_vod_task_path1/17 lines executed;try_acquire_channel_lock1/23,update_channel_lock_pid1/15,release_channel_lock1/27 (local Windows coverage run).After: 17/17, 14/23, 10/15, 18/27.
python -m unittest tests.test_invariants->Ran 38 tests ... OK (skipped=11)on Windows.ok.Merge Danger
Door: two-way
Blast Radius: none
Tests only. On Linux CI, the fork-based test adds about 0.5 s.
🤖 Generated with Claude Code