TL;DR
Sixteen commits since v0.9.0 rewire repo discovery to use pacman -Sl + pacman -Q instead of the broken pacman -Q --repo path, replace AUR RPC calls with a local metadata-dump snapshot for trustsight review, split repo warnings into "does not exist" vs "exists but no packages", add a first-run sentinel to suppress duplicate messages, drop Python 3.10 (stdlib tomllib everywhere), and add optdepends for python-cryptography and pyalpm.
Changed
get_installed_from_repo()rewired frompacman -Q --repo(which missed packages not tracked as repo-origin) topacman -Sl <repo>+pacman -Q. The old approach only found packages whosepacman -Qshows an explicit repository name; the new one lists the repo's contents via-Sland cross-references with-Q.- Discovery for
reviewreplaced AUR RPC calls with the local metadata-dump snapshot (full-aur-meta.json, fromfull_aur/metadata.py). Installed versions are compared against snapshot versions viavercmpinstead of per-package AUR RPCinfoqueries. Falls back to the RPC on failure. - Repo warnings split into two distinct messages:
repo 'X' does not exist(whenpacman -Slfails) andrepo 'X' exists but no packages from it are installed(when the repo exists but-Qfinds nothing). _get_installed_packages()now correctly cross-references repo packages and foreign packages, respecting--repo,--foreign, and--all-reposflags. Previous implementation only collected foreign packages when a repo was specified.- First-run sentinel.
_discover_packages()returns(None, 0)on the first metadata fetch so thatreview()does not emit a duplicate "No outdated packages found" message. - Python >=3.11 required.
requires-pythonbumped from>=3.10to>=3.11. Thetomlicompat shim (src/trustsight/_toml.py) and its conditional dependency inpyproject.tomlare removed. All imports use stdlibtomllib. - CI matrix drops Python 3.10.
Added
- Regression tests for metadata-dispatch bugs (first-run sentinel, repo warnings in metadata path, cross-referencing repos, deduplication). 7 new tests in
tests/test_cli.py. optdependsforpython-cryptographyandpyalpminpackaging/aur/PKGBUILD.- Line mapping for findings.
map_diff_lines()maps diff line indices to file names and line numbers. Findings fromapply_rules()now carryfile/linecontext propagated throughScoreEntryandPackageFact. - Per-file change tracking.
DiffSummary.file_changeslists every changed file with its status (added/removed/modified), excluding.SRCINFOand.gitignore. - Corpus analysis adapter.
analyze_package_text()analyzes raw old/new PKGBUILD text viadifflib.unified_diff, enabling the full-AUR corpus pipeline (no git repository required).
Fixed
- All 3 namcap warnings resolved by removing the
tomlidependency and addingoptdepends.
Removed
watchcommand. Removed in favour of runningtrustsight baseline buildvia cron. Thebaseline buildcommand already handles incremental updates (diff + process changed) when a prior metadata snapshot exists. Use--jsonfor machine-parseable cron output.src/trustsight/_toml.pyremoved along with thetomlifallback for Python 3.10.
Stats
- 38 files changed, +923 / -312
- 734 tests (19 files), all passing
- Package version 0.10.0