feat(qa): transaction-tier e2e flows, native shim atomic signing, and combined CI#4298
Open
ryanpinsker wants to merge 7 commits into
Open
feat(qa): transaction-tier e2e flows, native shim atomic signing, and combined CI#4298ryanpinsker wants to merge 7 commits into
ryanpinsker wants to merge 7 commits into
Conversation
Playwright harness (e2e/) with a Core-impersonating wallet shim: a private-key-backed EIP-1193 provider installed as window.avalanche + window.ethereum, announced via EIP-6963 as rdns app.core so wagmi's WalletSync takes the Core path. Implements the coreViem rpcSchema contract (avalanche_getAccountPubKey, avalanche_sendTransaction via local SDK xpAccount signing, wallet_getEthereumChain) — full console flows run headlessly with no extension. Fixtures seed wagmi storage so the wallet auto-connects; Vercel preview protection bypass supported via env. Surfaces come from a generated manifest (scripts/generate-qa-manifest.mts): 55 academy pages embedding console tools, 157 console routes, resolved against the tool registry and tsconfig paths. A tier-1 static check (scripts/check-academy-embeds.mts, wired into console-ci) fails PRs whose MDX toolbox imports no longer resolve — previously unguarded since tsc ignores MDX. Smoke specs assert hard signals (HTTP errors, page exceptions, error boundary, zero tool mounts) and emit partial-mount annotations for the agent tier (.claude/skills/academy-qa) to judge interactively. Mount detection uses new stable data attributes: data-console-tool (Container), data-console-tool-gate (CheckRequirements), data-console-flow (StepFlow). Current sweep: 58/61 pass. The 3 failures are a real pre-existing crash — TestSend throws a Rules-of-Hooks error on all three bridge-tokens course pages (issue to follow).
The shim runs as a standalone IIFE and — unlike the real Core extension, which signs in its own context — performs XP-chain signing in-page via @avalanche-sdk/client. That path needs a global Buffer, which the page does not provide. Every P-Chain tx flow driven through the harness (convert-subnet-to-l1, stake, cross-chain transfer) threw 'Buffer is not defined' from inside the shim before any tx was built — a harness-only failure that looks exactly like a product bug. Inject a Buffer polyfill into the esbuild bundle so it's defined before shim code runs. Verified: convert-subnet-to-l1 now builds and submits the tx (gets past Buffer to platform.issueTx). Render specs unaffected. Note: a second shim-fidelity gap remains after this — the in-page sendXPTransaction submission hits 'platform.issueTx: Missing or invalid parameters'. Real Core submits natively so production is unaffected; the tx-executing tier needs the shim's XP submission aligned with the P-Chain API (encoding param / tx format). Tracked for follow-up.
…bined CI Builds on the Academy QA harness (#4283 stack) to add a real-transaction tier and wire the whole suite into CI. Test/CI-only — no product code. Transaction flows (e2e/flows/transactions.spec.ts), one serial file so they never race on the shared wallet: - create L1: CreateSubnet + CreateChain, verified Committed + getBlockchains - C-Chain deploy: ExampleERC20 to Fuji C-Chain, verified via eth_getCode - cross-chain (C->P): real export + import, verified Committed Wallet shim (e2e/wallet-shim/core-shim.ts) signs what real Core signs but the SDK hex re-sign path can't: - subnet-auth resolution for CreateChain/Convert (was a zeroed credential) - return bare txHash like Core (was double-wrapping to [object Object]) - signAndIssueSingleKey: native EVM atomic + PVM import signing (sign the UnsignedTx byte form, credential every input via getSigIndices) CI (.github/workflows/academy-e2e.yml): one deployment_status workflow runs render smoke + tx flows in a single yarn e2e; the tx tier activates when QA_WALLET_KEY is set, else skips. Failures dedupe by root cause via root-cause-reporter.ts + summarize-failures.mts.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…et unset Two follow-ups on the QA harness PR: esbuild ^0.28.0 -> ^0.28.1: 0.28.0 is flagged by the Deno-CLI untrusted-registry advisory (GHSA, high). The harness only uses esbuild's Node buildSync API to bundle the wallet shim, not the Deno module, so it isn't exploitable — but bump to the patched release to clear the finding. Academy E2E now SKIPS (not fails) when VERCEL_AUTOMATION_BYPASS_SECRET is unset: the bypass check hard-failed, red-flagging every PR's preview run until an admin configures it. SSO-protected previews are unreachable without the secret, so skip with a notice (job stays green) instead. Production deploys are public and unaffected. Also refresh the README flow-tier section: cross-chain transfer is no longer fixme'd — both atomic legs sign natively via signAndIssueSingleKey. Co-Authored-By: Claude Fable 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.
feat(qa): transaction-tier e2e flows, native shim atomic signing, combined CI
Builds on the Academy QA harness (#4283 stack) to add a real-transaction
tier and wire the whole suite into CI. Test/CI-only — no product code.
Transaction flows (e2e/flows/transactions.spec.ts), one serial file so
they never race on the shared wallet:
Wallet shim (e2e/wallet-shim/core-shim.ts) signs what real Core signs but
the SDK hex re-sign path can't:
UnsignedTx byte form, credential every input via getSigIndices)
CI (.github/workflows/academy-e2e.yml): one deployment_status workflow runs
render smoke + tx flows in a single yarn e2e; the tx tier activates when
QA_WALLET_KEY is set, else skips. Failures dedupe by root cause via
root-cause-reporter.ts + summarize-failures.mts.