Skip to content

refactor(providers): unavailableFact for WebDriver and limrun, drop unused AWS options - #3303

Merged
thymikee merged 4 commits into
simplify/unavailable-factfrom
simplify/unavailable-fact-providers
Oct 8, 2026
Merged

thymikee merged 4 commits into
simplify/unavailable-factfrom
simplify/unavailable-fact-providers

Conversation

@thymikee

@thymikee thymikee commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Stacked on #3302. The WebDriver and limrun provider runtimes adopt unavailableFact for their refused operations, and two restated surfaces in provider-webdriver go away:

  • the inactive-session facts are built from createFullyUnavailablePlatformRuntimeFacts(inactiveSession) plus the one fold override instead of thirty hand-listed cells;
  • AwsDeviceFarmWebDriverRuntimeOptions loses eight fields no caller supplies (clientVersion, region, webdriverCapabilities, configuration, deviceId, requestPolicy, prepareSession, and the lease-resolved sessionName), along with the LeaseValue helper that only served them. The type is not exported from the package.

4 files, net −126 lines. No fact value or session capability changes.

Validation

Tested at 87e7be8: pnpm check:affected --run passed (format, lint, typecheck, related tests including platform-runtime.test.ts, aws-device-farm.test.ts, interaction-operations.test.ts). No device run applies.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.13 MB 5.12 MB -3.3 kB
Package (unpacked) 5.13 MB 5.12 MB -3.3 kB
Package (download) 1.54 MB 1.54 MB -117 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 24.3 ms 25.7 ms +1.4 ms
CLI --help 70.1 ms 70.9 ms +0.8 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.

No issues found across 4 files

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

@thymikee

thymikee commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

This PR is ready at 87e7be8. I found no problems in the code, and the evidence the change needs is in place. Not blocking: provider-limrun/src/facts-runtime.ts (https://github.com/callstack/agent-device/blob/87e7be8/packages/provider-limrun/src/facts-runtime.ts#L32) and deployment-runtime.ts still use hand-written {available:false,...} literals, so the limrun change covers only interaction-operations.ts; you can move them to unavailableFact here or later, or narrow the title, or leave it as is. The one failing check is the Integration Tests job, at test/integration/smoke-daemon-clean.test.ts:106. There, isProcessAlive(info.pid) returned true after a forced daemon retirement. That looks like an unrelated pid-reaping timing flake, because this diff touches only WebDriver and AWS fact code and limrun interaction facts, and the failing route (stopAndRetireDaemon) loads none of them. I did not re-run that test or run unit tests or typecheck myself, and the check:affected pass is from your report. No conflicts. Before merge, please re-run the Integration Tests job and land #3302 first, since this PR is stacked on it.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 7, 2026
@thymikee
thymikee added this pull request to stack #3313 October 8, 2026 07:53
thymikee and others added 2 commits October 8, 2026 10:03
…ailableFact

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- build the inactive-session facts from the fully-unavailable table
  instead of restating thirty cells
- remove AWS Device Farm options no caller supplies, and the LeaseValue
  helper that only served them

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@thymikee

thymikee commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

Addressed at fc7915e (rebased on the current #3302 head): facts-runtime.ts and deployment-runtime.ts in provider-limrun now build their refusals through unavailableFact, so the limrun owner is covered end to end. pnpm check:affected --run passed at fc7915e; the Integration Tests job re-runs on the push.

@thymikee
thymikee force-pushed the simplify/unavailable-fact-providers branch from 87e7be8 to fc7915e Compare October 8, 2026 08:08
…rough unavailableFact

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@thymikee
thymikee force-pushed the simplify/unavailable-fact-providers branch from fc7915e to c754951 Compare October 8, 2026 08:15
@thymikee

thymikee commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

The PR is ready at c754951. The earlier review of 87e7be8 found it clean, and the new commit only changes how provider-limrun builds its constant refusal facts. The values stay the same.

Not blocking: packages/provider-webdriver/src/runtime-deployment.ts:121 still returns two hand-built {available:false, reason:'owner-capability-missing', hint} facts in deploymentFact. The PR says the WebDriver provider runtimes use unavailableFact for their refusals, so both branches could return unavailableFact('owner-capability-missing', ...). The first one also repeats the hint text of inactiveSession in platform-runtime.ts, so a shared constant would help. You can take this here, in a follow-up, or leave it.

I did not run typecheck or the provider-limrun tests. I relied on your check:affected result at fc7915e and on reading the commit. Both Smoke Tests jobs are still queued, not failed. They drive local iOS and Android devices and never load the limrun provider, so this diff does not touch their route. The checks must finish green, and #3302 (the base) must merge first.

… runtime and deployment facts

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@thymikee

thymikee commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

Addressed at bf64256: deploymentFact in runtime-deployment.ts now returns webDriverInactiveSession (one exported constant the runtime facts reuse as inactiveSession) and builds the capability refusal through unavailableFact. pnpm check:affected --run passed at bf64256.

@thymikee
thymikee merged commit 6c6ba47 into main Oct 8, 2026
19 of 20 checks passed
@thymikee
thymikee deleted the simplify/unavailable-fact-providers branch October 8, 2026 10:53
@github-actions

github-actions Bot commented Oct 8, 2026

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

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