diff --git a/CHANGELOG.md b/CHANGELOG.md index 20a511b..4b1715e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.16.1] - 2026-07-29 + +* *pkgmgr repos create* now creates *main*-based repositories: *git init* is run with an explicit *-b main* instead of inheriting the host's *init.defaultBranch*, and a failed initial push no longer renames the branch back to *master*. *resolve_base_branch()* keeps its main → master fallback for existing repositories. +* Failures are no longer swallowed: 46 blind *except Exception* handlers were narrowed to the exception types the guarded code can actually raise (*OSError*, *UnicodeDecodeError*, TOML/YAML decode errors, *ValueError*, *ImportError*, *subprocess.SubprocessError*, *GitRunError*, *PackageNotFoundError*). Three handlers stay open by design — the per-repository loops in *install* and *update* are batch boundaries where one failing repository must not abort the run. +* Keyring backend errors now surface as the concrete *KeyringOperationError*, raised at the boundary in *KeyringTokenProvider.get/set* with the original exception preserved as *__cause__*, and kept distinct from *KeyringUnavailableError* ("no usable backend" vs. "backend present, call failed"). Both degradation paths are unchanged. +* The *code-scanning* report stamps *generated_at* and its fallback output directory in UTC instead of a naive local timestamp. +* New *make lint* target runs *ruff* on *src* and *tests* with the same invocation as the *lint-python* workflow, and *make test* now depends on it. Repository-wide formatting and typing modernisation (PEP 604 unions with *from __future__ import annotations*, builtin generics, shebangs stripped from 72 importable modules) — *ruff check src tests* passes. +* New *tests/integration/test_error_path_degradation.py* drives 44 of the narrowed handlers into their except branch with real injected faults and asserts the documented degradation. + ## [1.16.0] - 2026-06-28 * New *code-scanning* command: *pkgmgr code-scanning* downloads a repository's GitHub code scanning alerts and analysis metadata via the *gh* CLI into a timestamped directory (default */tmp//code-scanner/*), together with a readable summary, for offline analysis. diff --git a/flake.nix b/flake.nix index 9cfa4cd..d5fb3cc 100644 --- a/flake.nix +++ b/flake.nix @@ -32,7 +32,7 @@ rec { pkgmgr = pyPkgs.buildPythonApplication { pname = "package-manager"; - version = "1.16.0"; + version = "1.16.1"; # Use the git repo as source src = ./.; diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD index 745baa9..5c95cca 100644 --- a/packaging/arch/PKGBUILD +++ b/packaging/arch/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Kevin Veen-Birkenbach pkgname=package-manager -pkgver=1.16.0 +pkgver=1.16.1 pkgrel=1 pkgdesc="Local-flake wrapper for Kevin's package-manager (Nix-based)." arch=('any') diff --git a/packaging/debian/changelog b/packaging/debian/changelog index e4b6c0e..d7bddeb 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,14 @@ +package-manager (1.16.1-1) unstable; urgency=medium + + * *pkgmgr repos create* now creates *main*-based repositories: *git init* is run with an explicit *-b main* instead of inheriting the host's *init.defaultBranch*, and a failed initial push no longer renames the branch back to *master*. *resolve_base_branch()* keeps its main → master fallback for existing repositories. + * Failures are no longer swallowed: 46 blind *except Exception* handlers were narrowed to the exception types the guarded code can actually raise (*OSError*, *UnicodeDecodeError*, TOML/YAML decode errors, *ValueError*, *ImportError*, *subprocess.SubprocessError*, *GitRunError*, *PackageNotFoundError*). Three handlers stay open by design — the per-repository loops in *install* and *update* are batch boundaries where one failing repository must not abort the run. + * Keyring backend errors now surface as the concrete *KeyringOperationError*, raised at the boundary in *KeyringTokenProvider.get/set* with the original exception preserved as *__cause__*, and kept distinct from *KeyringUnavailableError* ("no usable backend" vs. "backend present, call failed"). Both degradation paths are unchanged. + * The *code-scanning* report stamps *generated_at* and its fallback output directory in UTC instead of a naive local timestamp. + * New *make lint* target runs *ruff* on *src* and *tests* with the same invocation as the *lint-python* workflow, and *make test* now depends on it. Repository-wide formatting and typing modernisation (PEP 604 unions with *from __future__ import annotations*, builtin generics, shebangs stripped from 72 importable modules) — *ruff check src tests* passes. + * New *tests/integration/test_error_path_degradation.py* drives 44 of the narrowed handlers into their except branch with real injected faults and asserts the documented degradation. + + -- Kevin Veen-Birkenbach Wed, 29 Jul 2026 16:41:21 +0200 + package-manager (1.16.0-1) unstable; urgency=medium * New *code-scanning* command: *pkgmgr code-scanning* downloads a repository's GitHub code scanning alerts and analysis metadata via the *gh* CLI into a timestamped directory (default */tmp//code-scanner/*), together with a readable summary, for offline analysis. diff --git a/packaging/fedora/package-manager.spec b/packaging/fedora/package-manager.spec index 7cd2675..e8bc523 100644 --- a/packaging/fedora/package-manager.spec +++ b/packaging/fedora/package-manager.spec @@ -1,5 +1,5 @@ Name: package-manager -Version: 1.16.0 +Version: 1.16.1 Release: 1%{?dist} Summary: Wrapper that runs Kevin's package-manager via Nix flake @@ -74,6 +74,14 @@ echo ">>> package-manager removed. Nix itself was not removed." /usr/lib/package-manager/ %changelog +* Wed Jul 29 2026 Kevin Veen-Birkenbach - 1.16.1-1 +- * *pkgmgr repos create* now creates *main*-based repositories: *git init* is run with an explicit *-b main* instead of inheriting the host's *init.defaultBranch*, and a failed initial push no longer renames the branch back to *master*. *resolve_base_branch()* keeps its main → master fallback for existing repositories. +- * Failures are no longer swallowed: 46 blind *except Exception* handlers were narrowed to the exception types the guarded code can actually raise (*OSError*, *UnicodeDecodeError*, TOML/YAML decode errors, *ValueError*, *ImportError*, *subprocess.SubprocessError*, *GitRunError*, *PackageNotFoundError*). Three handlers stay open by design — the per-repository loops in *install* and *update* are batch boundaries where one failing repository must not abort the run. +- * Keyring backend errors now surface as the concrete *KeyringOperationError*, raised at the boundary in *KeyringTokenProvider.get/set* with the original exception preserved as *__cause__*, and kept distinct from *KeyringUnavailableError* ("no usable backend" vs. "backend present, call failed"). Both degradation paths are unchanged. +- * The *code-scanning* report stamps *generated_at* and its fallback output directory in UTC instead of a naive local timestamp. +- * New *make lint* target runs *ruff* on *src* and *tests* with the same invocation as the *lint-python* workflow, and *make test* now depends on it. Repository-wide formatting and typing modernisation (PEP 604 unions with *from __future__ import annotations*, builtin generics, shebangs stripped from 72 importable modules) — *ruff check src tests* passes. +- * New *tests/integration/test_error_path_degradation.py* drives 44 of the narrowed handlers into their except branch with real injected faults and asserts the documented degradation. + * Sun Jun 28 2026 Kevin Veen-Birkenbach - 1.16.0-1 - * New *code-scanning* command: *pkgmgr code-scanning* downloads a repository's GitHub code scanning alerts and analysis metadata via the *gh* CLI into a timestamped directory (default */tmp//code-scanner/*), together with a readable summary, for offline analysis. - * The release flow now lints and normalises the changelog message before writing it: a leading heading becomes bold, inline code becomes italic, and the entry is validated against the repository's markdown rules, re-prompting interactively until it is clean. diff --git a/pyproject.toml b/pyproject.toml index 194c642..ea8f357 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" [project] name = "kpmx" -version = "1.16.0" +version = "1.16.1" description = "Kevin's package-manager tool (pkgmgr)" readme = "README.md" requires-python = ">=3.9"