Skip to content

feat(fe): View proof, the evidence behind the verified badge (#254) - #259

Merged
Lexirieru merged 6 commits into
mainfrom
feat/fe-view-proof
Nov 11, 2026
Merged

Lexirieru merged 6 commits into
mainfrom
feat/fe-view-proof

Conversation

@AncungAulia

Copy link
Copy Markdown
Contributor

@Lexirieru The FE side of #254, on top of your #256 and James's #257. Merged with main d9c1621 (after #255, #257 and #258).

View proof

The verified badge's popover has a "View proof" button. It opens a dialog (a drawer on phones) that reads GET /runs/{runId}/proof when it opens. The dialog uses the last entry, which is the reply's. It has three sections, plain words first:

  • Signed inside the TEE: each step's signer is checked against its attestation's signer (checkedSteps, case-insensitive). The dialog notes that only hashes were signed.
  • Hardware checked:
  • Check it yourself: copy the Intel quote or the whole proof, plus links to TEE Explorer and NEAR AI's verifier. Raw quotes and signatures are only copied, never laid out on screen.

404 no_proof (replies from before #256) says no proof was kept. Types and helpers are in runs/data/proof.ts.

Also

Tests (local, merged with main)

  • bun run lint, bun run typecheck: pass.
  • bun run test: 269/269. New: signer matching, the reply's entry, and Intel's status in words.
  • bun run build: pass.
  • Not run: integration and load tests (the FE has none).
  • Checked in Chrome against the hosted API:
    • Ancung: a new reply's proof (2 steps signed by 40599f…ad4acb, Intel TDX up to date).
    • Older reply: the no-proof case.
    • Phone width (375 px): the Telegram drawer's title is whole.
    • The popover's single row of actions.

🤖 Generated with Claude Code

AncungAulia and others added 5 commits November 11, 2026 15:49
)

The engine keeps the proof on `run.verified` (#256) and the backend serves it on
`GET /runs/{runId}/proof` (#257, live on the hosted API: it answered 404 no_proof for an older
reply). The badge's popover gets "View proof", which opens a dialog in plain words first:
- Signed inside the TEE: each step's signer checked against its attestation's signer.
- Hardware checked: Intel TDX's status in words, NVIDIA's GPU evidence only where it exists
  (a streamed chat reply is gateway-level, Intel only), the nonce and when it was checked.
- Check it yourself: copy the Intel quote or the whole proof, TEE Explorer, NEAR AI's verifier.
Raw quotes and signatures are only copied, never laid out. A reply from before #256 says no proof
was kept. The popover no longer says NVIDIA checked a gateway-level reply, which it didn't.

Tests: typecheck, lint, vitest 269/269 (new: signer matching, the reply's entry, Intel's status
in words). Checked in Chrome: the popover with View proof, the dialog's no-proof case on the
hosted API. Not checked yet: a reply that carries a proof.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ancung, 11 Nov: on a phone, "The proof behind this reply" showed as "'he proof"; "Connect
Telegram" lost the edge of its "C" too. A drawer's content sits in an inner element that clips
(overflow-hidden), and its side padding was on the outer popup, so the clip edge was exactly where
text began and a letter that leans left past its box was cut. The side padding now lives inside
that element (`ResponsiveDialog`, "Add a block").

Tests: typecheck, lint, vitest 269/269. Checked in Chrome at 375 px: the Telegram drawer's title
is whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ancung, 11 Nov: View proof, "How it's verified" and "Check it yourself" stacked as a button and
two links read as clutter. One row now: View proof at the left, "How it's verified" at the right,
no divider. "Check it yourself" is in the proof dialog already (the verifier and TEE Explorer), so
the popover shows it only for a reply without a run id.

Tests: typecheck, lint, vitest 269/269. Checked in Chrome: one row, nothing overlapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o feat/fe-view-proof

# Conflicts:
#	apps/fe/CLAUDE.md
#	apps/fe/src/modules/runs/components/VerifiedBadge.tsx
@Lin1er

Lin1er commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Backend side checked against #257 and docs/api-contract.md. It matches:

  • GET /runs/{runId}/proof through chatApi.runProof, with the same RunProofs shape the backend sends ({ runId, proofs: [{ seq, model, level, proof }] }).
  • replyProof takes proofs.at(-1), the reply's part for a run paused for approval.
  • No retry on no_proof or run_not_found, and no_proof gets its own message. Those are the only two 404 codes the route returns.
  • checkedSteps compares each step's signer with its attestation's signer, the same check I ran live on 56218ad: 2 steps, both matched, UpToDate, 10,012-character quote.

One small typing note, not a blocker: the backend sends model: null and level: null if a run.verified ever lacks them (runProofs maps missing fields to null). Every real one carries both, so it's only the type: model: string | null would be exact.

CI build passes. Nothing else from the backend side.

…them

James on #259: the backend's `runProofs` sends `model: null` and `level: null` when a stored
`run.verified` lacks them. Every real one carries both, but the type now says so, and the dialog
leaves out the model line when there is none instead of calling `split` on null.

Tests: typecheck, lint, vitest 269/269.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Lin1er

Lin1er commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Re-checked e81d614: model and level are now string | null, and the dialog leaves out the "Model:" part when model is null. That matches what runProofs sends. CI build passes. Nothing more from the backend side.

@Lexirieru
Lexirieru merged commit 6374685 into main Nov 11, 2026
1 check passed
@Lexirieru

Copy link
Copy Markdown
Contributor

Tested and merged, thanks @AncungAulia. Merged with main locally first: lint, typecheck, vitest 270/270, next build; CI green. Read the claims: a gateway attestation shows the Intel TDX report only, "NVIDIA GPU evidence" appears only when gpuEvidence is present, steps say Gateway vs Model step from signatureKind. That matches what the engine proves (#256) and @Lin1er's /proof (#257). Closes #254 with this.

🤖 Generated with Claude Code

@Lin1er

Lin1er commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Live on the hosted demo: main 50ca4d5 (the automatic deploy after #263, which includes this PR).

  • GET /v1/health → {"ok":true,"engine":true,"revision":"50ca4d5"}.
  • hellonear-be, hellonear-engine, hellonear-fe active; 0 http error since the deploy.
  • Try-out end to end: 22/22, payment tx 4CYVa1d4DMHRhRReUxZe7UHPFJiYFZi1dRGGyGjdWgxi.
  • https://app.hellonear.xyz answers 200.

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.

3 participants