feat: full-bundle driver for the headless host#305
Draft
eugypalu wants to merge 9 commits into
Draft
Conversation
…lt for the full-bundle run
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
A driver that tests a real product against the headless host: the product's shipped bundle.
The product under test is the playground, deployed as
truapi-playground.dot. Its Diagnosis mode exercises the whole TrUAPI method surface, which makes it the widest-coverage product the driver can be pointed at. The driver itself is product-agnostic: any product bundle that speaks TrUAPI through the standard bootstrap can be loaded the same way.js/scripts/load-bundle.ts— serves the static export on loopback, registers happy-dom on the main realm and injectswindow.__HOST_API_PORT__before the bundle's scripts run, which is the webview-host production path the product bootstrap already supports. It pumps binary frames to the host's WebSocket frame server, oneUint8Arrayper SCALE frame, pure forwarding, then clicks the playground's Diagnosis run and reads the result from the product's own DOM.e2e/full-bundle.sh— one-command orchestration: fresh pairing-host state per run; login-first, with a minimalrequestLoginscript that triggers pairing and a wait for the session and the device-key statement-store allowance; the pairing deeplink answered by the in-repo signing host; and a per-op gate on the metrics JSONL requiringsign_raw,sign_payloadandcreate_transactionto succeed.playground/tests/e2e-headless/targets.ts— every selector the driver uses to drive the playground UI lives in this one file, so a playground UI change means updating a single place.