Skip to content

Add task fingerprint audit tool#231

Open
gyx09212214-prog wants to merge 1 commit into
QF-Bench:mainfrom
gyx09212214-prog:add-task-fingerprint-tool
Open

Add task fingerprint audit tool#231
gyx09212214-prog wants to merge 1 commit into
QF-Bench:mainfrom
gyx09212214-prog:add-task-fingerprint-tool

Conversation

@gyx09212214-prog

Copy link
Copy Markdown

Summary

  • add tools/task_fingerprint.py to generate a deterministic SHA-256 manifest for a task directory
  • include per-file hashes, file sizes, and an aggregate task snapshot hash
  • add tests covering stable ordering, cache-file exclusion, and CLI JSON output
  • document how to use the manifest when debugging stale task specs or data snapshots

Why

Recent stale-checkout investigations, such as #226, depend on proving that the instruction, tests, and data seen by an agent match the verifier snapshot. This utility gives harness operators a small repo-native way to record that snapshot before a sweep and compare it later without changing any canonical task specs.

Validation

  • python -m pytest tests\test_task_fingerprint.py -q
  • python tools\task_fingerprint.py tasks\13f-amendment-aware-crowding --indent 0 | python -c "import json,sys; d=json.load(sys.stdin); print(d['task_name'], d['file_count'], len(d['aggregate_sha256']))"
  • python -m py_compile tools\task_fingerprint.py tests\test_task_fingerprint.py
  • python -m ruff check tools\task_fingerprint.py tests\test_task_fingerprint.py
  • git diff --check (only Windows line-ending warnings)

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.

1 participant