Skip to content

feat(memory-bank): store git commit hash per run - #14

Merged
vsn411 merged 1 commit into
secfoo-com:mainfrom
Melwinjoel20:feature/memory-bank-commit-tracking
Sep 23, 2026
Merged

vsn411 merged 1 commit into
secfoo-com:mainfrom
Melwinjoel20:feature/memory-bank-commit-tracking

Conversation

@Melwinjoel20

@Melwinjoel20 Melwinjoel20 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Stores the git HEAD commit SHA (target_commit) on every run as the foundation for the Memory Bank initiative. With the commit hash persisted, future runs can compute git diff .. and send only changed files to the LLM instead of the full codebase thus reducing token cost and scan time for repeat scans.

Changes

schema.sql — added target_commit TEXT column to the runs table
repository.py — added migration, complete_run() parameter, and SQL UPDATE
models.py — added target_commit field to RunRecord
runner.py — added _git_head_commit() helper to read HEAD via git rev-parse, captures it after each scan and persists it

Notes

Returns NULL for non-git targets (bare directories, zip uploads) no impact on existing behaviour
Verified end-to-end: SHA visible in the runs table after a successful scan

@vsn411
vsn411 merged commit 035a6e1 into secfoo-com:main Sep 23, 2026
2 checks passed
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.

2 participants