test(coverage): expand test suite coverage to 80% and harden error boundaries - #79
Merged
JacksonFergusonDev merged 6 commits intoAug 22, 2026
Merged
Conversation
…, reachability, and locks
…status, logs, config, and pause state
…egy factory, and registry
JacksonFergusonDev
deleted the
test/expand-test-coverage-and-robustness
branch
August 22, 2026 01:37
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
This PR significantly expands the Tier 1 test suite from 99 tests (65.74% coverage) to 156 tests (79.64% branch coverage).
Additionally, the test coverage threshold (
fail_under) inpyproject.tomlhas been raised from60to75to protect against future coverage regression.Detailed Changes by Module
1.
test_git_wrapper.py(+7 tests, 86% coverage)GitReporaisesValueErroron non-repositories and translatesCalledProcessErrortoRuntimeErrorwith stderr context.old_oid, re-raising onupdate_reffailure, andcommit_treeerror handling.merge_squashno-op on empty branches andcheckoutforce flag handling.2.
test_daemon.py(+13 tests, 81% coverage)_should_skipunder critical battery, high system load, missing paths, and paused repos._attempt_pushskipping in eco-mode and when remote endpoints are unreachable.get_remote_host, TCP reachability inis_remote_reachable, and operational/stale lock detection inis_repo_busy.run_maintenance.3.
test_ops.py(+15 tests, 82% coverage)prune_backupsdeleting stale backup references and runninggit gc --auto.add_ignoreappending to.gitignore, skipping duplicates, respectingmanage_gitignore=False, and prompting to untrack matching files.sync_sessionwhen disabled, when up to date, and on user decline. Addedrestore_filefailure exits and force overwrite handling.4.
test_cli.py(+15 tests, 76% coverage)list_repos(missing, paused, empty registry) andunregister_repo(clean removal, unlisted path warning, empty registry).show_diffoutside a git repo and with untracked files,_check_repo_healthpaused states and missing backups, andshow_statuson unregistered repos.set_pause_statecreating and unlinking thepulsar_pausedsentinel.5.
test_system.py(+5 tests, 73% coverage)is_under_loadCPU load ratio thresholding,pmsetbattery parsing on macOS, sysfs battery capacity/status parsing on Linux, and theget_systemfactory function.6. Configuration & Documentation
pyproject.toml: Raisedfail_underto75.tests/README.md: Updated documentation to reflect the expanded testing matrix.Verification
just ciran locally: all 156 unit tests passed, all linting/formatting/typechecks passed, and Tier 2 distributed sandbox passed cleanly.