Skip to content

Hash committed blobs, reject unsigned fields, report coverage gaps (1.3.3) - #15

Merged
Rmasood1122 merged 2 commits into
mainfrom
fix/receipt-integrity
Nov 19, 2026
Merged

Rmasood1122 merged 2 commits into
mainfrom
fix/receipt-integrity

Conversation

@Rmasood1122

Copy link
Copy Markdown
Owner

Before: receipts hashed whatever was on disk at receipt time, so dirty, deleted or partly staged files were recorded wrong. A non-UTF-8 file silently dropped the receipt. Unsigned fields like _meta rode along and still verified. Deleting the newest receipts or amending history went unnoticed, and personal git settings changed the diff hash.

After: file hashes come from the committed blobs, and the diff is produced with pinned options. Unsigned fields fail verify and block extending the chain. Verify prints a COVERAGE line for commits without a receipt and a HISTORY line for receipts whose commit left history. The Action removes any planted key symlink and writes the key with umask 077.

How: core/receipt.py plus 14 tests in tests/test_integrity.py, each failing on 1.3.2. Suite 139 passed locally; claude plugin validate passes. Version 1.3.3; the README pins the Action at @v1.3.3, so a v1.3.3 tag is needed at release. The README now states that merge, cherry-pick, revert and scripted commits made inside Claude Code get no receipt.


Generated by Claude Code

Rmasood1122 and others added 2 commits November 19, 2026 16:48
….3.3)

- File hashes come from git's object store, not the working tree
  (dirty, deleted or partially staged files recorded wrong or no hashes).
- Non-UTF-8 diffs no longer crash receipt writing; diff_sha256 is computed
  over raw bytes with config-sensitive diff options pinned.
- Receipts carrying fields the canonical hash skips (_meta, _debug,
  prev_receipt_hash_verified) fail verify, report and chain extension.
- verify and report print a COVERAGE line: unreceipted commits since the
  first receipt (catches a deleted newest receipt) and receipts for
  commits no longer in history.
- CI action removes any .titan/key symlink and writes the key with umask 077;
  init creates the key owner-only.
- Manifest author email updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- test_hashes_are_over_gits_raw_utf8_bytes_on_every_platform compared the
  receipt to the working-tree file. Receipts now hash the committed blob, and
  with core.autocrlf the Windows checkout is CRLF while the blob is LF, so
  compare against git cat-file blob, the bytes every platform agrees on.
- test_external_diff_config_does_not_change_receipt put a Windows path into
  a bash command unquoted; use the existing posix() helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rmasood1122
Rmasood1122 merged commit 56c563f into main Nov 19, 2026
4 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.

1 participant