Skip to content

fix(ceremony): give a notarized request 30 seconds - #165

Merged
SupremaLex merged 1 commit into
mainfrom
fix/notary-request-timeout
Oct 23, 2026
Merged

SupremaLex merged 1 commit into
mainfrom
fix/notary-request-timeout

Conversation

@SupremaLex

Copy link
Copy Markdown
Member

Raises the ceremony's per-request notarization budget (REQUEST_TIMEOUT_MS in ts/packages/ceremony/src/notary/session.ts) from 10 s to 30 s.

Why

GitHub's identity request often takes longer than 10 s on a GitHub-hosted runner, and the ceremony then fails with "Notarization request timed out". The notary logs the cut-off as verification failed during zk execution … unexpected end of file at the moment the browser gives up.

Measured from the notary's "starting Proxy-TLS" to "attestation ready", with the budget raised so nothing was cut off:

Where GitHub identity request
GitHub-hosted runner, 5 runs 5.0–5.7, 10.0–10.4, 8.8–10.4, 5.4–5.8, 8.0–8.3 s
GitHub-hosted runner, 3 runs that failed at 10 s ~10.1–10.6 s
Developer laptop, 11 runs 5.0–5.8 s

Runners are bimodal (about 5–6 s or 8–10.6 s), consistent with different CPU types; the token and identity sessions prove at the same time on the same CPU. GitHub's response (2,902 bytes) is about twice X's, so GitHub crosses the limit first. A user's device can be slower than a runner.

30 s is about three times the slowest runner measurement.

Trade-off

The setup budget comment said both budgets together kept X's token request inside X's 30-second authorization-code deadline. With 30 s that deadline, not this budget, bounds X's token request: an exchange that slow fails with X's own error instead of a timeout. X's requests measured 2.5–4 s on runners.

Checks

  • vitest run src/notary/: 148 passed. The timeout test advances to the new budget.
  • pnpm typecheck, pnpm lint, pnpm fmt:check: pass.

The 10-second send-through-attestation budget fails GitHub's identity
request on GitHub-hosted runners about half the time: measured from the
notary's "starting Proxy-TLS" to "attestation ready", it took 5.0–10.6 s
across eight runner runs (bimodal: about 5–6 s or 8–10.6 s), against
5.0–5.8 s on a developer laptop. The token and identity sessions prove
at once on the same CPU, so a slower machine stretches both, and a
user's device can be slower than a runner.

30 s is about three times the slowest runner measurement. X's 30-second
code deadline, not this budget, now bounds X's token request; a token
exchange that slow fails with X's own error.

Assisted-by: Claude Opus 5.5
Signed-off-by: SupremaLex <georglutsenko@gmail.com>
@SupremaLex
SupremaLex merged commit f27c0a8 into main Oct 23, 2026
15 checks passed
@SupremaLex
SupremaLex deleted the fix/notary-request-timeout branch October 23, 2026 10:21
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.

2 participants