Skip to content

feat: hotato candidate -- measured candidate-identity binding (honest Candidate Revision proof)#39

Merged
quantumCF merged 2 commits into
mainfrom
candidate-binding
Jul 23, 2026
Merged

feat: hotato candidate -- measured candidate-identity binding (honest Candidate Revision proof)#39
quantumCF merged 2 commits into
mainfrom
candidate-binding

Conversation

@quantumCF

Copy link
Copy Markdown
Contributor

Closes the audit's candidate-bound-proof-path engineering gap (hermetic half).

Problem: hotato prove --candidate-config-hash X --provider vapi claimed the strongest scope (Candidate Revision) on an operator-ASSERTED string; nothing verified it against the real config.

Fix — a measured binding:

  • candidate hash --provider vapi --assistant <id>: fetch the assistant config, canonicalize (strip volatile id/timestamps, keep semantic fields), print a deterministic sha256 content hash.
  • candidate verify --expect <hash>: re-fetch after the run, refuse (exit 1) on drift, so a Candidate Revision proof cannot survive a swapped candidate.

The hash is a measured binding of the configuration, not runner authentication (evidence_authority stays measured). Pure logic is stdlib-only + hermetic; the single network fetch reuses capture.py's SSRF-guarded path. Live call placement stays operator-gated. Verified: volatile noise -> identical hash, semantic change -> different hash; 19 candidate tests, adversarially confirmed. Full gate green (4762). No version bump.

https://claude.ai/code/session_01BqJW5Dey1DzqBeBCAJXrH9

The strongest proof scope, Candidate Revision, previously elevated on an
operator-ASSERTED --candidate-config-hash string: nothing verified it against
the real config. hotato candidate closes that:
- candidate hash --provider vapi --assistant <id> fetches the assistant config,
  canonicalizes it (strips volatile id/orgId/createdAt/updatedAt recursively,
  keeps the semantic fields), and prints a deterministic sha256 content hash.
- candidate verify --expect <hash> re-fetches after the run and refuses (exit 1)
  on drift, so a Candidate Revision proof cannot survive a swapped candidate.
The hash is a MEASURED binding of the configuration, not runner authentication
(evidence_authority stays measured). Pure canonicalize/hash logic is stdlib-only
and fully hermetic-testable; the single network fetch reuses capture.py's
SSRF-guarded, credential-safe HTTP path. Live call placement stays operator-
gated (drive). Verified: volatile noise -> identical hash, semantic change ->
different hash; 19 candidate tests, adversarially confirmed. No version bump.

Closes the audit's candidate-bound-proof-path engineering gap (hermetic half).

Claude-Session: https://claude.ai/code/session_01BqJW5Dey1DzqBeBCAJXrH9
…ety)

The candidate verify example used --expect sha256:<hash>; a bare < reads as a
shell redirect, failing test_all_help_epilogs_are_paste_safe. Quote it as
--expect 'sha256:THE_HASH' like the repo's other paste-safe examples.
@github-actions

Copy link
Copy Markdown

hotato turn-taking eval

8 of 8 scenarios pass. 0 fail. No regression.

scenario expect yielded time to yield talk over result
01-hard-interruption yield yes 0.50s 0.50s pass
02-backchannel-mhm hold no - 1.57s pass
03-filler-start yield yes 0.65s 0.56s pass
04-correction yield yes 0.50s 0.50s pass
05-telephony-8khz yield yes 0.50s 0.50s pass
06-double-talk yield yes 1.05s 1.05s pass
07-echo-bleed hold no - 3.00s pass
08-rapid-turn-taking yield yes 0.50s 0.50s pass

Regressions

None.

Reproducible timing measured locally from call audio. Swap the bundled self-test step for your own captured recordings to gate on your agent. github.com/attenlabs/hotato

@quantumCF
quantumCF merged commit ead595a into main Jul 23, 2026
15 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