You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extension scanner writes its cache into the installed package directory #23
In a read-only or root-owned site-packages (Docker images, system Python, Nix, some venvs), this write fails. The failure is downgraded to a warning, so it is easy to miss.
Environment
apflow 0.24.3 (main @ 479d578)
Evidence
src/apflow/core/extensions/scanner.py:81 — cache path under Path(__file__).parent
src/apflow/core/extensions/scanner.py:441-463 — write with warning-only failure handling
Impact
Scanner performance regresses silently on every process start.
Installed packages are mutated, which breaks immutable-image assumptions and can confuse package verification.
In containerized deployments, the warning is often hidden by log settings.
Proposed fix
Store the cache under a user/platform cache directory (platformdirs.user_cache_dir("apflow")) or an env-configured path (APFLOW_CACHE_DIR).
Validate writability and degrade explicitly (debug log), not with a warning storm.
Optionally allow disabling the cache.
Acceptance criteria
Scanner works with a read-only site-packages.
The cache location is documented and configurable.
A test simulates a read-only package directory.
Workaround
Pre-warm the cache in a writable image layer, or ignore the warning.
Activity