Repository navigation
Make the gate pass: measure child processes and split complex functions - #18
Merged
Merged
Conversation
The hook and init tests run ub in child processes, which the gate's coverage run did not measure, so that code scored as uncovered. make gate now runs coverage with subprocess measurement and combines the data (scripts/gate-coverage.toml, coverage 7.17.4). The tests no longer resolve the package path: mutation workers link unmutated files to the original tree, so a resolved path made the child processes import the original code and every mutant survive. install_git, install_agent, initialize, terminate_check, and managed_block are split below CRAP 10, and the newly covered mutants are killed by in-process tests.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Why
make gatefails onmainand on #17. It fails on the hook and init code, which the tests exercise only in child processes. The gate's coverage run never measured those processes, so that code scored 2–10% covered with 94 uncovered mutation sites. Five functions also fail on complexity alone, since CRAP never drops below cyclomatic complexity.Stacked on #17 (
ub-ratchet-guard); merge that first.What
make gateruns coverage withpatch = ["subprocess"]and combines the data before writing LCOV. The settings live inscripts/gate-coverage.toml, notpyproject.toml, because plainub crapdoes not combine parallel data. Coverage is pinned to 7.17.4.ubimport the original code and every mutant survive. That first produced 93 false survivors.install_git,install_agent,initialize,terminate_check, andmanaged_blockare split into named steps under CRAP 10. Behavior is unchanged..ub/checkenvshebang--max-workersboundswrite_filemode repairVerification
make test: 161 tests pass.make gatelocally: