feat(ceremony): rebuild browser package around supplied popup connections - #28
feat(ceremony): rebuild browser package around supplied popup connections#28Wondertan wants to merge 64 commits into
Conversation
…p connections Implement the current CCDP actors, platform proof pipelines, byte-prefetch graph and static distribution. Add real browser proof and loader qualification, focused security regressions, and explicit remaining launch gates. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Move Callback, Prefetch and Prover entrypoints under ccdp/documents while keeping proving and cache implementations in their existing modules. Update build paths, exports and package maps, and remove the requested plan artifacts. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Add directory READMEs and module-owned docs, extracting client, document, platform and prefetch contracts from the architecture sources. Preserve requirement IDs, update cross-links and include package-level docs in the archive. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Move the distribution contract out of build/docs and update incoming and outgoing links without changing its content. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
1d4208a to
1aa1215
Compare
Convert build scripts and their tests to TypeScript, add strict NodeNext checks to the package typecheck, and reuse browser asset contracts plus Vite and ESTree types. Update harness imports and documentation without adding a TypeScript runner. Validation: 141 unit tests, four distribution tests, strict source/build and harness checks, and a real browser proof with released-key verification pass. All 180 distribution files remain byte-identical. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Introduce the shared LedgerId contract and a separate synthetic testing entrypoint without defining real ledgers. Reconstruct ledger identity in Client and Prover, resolve one notary address for all sessions, and isolate fixture builds and metadata from production output. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Replace the version-keyed Callback configuration with one deeply frozen input list, validate required origin fields and ignore optional trailing inputs. Derive harness CSP from that same list, keep loader metadata and bodies in the selected artifact, and synchronize GitHub Bridge origin-admission requirements. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Move all ceremony contracts and guides into the common docs directory, merge module README content with its matching contract, and leave a minimal root README linking to the documentation index. Update links while preserving requirement text and qualification status. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Resolve archive members and external requests from owner declarations, use the notary v0.3.0-rc.1 wildcard snippet, and remove handwritten IDs/checksums and release-specific build logic. Emit build-time Brotli with ordered native SWS policies and share the server across qualification harnesses. Validate archive/policy boundaries and runtime lowering; retain exact native dependency URLs and ranges. Record passing unit, build/HTTP and five-profile browser coverage, plus the unresolved live notary timeout. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Use the real ceremony Client and popup APIs with configurable local HTTPS Bridge/CCDP origins and the shared synthetic ledger. Keep unavailable Bridge configuration retryable, preserve native-anchor launch, and provide cancellation and terminal outcomes without a runtime mock service. Add isolated Vite startup, fixture build guidance, and 24 browser checks across the five existing profiles plus shared-origin coverage. Security, API ergonomics and simplicity reviews are clear. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Install the local CA and issue localhost certificates on first dev startup, then reuse the saved pair until expiry. Preserve explicit certificate overrides and keep production frontend builds free of trust-store changes. Document the one-time authentication and browser restart steps. Test first issuance, byte-for-byte reuse and expiry renewal without altering system trust. All 185 unit tests, dev typechecking, build and lint pass. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
…tracts Sync PR13 through a73e31f. Use six positional creation arguments and deliver identity separately from platform proof over ProverIdentityProof. Validate the selected identity grammar and frozen OAuth client ID, retaining the version and nonce in the reduced result wrapper. Require effective Callback origin admission to include CCDP and apply the same allowlist in the reference Bridge harness. Update callers, verifier-input assembly, documentation and stable-ID traceability. Validation: 197 unit tests, 15 distribution/loader checks, 55 integration cases, 20 dev browser cases, strict TypeScript, builds and lint. All five browser profiles generate real Google fixture proofs verified independently with the released key. Security, API and simplicity reviews are clear after documentation corrections. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
|
Ran this branch ( 1. GitHub sends
|
… details Validate GitHub's advertised issuer on success and denial, accept bounded provider error details without exposing them, and decode equivalent valid form encodings. Keep duplicate, state, transport and mixed-outcome rejection before exchange. Carry a closed error code and exact safe reason through AbortCeremony to the Client's CeremonyError. Show codes in terminal UI and the dev frontend; report undeliverable failures locally without logging or forwarding raw exceptions. Preserve local causes where available. Keep the developer modal deferred until its data and explicit-reveal design is settled. Update the coordinated Client/CCDP contract, tests and stable-ID traceability. Security, API and simplicity reviews are clear after including token admission in the token-exchange failure boundary. Validation: 217 unit tests, 15 distribution/loader checks, 55 integration cases, 20 dev browser cases, strict TypeScript, builds and lint. Real Google fixture proofs verify against the released key in all five browser profiles. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Reveal X token requests whole and admit GitHub's single revealed prefix with its committed trailing secret field. Validate the exact token headers and Content-Length against the complete signed request, rejecting hidden headers, duplicate fields and malformed framing. Merge adjacent disclosures before native reveal and final correlation so signing cannot change the planned partition. Cover adjacent GitHub identity fields and preserve exact byte, commitment and opening checks. Pin GitHub's API version alongside its required User-Agent; document the unresolved six-header profile/verifier alignment and Bridge PR #9 qualification target. Validation: 237 unit tests, TypeScript, package/static builds, formatting, lint, 14 distribution/loader/native-SWS checks (one unconfigured rebuild check skipped), and 55 browser cases including independently verified Google fixture proofs. Security/correctness, API and simplicity reviews are clear. Live X/GitHub and matched-notary qualification remain pending. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Use navigator.userAgent without a libID identifier. Update regression assertions and document that the profile/verifier must permit a browser-dependent sixth header. Targeted tests, TypeScript, lint, and security/API/simplicity reviews pass. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Add a native HTTPS launcher for the real Bridge and SWS on the documented local origins, with mkcert reuse, bridge-only secret forwarding and no request logging. Add read-only pre-consent configuration, admission, Callback composition and isolated-route checks. Upgrade browser TLSNotary to rc.2, matching Bridge PR #9's TLSN revision. Document exact bridge/libid-rs pins, local Callback file mode, required public registrations and confidential environment inputs, and notary TCP reachability still needed for live qualification. No placeholder OAuth client ID is committed. Validation: real bridge build/startup and frontend Ready over trusted HTTPS; 237 unit tests; 14 distribution/loader/native-SWS checks (one skipped); actual rc.2 concurrent WASM initialization in all five browser profiles; development TypeScript and lint. Security, API and simplicity reviews clear. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Declare the fresh Google, X and GitHub client IDs once in oauth-clients.json. Default the local Bridge to these registrations while retaining explicit environment overrides. Document the confirmed shared localhost callback URI. Keep GitHub's matching secret exclusively in ignored local configuration. Validation: real Bridge configuration matches all three registrations and contains no secret; pre-consent service checks pass; real frontend admits all three platforms and denies environment-file access. Development TypeScript, lint, and security/API/simplicity reviews pass. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Build pinned Bridge PR #9 in Docker, run the matching notary and SWS releases, and expose trusted local HTTPS/WebSocket endpoints. Rebuild CCDP against the local notary and tear down only the checkout-owned Compose project. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Create private @libid/dev with combined and separate workspace launch commands. Keep ceremony's distribution builder in the package while emitting development CCDP into the app cache. Preserve local credential ignores and verify frontend, service readiness and combined teardown. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Close the captured application-owned connection after every settled outcome, preserve the result and enable another attempt after cleanup. Verified with all 25 dev browser tests and focused security, API and simplicity reviews. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Return ordinary cached responses without rereading their bodies. Keep CRS reconstruction and validation, and allow immutable requests to use the browser HTTP cache when Cache Storage misses. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Show elapsed stage timings in the dev run history while retaining concurrent diagnostic steps. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Add fieldless authenticated readiness milestones and retain private OAuth forwarding. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Group authorization for display and end it only after OAuth return admission. Preserve raw milestones for post-consent timing. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Fold final attestation waiting into proof generation and clarify fetched-data and ZK prover stage labels. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Start GitHub identity-session setup alongside the Bridge token request. Wait for token admission before fetching identity, and cancel dependent work on failure without masking the original error. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Ignore bounded provider metadata while preserving required fields, transport, issuer, duplicate and credential checks. Cover Google version_info through the actual popup fixture flow. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Prefetch and supply each circuit release verification key to bb circuitProve, preserving the pinned ZK Keccak settings and proof encoding. Reject missing or empty keys without recomputation and select the WASM backend explicitly. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Start bb initialization alongside circuit/key and ACVM/ABI loading. Report branch failures promptly and destroy a backend that becomes ready after a sibling fails. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Accept inputs once Noir is ready, then join witness generation and bb readiness before proving. Keep cancellation, single cleanup and late-result suppression intact, and document the progress-stage boundary. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Start each WebSocket alongside shared TLSNotary initialization. Wait for both before setup, reject sockets closed during initialization, and release pending connections on either failure. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Decode gzip-packed WASM at build time and emit gzip/Brotli sidecars for native SWS delivery. Keep prefetch and dependency loaders on the same decoded resource, and preserve the old immutable bb URL. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Return fully validated responses while persistence continues. Retain single-flight entries and Service Worker event lifetime through write completion, handle prefetch response failures, and test durable-cache eviction independently of pending flights. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Pass the generated certificate key to Chromium through its native SPKI allowlist so HTTP-cache reuse is tested with a clean certificate result. Preserve project launch options without changing system trust or production TLS policy. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Resolve callbackPath against the supplied Bridge origin and pass the frozen redirectUri in GitHub token requests. Replace retired environment settings with inline TOML in dev Compose and pin the rebased RC3-compatible Bridge. Reject empty query and fragment delimiters through the shared redirect validator. Align fixtures, requirement references and integration documentation with the new wire contract. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Consume the consolidated RC3-compatible Bridge update and record the release-upgrade qualification. The shared whitespace parser now comes from the released library; the server-specific error classifier remains in PR10. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Remove the superseded whitespace requirements and GitHub terminator amendment from the ceremony implementation branch. PR31 owns the shared rules and their stable IDs. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Allow additional token headers while requiring unique Host, Content-Type and canonical Content-Length values. Apply the shared forbidden-header rules to token and identity requests, preserving the bearer and secret disclosure boundaries. Update focused X/GitHub regressions and package documentation for spec PR31. All 404 ceremony tests, TypeScript checks and formatting/lint checks pass; security, API and simplicity reviews are clear. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Group the Noir/bb engine and released circuit adapters under proving/bb. Keep ProverContext with platform orchestration and shared JSON/progress outside the Prover page. Move HTTP and transcript helpers into notarization and share the bearer-link public-input check. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Move Barretenberg, notary and asset delivery into sibling modules. Name resource declarations by their owner, place the application client under CCDP, and rename platform authorization builders to url.ts. Update the public API and its workspace consumers together. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Drop a previous gzip or Brotli copy when the replacement body no longer compresses smaller. Otherwise content negotiation can serve stale HTML referencing workers from an earlier build. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Move attestation projections into notary, shared validation into primitives, and document UI beside its consumers. Compose platform URL builders and proof validators directly without cross-module re-exports. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Keep discovery and result types at the root and the application API under ccdp/client. Internal codecs, page startup and configuration helpers are no longer public subpaths or exports. Move canonical fixtures beside their owners and exclude them from package contents. Expose compatible versions and accept an optional explicit selection, retaining the highest-compatible default. Validate and bind that choice throughout the run so applications can choose among supported disclosure behaviors. Assisted-by: GPT-6 Signed-off-by: Wondertan <hlibwondertan@gmail.com>
Rebuild
@libid/ceremonyaround an externally suppliedPopupConnectionand the current CCDP contracts. Callback clears captured OAuth returns, selects its bundled CCDP version and privately forwards them to one logical Prover. Popup owns window creation, navigation, isolation fallback and continuity; the application owns wallet operations and submission.Client resolves the Bridge’s
callbackPathagainst its supplied Bridge origin once and sends the same frozenredirectUriwith GitHub token requests. Client snapshots the ledger hash and, for X/GitHub, its notary address before OAuth. Prover receives those values without a ledger decoder; the ledger package contains an interface and explicit synthetic fixtures. Results containidentityandoauthProof. Browser code does not cryptographically verify proofs or attestations. Safe failure codes cross the connection; raw OAuth returns and original exceptions stay private.Asset owners declare archives, wildcard members and external URLs once. The build derives prefetch from the declarations and emitted graph; bb.js CRS requests retain their native hosts and ranges. WASM bodies are normalized at build time, with gzip/Brotli sidecars served by native SWS negotiation. Existing immutable URLs retain their bytes. Validated cached responses are delivered directly; misses can reuse the browser HTTP cache. Cache Storage writes run after response delivery while single-flight entries and Service Worker events remain alive through persistence.
Released verification keys are prefetched and supplied to bb.js. Dependency initialization, witness execution and notary socket setup overlap where their inputs permit it. GitHub identity setup starts alongside token exchange, with final delivery waiting for all required outputs and correlations. OAuth readers tolerate additional bounded provider metadata while validating required fields. X/GitHub JSON readers accept whitespace without rewriting transcript bytes. Token admission allows additional headers while requiring unique Host, Content-Type and canonical Content-Length values. Token and identity requests reject their forbidden header names while preserving the required layouts and bearer holes.
The Bridge’s new configuration uses TOML
[[platforms]]tables ints/apps/dev/bridge-config.toml, mounted by Compose; obsoleteBASE_URL,NOTARY_URLandCEREMONY_PLATFORMSsettings are removed.ts/apps/devprovides per-platform buttons, run history, stage timings and post-consent duration. Successful ceremonies close their popup; failures remain open for inspection.pnpm devstarts the app, Bridge, notary and SWS on separate localhost HTTP origins.pnpm dev:ccdprefreshes the static distribution without rebuilding service images. Explicit HTTP/WS exceptions cover onlylocalhostand127.0.0.1; production remains HTTPS/WSS.The internal layout uses standalone
barretenberg/,notary/andassets/modules, separate fromccdp/documents/. Barretenberg owns the engine andoidc_google/bearer_linkcircuit adapters; notary owns HTTP/transcript parsing. Platform orchestration ownsProverContext; JSON duplicate-key detection and progress accounting remain shared. Resource declarations use owner-specific*.assets.tsnames. The platform catalog composes URL builders and proof validators directly;url.tscontains no proof re-exports. Notary owns the delivered attestation type and projection validator, shared URL/scalar guards live inprimitives.ts, and document UI lives beside its three consumers.The package exports only its root discovery/result API and
@libid/ceremony/ccdp/client. CCDP codecs and document startup functions are private build inputs; configuration validators and proof-type mappings are internal.CCDPClient.enabledPlatformsdiscovers compatible configured platforms, andenabledVersions(platform)lists their compatible versions. The optional trailingnew(..., ceremonyVersion)chooses an enabled version explicitly; omission retains the highest-compatible default. The selected version is validated before ledger reads and retained in prefetch, authorization, Prover inputs and the result. Versions may differ in disclosure behavior, so apps offering a specific mode can pin that choice. These changes leave wire messages and document routes unchanged. Existing Biome formatting and import organization are enforced, and adjacent API comments document lifecycle, ownership and trust constraints while package docs retain cross-component requirements.Canonical test fixtures live beside their owning circuit/decoder tests; browser qualification reuses the same Google fixture. Fixture files are excluded from package contents.
Rebuilding removes obsolete gzip/Brotli sidecars when a replacement body no longer benefits from compression. This prevents content negotiation from serving stale HTML that points at workers from an earlier build.
Stack and pinned prerequisites
feat/popup-packageat1c5b78c6f9d783f7b5c536f6018d724b3ced9132. No merges. This branch also adds the explicit localhost HTTP exception to popup URL validation.83a7fbcd071abeb62aa2cfd6f9cc91933175a328. Shared transcript requirements are maintained in PR docs(specs): the token request reveals its headers, and the verifier checks them #31 at860075a4bf288dc7fee20866ed3536dc260f4574. This branch leaves the root specification files unchanged.991d5c604acdb1a67099f28cbf37ad58b6c317a5, pinned atcdc16551114070ea3458ef0d5ceb19ca4228833e. It now dials the request-selected notary host on its wire port; the RC3 pins and server-specific whitespace error classification remain above the new base. Shared parsing comes from released libid-rs v0.4.0; redundant server docs(specs): on-chain verification path, two-attestation circuits, notary fee #11 is superseded by docs(specs): trim Google circuit to the verification relation; unify X public inputs #10.82bc4e286d762531ba3ac86996db4afc6ea38f56), and merged contracts #37, replacing closed docs(specs): align ceremony browser contract #20 and #36. This dependency update does not claim full qualification against the updated contract.94aaaf33and MPZ1dd2349d; immutable bundle mounttlsn/v0.3.0-rc.3-csp1.verifierTarget: 'evm'. Qualification verifies against released keys outside ceremony, without a chain/RPC dependency.Validation
Manual Google, X and GitHub successes were reported during development. This update does not claim fresh live-OAuth, physical-mobile or complete release qualification. Earlier broader browser coverage and the intermittent WebKit two-popup result remain documented; remaining gates and all 153 stable requirement IDs are retained in the package docs.
See the package guide, qualification, traceability, and development setup.