1361fb93149fd39c75aa092041f99f41f7735d1a
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d94492e306 |
refactor(branch): clear quality round 2 and tighten the held-branch code to Codacy
CI / quality (push) Skipped
CI / lint-python (push) Failing after 0s
CI / security-codeql (push) Waiting to run
CodeQL Advanced / Check security (none, actions) (push) Waiting to run
CI / test-unit (push) Waiting to run
CodeQL Advanced / Check security (none, python) (push) Waiting to run
CI / test-integration (push) Waiting to run
Test Units / test-unit (push) Waiting to run
CI / test-env-virtual (push) Waiting to run
Test Code Integration / test-integration (push) Waiting to run
CI / test-env-nix (push) Waiting to run
Test OS Containers / test-env-virtual (arch) (push) Waiting to run
CI / test-e2e (push) Waiting to run
CI / test-virgin-user (push) Waiting to run
Test OS Containers / test-env-virtual (centos) (push) Waiting to run
CI / test-virgin-root (push) Waiting to run
Test OS Containers / test-env-virtual (debian) (push) Waiting to run
CI / lint-shell (push) Waiting to run
Test OS Containers / test-env-virtual (fedora) (push) Waiting to run
CI / lint-docker (push) Waiting to run
Test OS Containers / test-env-virtual (ubuntu) (push) Waiting to run
Test Virgin Nix (flake only) / test-env-nix (arch) (push) Waiting to run
Test Virgin Nix (flake only) / test-env-nix (centos) (push) Waiting to run
Test Virgin Nix (flake only) / test-env-nix (debian) (push) Waiting to run
Test Virgin Nix (flake only) / test-env-nix (fedora) (push) Waiting to run
Test Virgin Nix (flake only) / test-env-nix (ubuntu) (push) Waiting to run
Test End-To-End / test-e2e (arch) (push) Waiting to run
Test End-To-End / test-e2e (centos) (push) Waiting to run
Test End-To-End / test-e2e (debian) (push) Waiting to run
Test End-To-End / test-e2e (fedora) (push) Waiting to run
Test End-To-End / test-e2e (ubuntu) (push) Waiting to run
Test Virgin User / test-virgin-user (arch) (push) Waiting to run
Test Virgin User / test-virgin-user (centos) (push) Waiting to run
Test Virgin User / test-virgin-user (debian) (push) Waiting to run
Test Virgin User / test-virgin-user (fedora) (push) Waiting to run
Test Virgin User / test-virgin-user (ubuntu) (push) Waiting to run
Test Virgin Root / test-virgin-root (arch) (push) Waiting to run
Test Virgin Root / test-virgin-root (centos) (push) Waiting to run
Test Virgin Root / test-virgin-root (debian) (push) Waiting to run
Test Virgin Root / test-virgin-root (fedora) (push) Waiting to run
Test Virgin Root / test-virgin-root (ubuntu) (push) Waiting to run
ShellCheck / lint-shell (push) Waiting to run
Ruff (Python code sniffer) / lint-python (push) Failing after 0s
Docker Linter / Lint Dockerfile (push) Waiting to run
Rename gc_refs.py to held.py, move the local-scope routing back into _actions so _build matches main, split _held_branches into _symref_holds and _state_file_holds, and move the ancestor check of _local_actions into _ancestor_action (Lizard CCN 9 > 8). Docstrings start their summary on the opening line (D212) and end with a blank line (D413). test_gc_held_once drops its parameter defaults, stops cloning test_branch_cleanup_local and calls git through shutil.which (Bandit B607). Kept on purpose, each contradicts another rule: D406/D407 numpy sections (AGENTS: Args: docstrings), D100 module docstrings (no prose docstrings), B404/B603 on test subprocess calls (silencing needs # nosec, which quality clean.tool-pragma forbids). | 🌿 Branch | 📊 Diff stat | 🎯 Fix | 💥 Break | 💸 Tokens | ⏱️ Velocity | 🛡️ Security | 🏆 Score | Gate | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | fix/branch-cleanup-held-once | 4 files +69/-57 | 90 % | 3 % | – | – | 100 % | 87 | ✅ 90/5, tokens and velocity <= 100, security 100 % | Refs: https://github.com/kevinveenbirkenbach/package-manager/pull/13 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
39843ab627 |
refactor(branch): move the held-branch reader to gc_refs and the held-once tests to a unit module
CI / security-codeql (push) Canceled after 0s
CI / test-unit (push) Canceled after 0s
CI / test-integration (push) Canceled after 0s
CI / test-env-virtual (push) Canceled after 0s
CI / test-env-nix (push) Canceled after 0s
CI / test-e2e (push) Canceled after 0s
CI / test-virgin-user (push) Canceled after 0s
CI / test-virgin-root (push) Canceled after 0s
CI / lint-shell (push) Canceled after 0s
CI / lint-python (push) Canceled after 0s
CI / lint-docker (push) Canceled after 0s
CI / quality (push) Canceled after 0s
The quality gate's ratchet flagged PR 13: gc.py and test_branch_cleanup_local.py grew past their already-oversized base length, and _actions gained a seventh parameter. The held-branch reader (_held_branches, _worktree_heads, _git_dirs, _symbolic, _common_dir, HELD_FILES) moves unchanged into gc_refs.py, so gc.py shrinks below its base; scope local is routed in _build, so _actions keeps six parameters; the held-once tests move into tests/unit/pkgmgr/actions/branch/test_gc_held_once.py and test_branch_cleanup_local.py is back to main plus one patch target. Mutating git calls stay on gc._git, so the gc.run spies still see them. 🎯 Fix: 90 % 💥 Break: 4 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 86 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e017af0cd1 |
perf(branch): read the held branches once per cleanup plan
branch cleanup --local reads the held-branches map lazily once per snapshot instead of once per item, so a plan reads it once and every apply-time re-check still reads it fresh; a branch held after the plan is still skipped. On a scratch repository with 60 merged branches and 101 git dirs the plan drops from 27.1 s to 2.3 s with a byte-identical JSON plan. Tests run once after the merge (operator order 2026-11-14). 🎯 Fix: 85 % 💥 Break: 3 % 💸 Tokens: 10 % ⏱️ Velocity: 5 % 🛡️ Security: 100 % 🏆 Score: 100 🚦 Gate: ⛔ fix 85 % < 90 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3936125633 |
fix(branch): cleanup --local keeps branches whose sibling upstream was deleted
A local branch whose upstream sibling was deleted on the remote counted as merged when its tip was reachable from the deleted ref's last known commit, so cleanup --local removed it although git branch -d would refuse. The plan now asks git itself for each candidate, in the same order the delete runs, and skips a branch git would not delete; the README states the rule. 🎯 Fix: 93 % 💥 Break: 3 % 💸 Cost: – ⏱️ Time: – 🛡️ Security: 100 % 🏆 Score: 90 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
0d88c69c51 |
feat(branch): cleanup --local deletes merged local branches only when git itself would
pkgmgr branch cleanup --local [--apply] [--json] [--merged-into REF] deletes local branches whose tip is an ancestor of the remote-tracking default or a --merged-into ref, each with update-ref against the planned sha. It keeps every branch git branch --delete-merged keeps: symbolic, checked out or registered in any worktree, under a rebase or bisect, deleteMerged=false in any worktree, system or global config, and the local upstream of any branch that stays. Git runs without inherited GIT_* variables except the ceiling; the keep reads run once with the caller's config variables and once with the default system and passwd-home config, so the environment can add keeps but never remove one. Repositories with symlinked refs, foreign worktree registrations or unreadable holds are refused with the plan still printed. MEDUSA: MEDUSA-OUTPUT-SQL-003 at branch_cmd.py:121 accepted after an independent review: the SQL comment+DELETE regex matched the help text --merged-into and the git key deleteMerged; no SQL in the change. 🎯 Fix: 92 % 💥 Break: 5 % 💸 Cost: 100 % ⏱️ Time: 100 % 🛡️ Security: 100 % 🏆 Score: 87 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |