Skip to content

fix: harden advisory receipt verification - #57

Merged
jhuang-tw merged 8 commits into
mainfrom
fix/receipt-consistency-verification
Aug 5, 2026
Merged

fix: harden advisory receipt verification#57
jhuang-tw merged 8 commits into
mainfrom
fix/receipt-consistency-verification

Conversation

@jhuang-tw

Copy link
Copy Markdown
Owner

Summary

Harden the standalone djobs advisory host contract so receipt verification checks the full response/receipt consistency boundary instead of accepting an output-hash match alone.

Changes

  • add a dedicated receipt consistency verifier shared by the Python API, djobs-contract CLI, and advisory MCP server
  • verify request ID, query fingerprint, provider contract/version/build, repository fingerprint/HEAD, budget, counts, rejection reasons, truncation state, schema, operation, and advisory authority fields
  • preserve djobs.host_contract.verify_receipt_payload as a compatibility wrapper
  • return explicit checks and failed_checks while remaining fail-open with continue_workflow=true
  • document that SHA-256 provides integrity and internal consistency, not producer authentication or signature assurance
  • add regression coverage for receipt-only metadata tampering and rehashed-body inconsistencies

Safety boundary

This change is standalone to jhuang-tw/djobs. It does not touch DevSpace or any external workflow implementation. It adds no database writes, task claims, status changes, leases, scheduling, worktrees, checkpoint, or handoff behavior.

Validation

The repository CI and Source Export workflows should validate the exact PR head across lint, mypy, Python 3.10–3.14, package builds, PostgreSQL, VS Code extension, and installed-wheel smoke tests on Ubuntu, macOS, and Windows.

@jhuang-tw
jhuang-tw merged commit 49fd196 into main Aug 5, 2026
14 checks passed
@jhuang-tw
jhuang-tw deleted the fix/receipt-consistency-verification branch August 5, 2026 12:27
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