Skip to content

Thread drop-down: reasoning + hash-linked, sealed receipt (not signed), fail closed - #104

Merged
AzielEliab merged 1 commit into
mainfrom
fix/thread-expand-receipt
Oct 11, 2026
Merged

AzielEliab merged 1 commit into
mainfrom
fix/thread-expand-receipt

Conversation

@AzielEliab

Copy link
Copy Markdown
Owner

Root cause: prior-receipt rows on / and /receipts had no drop-down. priorReceiptItems rendered only a preview and a link, so there was nothing to expand and no request was made. /receipt/:id?format=json already returns summary and explanation (200).

Changes:

  • Each row is now <details class="thread">. The first expand fetches /receipt/:id?format=json and renders summary and reasoning (the stored TRIAD_V3 explanation, no model text, nothing invented) plus the receipt: status, receipt hash, prev hash, seal, timestamp, and a /verify link.
  • New src/receiptProof.js: recomputes every ledger entry hash and link from genesis. Status is verified only if the whole chain verifies. The seal is the verified ledger head. missing or unverified shows no seal (fails closed). Hash-linked and sealed, not signed.
  • The JSON receipt response gains proof.
  • Tests: thread-expand.test.mjs (tamper, missing, fetch failure, no-seal downgrade, script parses). 275/275 pass.

Not merged, not deployed. Note: the proof scans the full ledger on each expand, the same cost as the existing ledgerEntriesForId.

@AzielEliab
AzielEliab merged commit a7bc992 into main Oct 11, 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.

1 participant