Skip to content

V30 Gate 8: Protocol Telemetry And Proof Hooks#40

Merged
geraldarthurdavis merged 1 commit into
version/v30from
v30/gate-8-protocol-telemetry-proof-hooks
May 21, 2026
Merged

V30 Gate 8: Protocol Telemetry And Proof Hooks#40
geraldarthurdavis merged 1 commit into
version/v30from
v30/gate-8-protocol-telemetry-proof-hooks

Conversation

@geraldarthurdavis

Copy link
Copy Markdown
Contributor

Summary

  • adds package-owned BTD Protocol telemetry envelopes, source-safe telemetry records, and proof hooks for receipts, BTC fee states, ledger projections, source-to-shares proofs, and bridge-readiness posture
  • exposes the JSON-safe /btd/protocol-telemetry route boundary and thin Next route
  • updates V30 SPEC/DELTA/NOTES/PARITY, BTD/Terminal docs, package script, and gate-quality workflow for Gate 8

Proof

  • pnpm --filter @bitcode/btd typecheck
  • pnpm --filter @bitcode/btd test
  • pnpm --filter @bitcode/api build
  • pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/tests/btd-crypto.test.ts --runInBand
  • pnpm --dir uapi exec tsc --noEmit --pretty false
  • node scripts/check-v30-gate1-roadmap-and-gating.mjs --skip-branch-check through node scripts/check-v30-gate8-protocol-telemetry-proof-hooks.mjs
  • node scripts/check-bitcode-spec-family.mjs --version V30 --mode draft --current-target V29
  • node scripts/check-bitcode-canonical-inputs.mjs --current-target V29
  • node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V29 --draft-target V30
  • git diff --check
  • git diff --cached --check

Adds package-owned BTD protocol telemetry envelopes, source-safe telemetry records, and proof hooks for receipts, BTC fee states, ledger projections, source-to-shares proofs, and bridge-readiness posture.

Exposes the JSON-safe /btd/protocol-telemetry boundary, documents Terminal consumption and V30 spec parity, wires the Gate 8 checker into gate quality, and covers the slice with focused BTD/API tests.

Proof run: pnpm --filter @bitcode/btd typecheck; pnpm --filter @bitcode/btd test; pnpm --filter @bitcode/api build; pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/__tests__/btd-crypto.test.ts --runInBand; pnpm --dir uapi exec tsc --noEmit --pretty false; node scripts/check-v30-gate1-roadmap-and-gating.mjs --skip-branch-check through node scripts/check-v30-gate8-protocol-telemetry-proof-hooks.mjs; node scripts/check-bitcode-spec-family.mjs --version V30 --mode draft --current-target V29; node scripts/check-bitcode-canonical-inputs.mjs --current-target V29; node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V29 --draft-target V30; git diff --check; git diff --cached --check.
@vercel

vercel Bot commented May 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
engi-uapi Ready Ready Preview, Comment May 21, 2026 10:47pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0791894c1c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +389 to +391
for (const hook of proofHooks) {
if (!telemetryRoots.has(hook.telemetryRoot)) {
throw new Error('Protocol proof hook references a telemetryRoot not present in the envelope.');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate proof hook subject against referenced telemetry record

The envelope validation only checks that each proofHook.telemetryRoot exists in the telemetry set, but it never verifies that the hook’s subjectKind/subjectId matches the referenced telemetry record. This allows constructing an admitted envelope where a hook claims one subject while binding to a different subject’s telemetry root, which breaks the typed replay/proof guarantees and can produce incorrect proof-admission journal data.

Useful? React with 👍 / 👎.

Comment on lines +460 to +461
if (SENSITIVE_METADATA_KEYS.has(key)) {
throw new Error(`Protocol telemetry metadata key is not source-safe: ${key}.`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject sensitive metadata keys case-insensitively

Sensitive metadata key filtering is case-sensitive (SENSITIVE_METADATA_KEYS.has(key)), so keys like Secret, TOKEN, or PrivateKey bypass the blacklist. If their values do not match the regex patterns, these fields are accepted into source-safe telemetry even though they are semantically secret-bearing keys, which weakens the fail-closed source-safety contract.

Useful? React with 👍 / 👎.

@geraldarthurdavis
geraldarthurdavis merged commit 3d371cb into version/v30 May 21, 2026
30 checks passed
@geraldarthurdavis
geraldarthurdavis deleted the v30/gate-8-protocol-telemetry-proof-hooks branch May 21, 2026 22:59
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