Repository navigation
test(examples): CCP-first smoke coverage for Astro Node and Next.js hosts - #24
Merged
Merged
Conversation
A TOSE-style host on @astrojs/node: a demo login mapped through identity.authenticate with rebinding and logout revocation, an order read page action, and a payment action that needs the customer's approval of a server-signed quote and is re-validated by the backend. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Starts the built hosts as real servers against the fake CCP ingress and checks the browser contract (config, session, SSE chat, history, refresh, token, origin, agent and limit errors), secret hygiene of responses, pages, logs and client bundles, signed-in customers across two instances, and the payment approval flow. A staging run validates its environment before starting anything. CI gets a ccp-smoke job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t cleanup - Payment quotes carry a signed nonce; a reused quote is refused even while the order is unpaid. - The demo login cookie signs an 8-hour expiry, sets Max-Age, and is Secure when SITE_ORIGIN is https. - Logout clears the cookie even when the user directory is down or the body is not JSON. - Smoke hosts: probe timeout, port-takeover check, tree kill on Windows, no orphan when one start fails. - Contract tests restore fake CCP state in finally; canary scan covers prerendered Next.js pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Closes #22
What
examples/astro-node: a TOSE-style Astro SSR shop on@astrojs/nodeovertransport: "ccp", with these parts:identity.authenticate, usingrebindEachRequestand a logout that callsrevokewith the widget's hint.orders.statusread action.payments.createmutate action. The customer approves a server-signed quote, and the backend validates it again: login, same-origin JSON, owner, order state, amount, expiry and replay.examples/ccp-smoke: vitest suites that start the built Astro Node and Next.js (next start) hosts as real servers against the existing fake CCP ingress.run_failed, revoked secret), and edge-session refresh.build:hostsbuilds both hosts with canary secrets and fails if one is inlined into a client bundle.test:stagingvalidates the environment before starting anything; it reports variable names only, never values, and refuses Gateway variables.docs/ccp-host-smoke.mdcovers:ccp-smokejob.No SDK source or public API change;
createDeweeHandleris used as is.Findings
next start,request.urldoes not carry the public origin. Same-origin calls are therefore refused with403 forbidden_originunless the public origin is inDEWEE_ALLOWED_ORIGINS. This is documented, and the smoke runs set it the same way production would.next buildof Next.js 16.4.0 (already onmain) stops once with a security advisory notice;build:hostsretries once. An upgrade ofnextis recommended separately.Verification
Local runs (Windows, Node 24), all passing:
pnpm typecheck,pnpm test,pnpm build,pnpm test:bundlerspnpm -r testandpnpm -r build. The first-r buildhit the Next notice; the retry passed.pnpm -C examples/ccp-smoke build:hosts,typecheckandtest: 40 passed, 1 skipped (the staging-only check).Not run: the staging smoke (no credentials).
🤖 Generated with Claude Code