Skip to content

feat: verify device cloud connections - #1564

Merged
thymikee merged 8 commits into
mainfrom
feat/connect-provider-verification
Aug 3, 2026
Merged

feat: verify device cloud connections#1564
thymikee merged 8 commits into
mainfrom
feat/connect-provider-verification

Conversation

@thymikee

@thymikee thymikee commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Validate BrowserStack, AWS Device Farm, and Limrun access during connect without allocating a device or provider session.

  • report verified device and app readiness plus exact next commands in human and JSON output
  • distinguish Limrun's install-first flow and AWS's attach-before-open recovery without introducing a catalog command
  • keep connect-only disconnect local instead of waking a daemon
  • update versioned CLI help and device-cloud documentation

Example flows:

agent-device connect aws-device-farm --platform android --project <arn> --device <arn>
agent-device connect limrun --platform android

This touches 20 files across the connect command, provider adapters, tests, and docs. The scope expands from connect messaging into provider-owned read-only verification and connect-only cleanup so the experience is consistent end to end.

Validation

  • pnpm check:affected --run (format, lint, typecheck, layering, fallow, build; 115 test files and 939 tests passed)
  • AWS Device Farm: verified a real project and device; remote access session count remained unchanged at 33 before and after connect
  • Limrun Android: active instance count remained zero before and after connect
  • connect-only disconnect created no daemon metadata or provider resource

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-03 14:48 UTC

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.93 MB 1.95 MB +13.2 kB
JS gzip 619.2 kB 623.6 kB +4.4 kB
npm tarball 738.9 kB 743.1 kB +4.2 kB
npm unpacked 2.59 MB 2.60 MB +13.2 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 21.2 ms 18.4 ms -2.9 ms
CLI --help 49.0 ms 42.7 ms -6.3 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/cli.js +5.3 kB +1.7 kB
dist/src/selector-vocabulary.js +5.4 kB +1.5 kB
dist/src/cli-help.js +1.3 kB +438 B
dist/src/internal/daemon.js -118 B -75 B

@thymikee

thymikee commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Reviewed exact head 0d1f710; not merge-ready yet.

  1. The required Integration Tests check fails in the built CLI provider-disconnect scenario. connect browserstack now performs the new real verification request with fixture credentials and exits UNAUTHORIZED before the scenario reaches its open/close/disconnect assertions. Make that integration path hermetic with an appropriate verification seam/fixture, then rerun the actual integration bundle.

  2. This changes command-planning guidance (connect now emits provider-specific next steps and avoids pre-open catalog probes), but the diff adds no SkillGym case. Add a behavioral planning case per the repository guidance.

The production design otherwise looks coherent and preserves lazy allocation: AWS and BrowserStack verification are read-only, Limrun lists without creating an instance, and state is written only after verification. Real no-allocation evidence exists for AWS and Limrun; BrowserStack practical evidence remains a residual risk unless added.

@thymikee

thymikee commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Re-reviewed exact head aeb2f80; still not merge-ready.

  1. Integration Tests still invokes real BrowserStack verification with fixture credentials and fails UNAUTHORIZED before open/close/disconnect. The integration fixture was not updated; make this route hermetic and rerun pnpm test:integration:node.
  2. Fallow Code Quality now fails on unused export isCloudWebDriverConnectProvider; remove it or restore a production consumer.
  3. The command-planning change still has no behavioral SkillGym case.
  4. The new adapter emits a private/internal product label in ordinary connect output. Replace it with neutral public wording; do not repeat that label in review discussion.

The read-only verification design and lazy-allocation behavior otherwise remain coherent. Real BrowserStack no-allocation evidence remains residual risk.

@thymikee

thymikee commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Addressed on current head f54f6c6:

  1. BrowserStack verification in the built-CLI integration flow is intercepted by the fetch fixture; test:integration:node passes.
  2. The unused provider-policy export was removed; fallow passes with no issues across the changed files.
  3. Command-planning behavior is covered by the BrowserStack connect help-conformance sample case.
  4. Connect output now uses public service wording.

The later follow-up also makes older bs:// references non-fatal, removes test-only endpoint env seams from production, aligns JSON next steps, and documents/tests direct-provider --remote-config verification. Full check:affected passed before the current head was pushed.

@thymikee

thymikee commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Re-reviewed exact head f54f6c6. The hermetic built-CLI integration, Fallow export cleanup, command-planning coverage, and direct-profile pre-write verification are fixed; current completed checks are green.

One code finding remains: the cloud adapter still places a prohibited private/internal product label in the ordinary connect success payload, and the renderer prints it in human output (and JSON serialization carries it). Replace it with neutral public wording and pin both output surfaces without repeating the prohibited label.

Real BrowserStack no-allocation evidence also remains a readiness residual.

@thymikee

thymikee commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Addressed the remaining review point: cloud connect now uses neutral public service wording, with regression coverage for both human and JSON output. I also tightened the local pre-push gate: affected Vitest runs once with LCOV, the changed-line coverage gate consumes that result, and full unit/provider/global coverage matrices remain CI-owned. The optimized affected gate passed (1064 affected tests; changed-line coverage 90.65%; fallow clean) and the branch is pushed.

@thymikee

thymikee commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Re-reviewed exact head 12794e5. No remaining code findings: the cloud success payload now uses neutral public wording with human and JSON regression coverage, and the affected-check optimization is documented and tested while the full unit/provider/coverage matrices remain CI-authoritative.

Not fully merge-ready yet: attach real BrowserStack verification/no-allocation evidence for the changed path. AWS and Limrun evidence is already present. Android and iOS smoke checks are also still running; all completed checks are green.

@thymikee

thymikee commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Real BrowserStack verification completed against head 12794e5 using the configured account credentials and the built CLI.

Command shape: connect browserstack --platform android --device "Google Pixel 8" --provider-os-version 14.0 --provider-app <public-app-url> --json, with an isolated state directory. Results:

  • credential and device access verification succeeded;
  • exact device resolved as Google Pixel 8 / Android 14.0;
  • leaseAllocated: false;
  • liveSession.status: not-created;
  • app URL remained configured with validation explicitly deferred to session creation;
  • BrowserStack recent builds before: 3, statuses timeout/done/done, snapshot digest 41207c4f...6064;
  • BrowserStack recent builds after: same count, statuses, IDs/metadata, and exact digest;
  • isolated disconnect returned released: false.

No open was issued. This supplies real credential/device verification and provider-side no-allocation evidence for BrowserStack.

@thymikee

thymikee commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Addressed the tightening review in 324bb66:

  • removed CONNECT_WORKFLOW_POLICIES; next steps now derive from lease kind plus provider-owned device/app resource statuses and references;
  • removed ConnectVerificationFacts and verifiedFacts(); provider probes now return ProviderConnectionVerification unchanged, with only a small configured-profile variant for cloud/proxy;
  • kept BrowserStack recent-app verification because it remains part of the current verified-upload promise;
  • updated the help-conformance producer to exercise the provider contract seam rather than the deleted DTO.

The focused connect/conformance tests, typecheck, fallow, and the full affected local gate pass (1064 affected tests; changed-line coverage 90.09%). The refactor removes 15 net production/test-fixture lines and, more importantly, adding another direct provider no longer requires a second presentation registry. Built JS raw is effectively flat versus the prior head (+65 B).

@thymikee
thymikee merged commit 2e74b78 into main Aug 3, 2026
33 checks passed
@thymikee
thymikee deleted the feat/connect-provider-verification branch August 3, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant