test: the live ceremony suite, with a notary of its own - #12
Draft
SupremaLex wants to merge 3 commits into
Draft
SupremaLex wants to merge 3 commits into
SupremaLex wants to merge 3 commits into
Conversation
SupremaLex
force-pushed
the
feat/callback-artifact-retrieval
branch
from
September 14, 2026 12:04
daebcf3 to
14bbdb2
Compare
SupremaLex
force-pushed
the
feat/live-ceremony-tests
branch
from
September 14, 2026 12:04
de77edd to
f4d0158
Compare
SupremaLex
changed the base branch from
feat/callback-artifact-retrieval
to
feat/ceremony-github-token
September 14, 2026 13:18
SupremaLex
force-pushed
the
feat/live-ceremony-tests
branch
7 times, most recently
from
September 16, 2026 10:09
96f4001 to
5023921
Compare
Behind `--features live-ceremony`, `tests/ceremony` runs the real binary on a configuration file, reads `/config` from it as an application would, and runs the notarized sessions of the GitHub and X ceremonies with a prover of its own through an in-process notary built from `libid-tlsn`. Each record is checked against the rules the Platform Verifier applies: exact coverage, the request revealed whole, the bearer's framed commitment, the one bearer header, the two identity members. GitHub's token request is the canonical five-field form, the published `tokenExchangeCredential` last as `client_secret`, laid out whole; a record laid out with the credential committed is refused. Three GitHub rungs need no account: a refused code and a refused credential fail the token session with GitHub's own `error`, a bearer GitHub did not issue fails the identity session. The fourth signs in as the test account in Chrome, with the password and the TOTP code, authorizes the App and runs both sessions. X's rungs run the same way: a refused bearer, and a real authorization from a signed-in Chrome. `tests/common/bridge.rs` starts the binary and speaks HTTP/1.1 to it for both `tests/startup.rs` and the suite; `routes::CONFIG_PATH` is public. The libid-rs crates, the TLSNotary fork and its mpz patches are optional dependencies of the feature. Assisted-by: Claude Fable 5.1 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
The README's Testing section names the rungs, their variables and the export. `ceremony.yml` runs the rungs that need no account on pull requests, adds the GitHub authorization on schedule and dispatch, and runs the X authorization on a dispatch with the `x` input. Assisted-by: Claude Fable 5.1 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
SupremaLex
force-pushed
the
feat/live-ceremony-tests
branch
from
September 16, 2026 14:20
5023921 to
9a6df80
Compare
X examines a fresh sign-in, and a run nobody is watching has no answer for what it asks, so an unattended run no longer opens X's sign-in pages: a saved session that does not authenticate stops the rung and names the headed export that makes a new one, and the export itself runs only in a visible Chrome. The rung says which way X took it, the consent screen or a redirect straight back for an app this account has already authorized. It runs on a weekly schedule of its own beside the dispatch, because a saved session and the account behind it degrade over months: the run that finds them gone is better a scheduled one than the next demo. The two schedules carry their own concurrency group, so neither cancels the other, and the nightly rungs skip the weekly one. Assisted-by: Claude Opus 5 Signed-off-by: SupremaLex <georglutsenko@gmail.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.
The suite behind
--features live-ceremony: real MPC-TLS sessions against github.com and api.x.com through an in-process notary, with the bridge under test publishing the configuration a ceremony starts from. Based on #8.What runs
tests/ceremonystarts the real binary on a configuration file, with the loopback port to bind in its environment (tests/common/bridge.rs, shared withtests/startup.rs), readsGET /api/v1/ceremony/configfrom it as an application would, and runs the notarized sessions of a ceremony with a prover of its own (prover.rs:libid_tlsn::prover_genericover TCP) through a notary of its own (notary.rs:libid_tlsn::verifier, signing with a fresh key). Each record the notary signs is checked against the rules the Platform Verifier applies on chain (session.rs): exact coverage, the request revealed whole with nothing committed, the bearer's commitment framed by"access_token":"and readable nowhere, exactly oneauthorization: Bearerheader with its value committed in the identity request, the two identity members revealed and nothing else.GitHub (
github.rs): the token request is the canonical five-field form of libid#35 —client_id,code,redirect_uri,code_verifier,client_secret— with the publishedclientCredentialasclient_secret, laid out whole; a record laid out with the credential committed, the shape the v0.4.0 profile table still declares, is refused. The identity read isGET /userwith the bearer committed; the integeridis revealed with the byte that closes it,loginas a string.bad_verification_codeincorrect_client_credentials4xxX (
x.rs): the same two sessions for the public PKCE client; a refused-bearer rung, and a real authorization from a signed-in Chrome (browser/x.rs), which restores a saved session and never opens X's sign-in pages unattended. X examines a fresh sign-in, and a run nobody is watching has no answer for what it asks: a session that no longer authenticates stops the rung and names the headed export that makes a new one, and the export refuses a headless run. The rung says which way X took it, the consent screen or a redirect straight back for an app this account has already authorized.The browser driver (
browser/) is one core — Chrome over CDP, a redirect watcher that reads the code off the request nothing listens for, screenshots and page dumps underBROWSER_TRACE— and one module per platform.Variables
From the environment or a gitignored
.env.test; a missing one fails the run.GH_OAUTH_CLIENT_ID,GH_OAUTH_CLIENT_SECRET(the bridge under test publishes it) andLIBID_TEST_PUBLIC_ORIGIN;GH_TEST_ALICE_USERNAME,GH_TEST_ALICE_PASSWORD,GH_TEST_ALICE_TOTP_SECRETand a Chrome for the GitHub authorization;X_OAUTH_CLIENT_ID,LIBID_TEST_X_REDIRECT_URI,X_TEST_ALICE_USERNAME,X_TEST_ALICE_PASSWORD,X_TEST_ALICE_EMAILand the optionalX_TEST_ALICE_COOKIESfor X. The README's Testing section has the table.CI
ceremony.yml: pull requests run the rungs that need no account; the nightly and dispatched runs add the GitHub authorization, one rung at a time; the X authorization runs weekly on a schedule of its own and on a dispatch withx, because a saved session and the account behind it degrade over months. The two schedules carry their own concurrency group. Each job is skipped where its secrets are absent. Not a required check.Verification
Hermetic: 60 unit, 19 over the router, 4 over the binary, and 7 in the suite (the request layouts, the refused hidden-credential layout, the TOTP code). Live, locally: 12 passed — the three GitHub rungs that need no account, the X refused bearer, and the real GitHub authorization with both sessions attested. clippy
-D warningsunder--all-features, nightly rustfmt,--locked.Known gaps
profiles::GITHUBstill declaressecret_field: Some("client_secret"); the suite lays the request out withsecret_field: Noneper libid#35 until the table follows.