Skip to content

fix: fingerprint every file of a plugin directory for the cache key - #101

Merged
SizzleUnrlsd merged 4 commits into
mainfrom
fix/plugin-cache-fingerprint
Sep 21, 2026
Merged

SizzleUnrlsd merged 4 commits into
mainfrom
fix/plugin-cache-fingerprint

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Closes #94.

What

directory_fingerprint hashed .py and .toml files only. A plugin shipping rules or advisories as .json/.yaml could change without invalidating the cache: stale findings served silently.

  • Every regular file of a plugin directory now takes part in the key; __pycache__ and hidden files are skipped.
  • Files are hashed as bytes, so binary data files count too.
  • The suffixes parameter is gone; its only caller used the default.

Tests

test_keys_depend_on_every_plugin_file: adding a .json next to a plugin changes every module key; adding bytecode under __pycache__ does not.

Full suite: 890 passed. ruff check and mypy src clean.

Docs

Usage guide lists plugin files among what the key covers; changelog entry under Unreleased.

directory_fingerprint hashed .py and .toml files only, so a plugin that ships
its rules or advisories as .json or .yaml could change without invalidating
cached results. Every regular file now takes part, except bytecode and hidden
files.

Closes #94
@SizzleUnrlsd
SizzleUnrlsd merged commit a72b281 into main Sep 21, 2026
5 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the fix/plugin-cache-fingerprint branch September 21, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache: fingerprint every file of a plugin directory, not only .py and .toml

1 participant