📝 CodeRabbit Chat: Implement requested code changes - #146
📝 CodeRabbit Chat: Implement requested code changes#146coderabbitai[bot] wants to merge 3 commits into
Conversation
`make lint` fails on `main` because the interrogate gate added in #131 requires 100% docstring coverage, but five members of `test_tee_profile_worker_concurrency.py` (`_RLockLike.acquire`, `_RLockLike.release`, `_SignallingRLock.release`, `__enter__`, and `__exit__`) lack docstrings. Add them. `make test` also flakes on `test_crosshair_contracts[split_no_text_loss]`: CrossHair needs roughly 15 seconds to confirm the contract on a loaded 6-core host, so the 10-second `per_condition_timeout` intermittently yields `CANNOT_CONFIRM`. Raise the budget to 60 seconds; confirmation exits early on success, so the common-case runtime is unchanged.
The PIPE-versus-DEVNULL stdio selection for spawning pipeline stages was duplicated: `_spawn_pipeline_processes` re-derived the flags inline while the purpose-built `_get_stage_stream_fds` helper sat dead behind a self-referential re-export in `cuprum/_pipeline_streams.py`. - Route `_spawn_pipeline_processes` through `_get_stage_stream_fds`, making the helper the single source of truth for the stage stdio policy, and document the policy on its docstring. - Extract `_cwd_arg(cwd)` into `cuprum/_subprocess_context.py` and use it from both the single-command (`_spawn_subprocess`) and pipeline spawn sites, removing the duplicated `str(...) if ... is not None else None` idiom. - Remove the dead `_get_stage_stream_fds` / `_StageStreamConfig` re-exports now that a real caller imports from `cuprum._pipeline_stage_streams` directly. - Cover the full finite input domain (stage position x capture/echo) in `cuprum/unittests/test_stage_stream_fds.py`, including agreement with the single-command stdout/stderr policy on overlapping cases and `_cwd_arg` conversion cases. - Document the canonical helpers and their re-use policy in `docs/developers-guide.md`. The wheel-build snapshot is refreshed because it records the package file list, which now includes the new test module.
|
Important Review skippedThis PR was authored by the user configured for CodeRabbit reviews. CodeRabbit does not review PRs authored by this user. It's recommended to use a dedicated user account to post CodeRabbit review feedback. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Reviewer's GuideRefactors tee_profile worker concurrency tests by extracting shared threading utilities into conftest, splitting environment-preservation and reentrancy scenarios into dedicated test modules, and updating snapshots accordingly. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
20a7c64 to
5916b59
Compare
9a861b8 to
e7fe4ac
Compare
d5ab9b1 to
d7f0737
Compare
Code changes was requested by @leynos.
The following files were modified:
cuprum/unittests/__snapshots__/test_maturin_build.ambrcuprum/unittests/__snapshots__/test_tee_profile_worker_concurrency.ambrcuprum/unittests/__snapshots__/test_tee_profile_worker_reentrancy.ambrcuprum/unittests/conftest.pycuprum/unittests/test_tee_profile_worker_concurrency.pycuprum/unittests/test_tee_profile_worker_env_preservation.pycuprum/unittests/test_tee_profile_worker_reentrancy.pySummary by Sourcery
Extract backend environment-preservation and selector reentrancy tests for tee profile workers into dedicated modules and share common concurrency utilities across tests.
Tests: