feat(check): dependency-aware staleness - #126
Merged
Merged
Conversation
A stamp on auth.py is a claim about auth.py as it behaved with the modules it imports. Now: - stamp_file records content hashes of first-degree local imports (Python files; stdlib/site-packages ignored) in unit.meta['deps'] - akf check flips STALE reason=dependency_changed when any recorded dependency's content no longer matches — even though the stamped file's own bytes never moved Conservative scope per the issue discussion: first-degree only, local-file resolution only. Credit: Dipankar Sarkar (dev.to).
AKF Trust Certification — ✅ Certified❌ 0/11 files certified · average trust 0.45 · 3 failed
Total: 11 | Certified: 0 | Failed: 3 | Skipped: 8
|
This was referenced Jul 4, 2026
This was referenced Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #124.
What
akf checkstaleness was per-file: stampauth.pygreen, change a helper it imports, and the stamp stayedOKwhile the thing it verified was no longer true.Now:
stamp_filerecords content hashes of the file's first-degree local imports (newpython/akf/deps.py: AST-based, resolves same-dir and package-relative modules; stdlib/site-packages ignored) intounit.meta["deps"]akf checkverifies those hashes and flipsSTALE reason=dependency_changedwhen any dependency moved — even though the stamped file's own bytes are unchangedDeliberately conservative per the issue discussion: first-degree only (full closure is expensive), local files only. Deleted/unreadable deps count as changed.
Testing
Credit: Dipankar Sarkar, who spotted the gap on the launch post.