feat: Triptyque de la Preuve — 3 levels of watermark#4
Merged
Conversation
Level 1 (Digital Stamp): inject _arkforge_attestation into JSON response
body after hashing — chain hash integrity unaffected.
Level 2 (Ghost Stamp): 4 X-ArkForge-* HTTP headers on every proxy
response (Proof, Verified, Proof-ID, Trust-Link).
Level 3 (Visual Stamp): content negotiation on GET /v1/proof/{id} —
Accept: text/html serves a self-contained HTML proof page with colored
badge (green/orange/red). JSON remains default for backward compat.
Short URL: GET /v/{proof_id} → 302 redirect to full proof endpoint.
22 new tests, 96/96 passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_arkforge_attestationinto JSON response body (after hashing — chain hash unaffected)X-ArkForge-*HTTP headers on every proxy response (Proof, Verified, Proof-ID, Trust-Link)GET /v1/proof/{id}—Accept: text/htmlserves a self-contained HTML proof page with colored badge (green/orange/red). JSON remains default for backward compatGET /v/{proof_id}→ 302 redirect to full proof endpointFiles changed
trust_layer/templates.pyrender_proof_page,_escanti-XSS)trust_layer/proxy.py_inject_digital_stamp()+ call in success pathtrust_layer/app.py/v/{id}short URLtests/conftest.pyTRUST_LAYER_BASE_URLon app moduletests/test_triptyque.pyWhat does NOT change
verify_proof_integrity()logicX-ArkForge-Proofheader (backward compat preserved)Test plan
pytest tests/ -v)curl POST /v1/proxy→ verify_arkforge_attestationin response bodyX-ArkForge-*headers in proxy response/v1/proof/{id}withAccept: text/html→ HTML page with badgecurl GET /v1/proof/{id}(no Accept) → JSON unchangedGET /v/{id}→ 302 redirect🤖 Generated with Claude Code