Skip to content

feat: extract AWS Device Farm provider plugin - #4617

Merged
thymikee merged 21 commits into
fix/0.22-plugin-connection-admissionfrom
feat/0.22-aws-device-farm-plugin
Nov 17, 2026
Merged

thymikee merged 21 commits into
fix/0.22-plugin-connection-admissionfrom
feat/0.22-aws-device-farm-plugin

Conversation

@thymikee

@thymikee thymikee commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Extract AWS Device Farm into a managed provider plugin. Core retains metadata and uses the plugin SDK for provider execution. This 107-file change builds on #4636 → #4621 → #4579. Closes #3310.

Install a local tarball with agent-device plugins add ./aws-device-farm.tgz. Empty npm placeholders are not usable plugin releases. Verified placeholder tags and maintainer-attested OIDC satisfy the package-transition prerequisites; private is removed.

Validation

Published head: 8c5fabc15e261b9eb67fd60fe16e3c049f1251fb, rebased onto 0.22 at 9717295. All 21 AWS patches and the complete layer diff are unchanged. The public conflict is resolved.

Exact-head affected/full gates passed 42/41 checks respectively, each with 25 skips and an unchanged checkout. Released-wire compatibility passed against v0.21.38 with the protocol unchanged. Packed AWS failure-contract, isolated CLI and strict TypeScript-consumer checks passed; the consumer uses repository Node types. Public manager installation and compatible selection passed for both provider tarballs.

AWS live acceptance passed at this exact head: Galaxy A15 / Android 14 connect/open and an interactive snapshot with 11 nodes. Product close passed; independent AWS reads confirmed the owned session COMPLETED / PASSED, and the daemon stopped without fallback. Evidence and archive hashes.

Hosted checks are complete at this head: 18 successful, two skipped and one neutral. Sentinel reports no open findings; its prompt excludes the generated lockfile. All 22 review threads are resolved. The earlier provisioning failure remains separately attributed. Readiness labels belong to the Chief of Staff; no npm release or merge action is claimed.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.13 MB 6.12 MB -12.2 kB
Package (unpacked) 6.13 MB 6.12 MB -12.2 kB
Package (download) 1.86 MB 1.86 MB -3.8 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 41.7 ms 33.5 ms -8.2 ms
CLI --help 98.5 ms 61.3 ms -37.2 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 99 files

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread website/docs/docs/device-clouds.md Resolved
Comment thread website/docs/docs/plugins.md Resolved
Comment thread scripts/layering/package-boundaries.ts Resolved
Comment thread scripts/layering/package-boundaries.ts Resolved
Comment thread src/commands/provider-plugin-catalog.ts Resolved
Comment thread website/docs/docs/plugins.md Resolved
Comment thread README.md Resolved
@apex-sentinel-staging

apex-sentinel-staging Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 1 no longer raised

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (655ede2796e5).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

Earlier reviews

Review of 378947d3 · 17.11.2026 15:40 UTC

Apex Sentinel · ✅ Approve

Since the last review: 1 new · 0 still open · 1 no longer raised (1 marked fixed)

1 finding(s): 1 minor.

🟡 Minor (1)

Where Finding
packages/plugins/src/host.ts:31 🆕 runHostCommand now replaces the process environment instead of inheriting it
Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (1cb2f242aea5).

Review of 12ec6c46 · 17.11.2026 13:53 UTC

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 1 still open · 1 no longer raised

1 finding(s): 1 minor.

🟡 Minor (1)

Where Finding
src/cli/connection/provider-policy.ts:108 Unprimed readers classify aws-device-farm as a remote-daemon provider
Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (27a4e409dae6).

Review of 4f79a817 · 17.11.2026 09:40 UTC

Apex Sentinel · ✅ Approve

Since the last review: 2 new · 0 still open · 0 no longer raised

2 finding(s): 2 minor.

🟡 Minor (2)

Where Finding
scripts/layering/project-references.test.ts:113 🆕 Root workspace-dependency guard weakened from full coverage to a one-way subset
src/cli/connection/provider-policy.ts:105 🆕 Unprimed/uninstalled aws-device-farm now resolves to remote-provider capabilities
Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (e0ab0c255c3d).

Review of 637a41db · 17.11.2026 08:27 UTC

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 0 no longer raised

The changes are the same as on f8ad131, so this is that review, not a new one. Comment @apex-sentinel-staging review to review again.

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (e0ab0c255c3d).

Review of f8ad1315 · 17.11.2026 07:19 UTC

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 2 no longer raised

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (e0ab0c255c3d).

Review of 98dfddb4 · 16.11.2026 21:41 UTC

Apex Sentinel · ✅ Approve

2 finding(s): 2 minor.

🟡 Minor (2)

Where Finding
packages/provider-aws-device-farm/package.json:36 Published aws-device-farm manifest omits the connection-verification subpath the sibling plugins publish
packages/provider-aws-device-farm/tsdown.config.ts:1 aws-device-farm tsdown.config duplicates build-config instead of reusing it
Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (a30accf38081).

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 2 new findings on 98dfddb. The verdict and the full list are in the summary comment.

@thymikee

Copy link
Copy Markdown
Member Author

I reviewed 98dfddb and found two problems to fix before merge. CI is green (21 checks, none failing), but no CI job runs the packed AWS plugin smoke, so green CI does not cover the install-from-store route. No conflicts.

This PR changes the production route that allocates and releases AWS Device Farm sessions (setUpSlot -> plugin.setup -> createAwsDeviceFarmWebDriver -> host.runHostCommand, now bound to the daemon host cwd/env instead of the ambient process env) in aws-device-farm-webdriver.ts. Issue #3310 requires one live Device Farm session with the packed plugin, or the exact blocker named, and the PR body only says live AWS acceptance is unverified. The aws CLI may see a different env or cwd in the daemon (credential chain, AWS_PROFILE, relative config), and the packed plugin may fail to load from the store at daemon start. Every test injects runHostCommand or uses the source-exported workspace package, so users would hit this first. Please record one run with the packed tarball installed through agent-device plugins add <tarball> into a fresh AGENT_DEVICE_HOME. It should show connect aws-device-farm --platform android|ios --aws-project-arn ... --aws-device-arn ... --aws-app-arn ... printing the verification, daemon status --json listing aws-device-farm with source store and state active, open <bundle-id> creating a remote-access session (session ARN in output or logs), one snapshot, and close stopping the session. If no AWS account is available, name that blocker in the PR body instead.

run-host-command.ts re-declares HostCommandResult and RunHostCommand verbatim. This same PR adds those types to packages/plugins/src/host.ts and exports them from agent-device/plugins, which the plugin already imports ProviderPluginHost from. If the host contract changes (for example, to add stderr or a signal), the plugin's copy will drift silently. The rule is that the plugin SDK owns host-capability types and plugins import them. Please delete the local file and import type RunHostCommand from agent-device/plugins (or use ProviderPluginHost['runHostCommand']) at every site that imports the local copy.

The open inline threads on the unqualified install docs still stand: device-clouds.md, plugins.md install, embedded runtimes, daemon stop retry, package README install, changeset file, maxBuffer no-op, stale bundled list and tsdown config copy, plus four lower-priority threads. These do not apply, so please resolve them: script-test skip (the head scans more than base, so nothing is newly dropped), R11 on script tests (it never ran there at base, and root declarations are still enforced), connection-verification export and the same point again (the only importer is a core workspace test, so dropping the dev export is cleaner), ARN format (only the region is parsed), catalog package name (BrowserStack is listed the same way) and README wording (it already scopes the install to all three plugins).

Not blocking, and fine to take or leave: missingAttachedAppRecovery in src/cli/commands/connection-presentation.ts:282 fires for any provider but prints a hard-coded connect aws-device-farm ... command, so the plugin's verify result could carry the recovery command and core could print it generically; the AWS line at src/commands/schema/cli-help.ts:475 could read AWS Device Farm (plugin, install separately) like its siblings; the capabilities object in the plugin's src/index.ts:21 equals HOSTED_WEBDRIVER_CONNECTION except requiresAppAttachment: true, so it can spread that; .changeset/aws-device-farm-plugin.md is gitignored and unused, so it can go; the R11 scan change and the @agent-device/build-config root devDependency removal look unrelated to this extraction and could be a separate PR; and the new SDK HostCommandResult in packages/plugins/src/host.ts:6 shares a name with the core platform-runtime-host type of different shape, so renaming it or exporting only RunHostCommand would avoid confusion.

Before merge, this needs the live AWS run (or a named blocker), the type and tsdown config copies removed, and the install docs corrected.

@thymikee
thymikee force-pushed the feat/0.22-aws-device-farm-plugin branch from 98dfddb to f8ad131 Compare November 17, 2026 07:09
@thymikee
thymikee changed the base branch from fix/a1-extraction-unused-import-20261116 to fix/0.22-command-output-fuzz-prerequisite November 17, 2026 07:09
@thymikee
thymikee force-pushed the feat/0.22-aws-device-farm-plugin branch from f8ad131 to 637a41d Compare November 17, 2026 08:27
@thymikee

Copy link
Copy Markdown
Member Author

Thanks for the update. At 637a41d, most of the earlier round (98dfddb) is fixed, but two items remain.

The duplicated host types are still there: run-host-command.ts:2 re-declares HostCommandResult and RunHostCommand from packages/plugins/src/host.ts:5-10. agent-device/plugins already exports both, and the plugin imports ProviderPluginHost from it. If the SDK host contract changes (for example a new stderr, signal or option), this copy will drift and still type-check against itself. The plugin SDK should own host-capability types and plugins should import them. Please delete this file and import type RunHostCommand from agent-device/plugins at the three sites that use it: aws-device-farm.ts:17, aws-device-farm-connection-verification.ts:3 and aws-device-farm-connection-verification.test.ts:4. You can also use ProviderPluginHost['runHostCommand'].

The real Device Farm route still has no evidence. aws-device-farm-webdriver.ts:1 runs setUpSlot -> plugin.setup -> createAwsDeviceFarmWebDriver -> host.runHostCommand with the daemon host cwd and env. No test covers it without an injected runHostCommand or a PATH-stubbed aws, and the PR body says only that live AWS is unverified. A daemon env that differs from the shell (AWS_PROFILE, relative config, credential chain), or a store-loaded packed plugin that fails at setup, would reach users first. Please record one run with the packed tarball installed via agent-device plugins add <tarball> into a fresh AGENT_DEVICE_HOME. It should show connect aws-device-farm --platform android|ios --aws-project-arn ... --aws-device-arn ... --aws-app-arn ... printing the verification, daemon status --json listing aws-device-farm with source store and state active, open <bundle-id> creating a remote-access session with the session ARN in output or logs, one snapshot, and close stopping the session. If no AWS account is available, put that exact blocker in the PR body, as #3310 asks.

Not blocking, and fine to take or leave: the R11 script-test change in scripts/layering/package-boundaries.ts:584 and the ios-snapshot-differential.test.ts move ride in 1659b9a and look unrelated to the AWS extraction, so they could be their own PR. Also, the unpublished flag in provider-plugin-catalog.ts:5 is read at two sites while the cli-help.ts:475 text states the same fact by hand, so it could derive from the catalog or the flag could go (replay and maestro keep their hold in docs only). AWS alone now ships .d.mts declarations, so should that be shared through providerPluginBuildConfig or dropped to match the sibling plugins?

The earlier inline threads are fixed at this head, so you can resolve them. That covers the higher-priority threads (for example the device-clouds.md publication wording and the R11 script-test coverage), the four lower-priority threads, and the two threads on (publishConfig.exports and the providerPluginBuildConfig spread).

Smoke Tests fails in the live Android emulator fixture E2E at live-automation-scenario.ts:49, where snapshot -i after automation-continue-catalog still shows the Automation lab screen. This looks unrelated: the diff touches no Android, helper, interaction or snapshot code, and the failure came mid-scenario after many passing steps. A rerun should confirm. No CI job runs the packed AWS smoke.

Before merge, please remove the local RunHostCommand copy in favor of the agent-device/plugins import, then add the live packed-plugin run or the exact blocker to the PR body.

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 2 new findings on 4f79a81. The verdict and the full list are in the summary comment.

Comment thread src/cli/connection/provider-policy.ts Resolved
@thymikee
thymikee added this pull request to stack #4625 November 17, 2026 09:50
@thymikee

Copy link
Copy Markdown
Member Author

Thanks for the update. At 4f79a81 the two problems from the earlier review still stand. All 21 checks pass, and there are no conflicts, but this needs the two changes below before merge.

packages/provider-aws-device-farm/src/run-host-command.ts still re-declares HostCommandResult and RunHostCommand verbatim from packages/plugins/src/host.ts. agent-device/plugins already exports both, and the plugin imports ProviderPluginHost from that entry in index.ts, connection.ts and aws-device-farm-webdriver.ts. If the SDK host contract changes, the plugin copy drifts and still type-checks against itself. Please delete run-host-command.ts and import type RunHostCommand from agent-device/plugins in aws-device-farm.ts, aws-device-farm-connection-verification.ts and its test. The rule: plugin packages declare no host-capability types; they import them from the agent-device/plugins entry.

The production route setUpSlot -> plugin.setup -> createAwsDeviceFarmWebDriver -> host.runHostCommand (daemon cwd and env, packed store-loaded plugin) has no live run. Tests inject runHostCommand or stub aws, and no CI job runs the packed AWS smoke or a live AWS route. A packed plugin that fails at setup, or a daemon env that differs from the shell (AWS_PROFILE, credential chain), would reach users first. Please record one run of the packed tarball installed with agent-device plugins add <tarball> into a fresh AGENT_DEVICE_HOME. The run must show: connect aws-device-farm --platform android|ios --aws-project-arn ... --aws-device-arn ... --aws-app-arn ... printing the verification; daemon status --json listing aws-device-farm with source store and state active; open <bundle-id> creating a remote-access session, with the ARN in output or logs; one snapshot; and close stopping the session. If that run is impossible, please put the exact blocker in the PR body (for example, no AWS Device Farm account available to the author), as #3310 asks.

Not blocking: the Validation paragraph still says hosted checks are pending and that the previous head had an Android failure, so you can update it when the live run is recorded, or leave it.

The open inline thread on provider policy capabilities does not apply, so you can resolve it: provider-policy.ts gives AWS the same unprimed fallback as BrowserStack, the production readers prime first, and an uninstalled plugin returns plugin-not-installed instead of running with wrong capabilities. The root dependency thread is already resolved, and your reply holds: a package that is only typechecked needs no root dependency.

@thymikee

Copy link
Copy Markdown
Member Author

This branch now conflicts with main. Please rebase it onto the current main; the open items from the last review still apply, and I will review the rebased head.

@thymikee
thymikee removed this pull request from stack #4625 November 17, 2026 13:43
@thymikee
thymikee changed the base branch from fix/0.22-command-output-fuzz-prerequisite to fix/0.22-plugin-connection-admission November 17, 2026 13:44
@thymikee
thymikee added this pull request to stack #4637 November 17, 2026 13:44
@thymikee
thymikee force-pushed the feat/0.22-aws-device-farm-plugin branch from 4f79a81 to 12ec6c4 Compare November 17, 2026 13:45
@thymikee

Copy link
Copy Markdown
Member Author

Published the conflict repair at 12ec6c46c2584e3f51a50b8869ae45f8cd7cbcab, based on #4636; GitHub now reports the PR mergeable. The duplicate host-command type file is removed, and the three consumers import RunHostCommand from agent-device/plugins. The missing/failed-provider admission and AWS routed regressions are also published.

The PR body now records the live blocker precisely: the inspected T3 device inventory exposes only local simulators/emulators, with no admitted bound Device Farm route. AWS account access and project/device/app ARNs have not been verified. A supported cloud route is needed before recording the requested fresh-home packed installation, verification, store-active daemon, session ARN, snapshot and close evidence. The packed fixture is not represented as that live run. Placeholder/trusted-publisher and final combined-manager acceptance holds remain open.

At this exact head, affected/full checks passed 42/41 checks with 25 skipped each; released wire and the packed verifier/strict consumer passed. New-head hosted CI is pending. The stack grouping was rebuilt to insert #4636 without deleting branches or PRs.

@thymikee

Copy link
Copy Markdown
Member Author

The earlier conflict report is fixed, and I found no code problems at 12ec6c4. The PR is ready. Not blocking: the new test in src/cli/commands/connection-aws-admission.test.ts copies the routed missing/failed plugin test in connection-plugin-admission.test.ts with only the provider and package swapped, so you could run that one test over the entries in src/commands/provider-plugin-catalog.ts and drop the AWS copy, or leave it as is.

The hosted checks for 12ec6c4 show no failing or pending job, and the changes since the last review are a type-import swap and tests. There are no conflicts. The earlier thread on the unprimed provider fallback is resolved without a change, which is right: provider-policy.ts gives AWS the same fallback as BrowserStack, production readers prime first, and an uninstalled plugin returns plugin-not-installed. The new AWS admission test covers this. Please resolve #4617 (comment).

No live AWS Device Farm run exists. The PR body names the blocker, as #3310 allows, so the setUpSlot -> plugin.setup -> host.runHostCommand route with the daemon cwd and env has not run against real AWS.

Before merge, the maintainer needs to accept the named live-AWS gap for 0.22, and #4579, #4621 and #4636 must merge first, in that order.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 17, 2026
@thymikee

thymikee commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

AWS live acceptance passed at exact published combined head 8c5fabc15e261b9eb67fd60fe16e3c049f1251fb. This is now the published PR head; its stack conflict is resolved. Pinned Node 24.13.0 and pnpm 11.17.0 were verified for parent and child. Genuine native assets were generated and checked in the archive; the supported archive packing helper avoided recursive prepack. This run does not claim the release hook or separate broad/hosted gates passed.

The public packed CLI installed the AWS plugin in a fresh store. Its SHA512 integrity and installation matched plugins list, which reported compatibility; the isolated daemon reported aws-device-farm active from the store. Core SHA256: 04ca9b3bfc8582761f193415a3f5576b32aa0e99051f241c4ece588a2659990d; plugin SHA256: 036d3363f29edcdcd5ff0161af4a24c84fc943b53920844c002a49d7bd10d3f4.

The initial Pixel 10 Pro was busy before allocation. From that same inventory, a single targeted refresh admitted the available Galaxy A15 / Android 14. One connect, one open of com.amazon.devicefarm.sampleapp, and one interactive snapshot passed. The snapshot contained 11 nodes, including “Hello Device Farm!”, through appium-source.

Product close passed. Independent AWS reads confirmed the same uniquely owned session reached COMPLETED / PASSED; the owned daemon is stopped. No fallback stop or outer execution retry was used. Raw service identifiers and receipts remain private.

The earlier 378947d S24 Ultra run remains a separate failed provisioning observation: it stayed PENDING_DEVICE, produced no snapshot, and product close returned SESSION_NOT_FOUND. Its session was later confirmed COMPLETED / STOPPED, with stopping actor unknown. The new A15 success does not establish that earlier failure’s cause.

The published head removes private after verified empty-placeholder tags and maintainer-attested OIDC. Its exact affected/full gates passed 42/41 checks respectively, each with 25 skips and an unchanged checkout. Released-wire, packed AWS strict-consumer/failure-contract/isolated CLI checks and BrowserStack public-manager installation passed separately. The strict consumer uses repository Node types. Hosted checks are now complete at this exact head: 18 successful, two skipped and one neutral. Sentinel reports no open findings, with the generated lockfile excluded from its prompt; all 22 review threads are resolved. The Chief of Staff owns readiness labels. No usable npm plugin release or merge action is claimed.

@thymikee
thymikee force-pushed the feat/0.22-aws-device-farm-plugin branch from 12ec6c4 to 378947d Compare November 17, 2026 15:24

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 1 new finding on 378947d. The verdict and the full list are in the summary comment.

Comment thread packages/plugins/src/host.ts Resolved
@thymikee thymikee added ready-for-human Valid work that needs human implementation, judgment, or maintainer merge and removed ready-for-human Valid work that needs human implementation, judgment, or maintainer merge labels Nov 17, 2026
@thymikee
thymikee force-pushed the feat/0.22-aws-device-farm-plugin branch from 378947d to 8c5fabc Compare November 17, 2026 18:22
@thymikee

Copy link
Copy Markdown
Member Author

The range-diff of this PR's 15 commits from 378947d to 8c5fabc is empty, so the earlier clean review carries forward. 8c5fabc is also the commit the live AWS Device Farm acceptance ran on, so that evidence now covers the head. CI is green and there are no conflicts.

@thymikee
thymikee merged commit 873de91 into 0.22 Nov 17, 2026
21 checks passed
@thymikee
thymikee deleted the feat/0.22-aws-device-farm-plugin branch November 17, 2026 21:01
thymikee added a commit that referenced this pull request Nov 18, 2026
…eboot (#4585)

LOCAL REPRODUCER — EXPECTED FAILING. Do not merge or include in a gate.

Reproduces #4585 at the routed session boundary on agent-device #4539's published
object, with real claim files and the composed boot-observation port. No device,
ADB, or simctl.

Sequence per case: cold `open` of a stopped AVD (readiness boots it, the session
records bootedByOpen, and the claim is written for the booted serial after that
boot), then a plain `open` on the same identity, then plain `close`. Cases differ
only in the boot the observation service reports, and the external-reboot case
names a boot epoch that is already in the past when the reopen starts.

Recorded results at bcb9196:

  `pnpm exec vitest run --project unit-core <this file>`
  -> 1 failed | 2 passed (3)

  external reboot, then reopen, then plain close:
    reopen boots nothing (readiness asked once, at cold open; the reopen renewed
    the existing claim and kept the same ownerToken and boot marker)
    the reopen stamps claim.updatedAtMs AFTER the foreign boot, so a renewal
    stamp cannot tell the two boots apart
    close asked finalizeApplicationClose({ shutdownTarget: true }) and the
    platform's shutdownTarget ran once; response.data.shutdown was set
    -> WRONG: the current boot is not the one this session caused
  same-boot control (observed boot == claim creation): same ask, and it is correct
  boot observation unavailable: same ask
  close with no intervening reopen: same ask
  explicit `close --shutdown`: same ask, and it is correct
  policy denying device-shutdown: kept running, reports the kept-device warning

Detection was measured in a disposable checkout at the same object: the failing
case above passes when implicit stop is additionally denied for a current boot
that postdates the claim this session's booting open wrote. Anchoring that
comparison on the claim's `updatedAtMs` instead does NOT fix the case, and a
reopen cannot itself boot the device, so claim creation is the sound anchor.

Base identity:
  reproduction head  bcb9196 (#4539 published head)
  checkout base      873de91 (0.22, "feat: extract
                     AWS Device Farm provider plugin (#4617)")
  merge-base         7ccde11
  873de91 is NOT an ancestor of bcb9196; the five commits 0.22 has beyond the
  merge-base touch no session, claim, boot or close owner.
thymikee added a commit that referenced this pull request Nov 19, 2026
…eboot (#4585)

LOCAL REPRODUCER — EXPECTED FAILING. Do not merge or include in a gate.

Reproduces #4585 at the routed session boundary on agent-device #4539's published
object, with real claim files and the composed boot-observation port. No device,
ADB, or simctl.

Sequence per case: cold `open` of a stopped AVD (readiness boots it, the session
records bootedByOpen, and the claim is written for the booted serial after that
boot), then a plain `open` on the same identity, then plain `close`. Cases differ
only in the boot the observation service reports, and the external-reboot case
names a boot epoch that is already in the past when the reopen starts.

Recorded results at bcb9196:

  `pnpm exec vitest run --project unit-core <this file>`
  -> 1 failed | 2 passed (3)

  external reboot, then reopen, then plain close:
    reopen boots nothing (readiness asked once, at cold open; the reopen renewed
    the existing claim and kept the same ownerToken and boot marker)
    the reopen stamps claim.updatedAtMs AFTER the foreign boot, so a renewal
    stamp cannot tell the two boots apart
    close asked finalizeApplicationClose({ shutdownTarget: true }) and the
    platform's shutdownTarget ran once; response.data.shutdown was set
    -> WRONG: the current boot is not the one this session caused
  same-boot control (observed boot == claim creation): same ask, and it is correct
  boot observation unavailable: same ask
  close with no intervening reopen: same ask
  explicit `close --shutdown`: same ask, and it is correct
  policy denying device-shutdown: kept running, reports the kept-device warning

Detection was measured in a disposable checkout at the same object: the failing
case above passes when implicit stop is additionally denied for a current boot
that postdates the claim this session's booting open wrote. Anchoring that
comparison on the claim's `updatedAtMs` instead does NOT fix the case, and a
reopen cannot itself boot the device, so claim creation is the sound anchor.

Base identity:
  reproduction head  bcb9196 (#4539 published head)
  checkout base      873de91 (0.22, "feat: extract
                     AWS Device Farm provider plugin (#4617)")
  merge-base         7ccde11
  873de91 is NOT an ancestor of bcb9196; the five commits 0.22 has beyond the
  merge-base touch no session, claim, boot or close owner.
thymikee added a commit that referenced this pull request Nov 19, 2026
* Extract AWS Device Farm provider plugin

* refactor(aws-device-farm): consolidate WebDriver imports

* test(aws-device-farm): colocate connection coverage

* Test packed AWS provider error boundary

* refactor(provider-webdriver): remove unused extraction scaffolding

* chore(gates): register the AWS packed smoke entry

* chore(gates): verify the explicit WebDriver plugin subpath

* test(layering): update WebDriver export boundary

* chore(gates): separate root dependency ownership from workspace references

* chore(gates): check workspace declarations in script test imports

* fix(plugins): defer host command execution imports

* refactor(webdriver): remove unused provider exports

* fix(plugins): preserve supplied command host context

* fix: address AWS plugin review findings

* fix(aws-device-farm): publish typed plugin entrypoints

* test(docs): resolve installed workspace plugins

* fix(ci): select moved snapshot differential test

* refactor(aws): import host capability types from the plugin SDK

* test(aws): cover routed plugin admission

* test(aws): register provider for stored lease fixtures

* chore(aws): enable package publication
thymikee added a commit that referenced this pull request Nov 20, 2026
* Extract AWS Device Farm provider plugin

* refactor(aws-device-farm): consolidate WebDriver imports

* test(aws-device-farm): colocate connection coverage

* Test packed AWS provider error boundary

* refactor(provider-webdriver): remove unused extraction scaffolding

* chore(gates): register the AWS packed smoke entry

* chore(gates): verify the explicit WebDriver plugin subpath

* test(layering): update WebDriver export boundary

* chore(gates): separate root dependency ownership from workspace references

* chore(gates): check workspace declarations in script test imports

* fix(plugins): defer host command execution imports

* refactor(webdriver): remove unused provider exports

* fix(plugins): preserve supplied command host context

* fix: address AWS plugin review findings

* fix(aws-device-farm): publish typed plugin entrypoints

* test(docs): resolve installed workspace plugins

* fix(ci): select moved snapshot differential test

* refactor(aws): import host capability types from the plugin SDK

* test(aws): cover routed plugin admission

* test(aws): register provider for stored lease fixtures

* chore(aws): enable package publication
thymikee added a commit that referenced this pull request Nov 20, 2026
* Extract AWS Device Farm provider plugin

* refactor(aws-device-farm): consolidate WebDriver imports

* test(aws-device-farm): colocate connection coverage

* Test packed AWS provider error boundary

* refactor(provider-webdriver): remove unused extraction scaffolding

* chore(gates): register the AWS packed smoke entry

* chore(gates): verify the explicit WebDriver plugin subpath

* test(layering): update WebDriver export boundary

* chore(gates): separate root dependency ownership from workspace references

* chore(gates): check workspace declarations in script test imports

* fix(plugins): defer host command execution imports

* refactor(webdriver): remove unused provider exports

* fix(plugins): preserve supplied command host context

* fix: address AWS plugin review findings

* fix(aws-device-farm): publish typed plugin entrypoints

* test(docs): resolve installed workspace plugins

* fix(ci): select moved snapshot differential test

* refactor(aws): import host capability types from the plugin SDK

* test(aws): cover routed plugin admission

* test(aws): register provider for stored lease fixtures

* chore(aws): enable package publication
thymikee added a commit that referenced this pull request Nov 21, 2026
* Extract AWS Device Farm provider plugin

* refactor(aws-device-farm): consolidate WebDriver imports

* test(aws-device-farm): colocate connection coverage

* Test packed AWS provider error boundary

* refactor(provider-webdriver): remove unused extraction scaffolding

* chore(gates): register the AWS packed smoke entry

* chore(gates): verify the explicit WebDriver plugin subpath

* test(layering): update WebDriver export boundary

* chore(gates): separate root dependency ownership from workspace references

* chore(gates): check workspace declarations in script test imports

* fix(plugins): defer host command execution imports

* refactor(webdriver): remove unused provider exports

* fix(plugins): preserve supplied command host context

* fix: address AWS plugin review findings

* fix(aws-device-farm): publish typed plugin entrypoints

* test(docs): resolve installed workspace plugins

* fix(ci): select moved snapshot differential test

* refactor(aws): import host capability types from the plugin SDK

* test(aws): cover routed plugin admission

* test(aws): register provider for stored lease fixtures

* chore(aws): enable package publication
thymikee added a commit that referenced this pull request Nov 21, 2026
* Extract AWS Device Farm provider plugin

* refactor(aws-device-farm): consolidate WebDriver imports

* test(aws-device-farm): colocate connection coverage

* Test packed AWS provider error boundary

* refactor(provider-webdriver): remove unused extraction scaffolding

* chore(gates): register the AWS packed smoke entry

* chore(gates): verify the explicit WebDriver plugin subpath

* test(layering): update WebDriver export boundary

* chore(gates): separate root dependency ownership from workspace references

* chore(gates): check workspace declarations in script test imports

* fix(plugins): defer host command execution imports

* refactor(webdriver): remove unused provider exports

* fix(plugins): preserve supplied command host context

* fix: address AWS plugin review findings

* fix(aws-device-farm): publish typed plugin entrypoints

* test(docs): resolve installed workspace plugins

* fix(ci): select moved snapshot differential test

* refactor(aws): import host capability types from the plugin SDK

* test(aws): cover routed plugin admission

* test(aws): register provider for stored lease fixtures

* chore(aws): enable package publication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant