Repository navigation
refactor(tests): colocate platform-web, android, host-kit, kernel, webdriver and vega tests - #3648
Merged
Merged
Conversation
Contributor
Size Report
Startup median (7 runs, lower is better):
|
…ver and vega tests for the module they test Pure renames; the only content changes are the vega test's self-import (now relative) and the dispatch-disclosure driver path that names the web test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…module it covers browserstack-profile-fields, aws-device-farm-profile-fields and index-profile-fields each sit beside their module; the shared consumedProfileFields helper joins the package's profile-fields fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sure driver never reaches A temporary spy on the mocked cleanupManagedAgentBrowserOrphansForProviderStartup recorded zero calls across all eight cases, so the mock and its hoisted spy did nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e entry The driver exercises input-actions, text-input, touch-helper and the adb executor against the contracts table, so it takes the package entry's name. The owning-path strings in the contracts fixture follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thymikee
force-pushed
the
refactor/test-colocation-media-platforms
branch
from
October 15, 2026 12:42
8d26a35 to
ab774b6
Compare
Member
Author
|
This PR is ready at ab774b6. The test moves look correct, and I found nothing that needs a change. Not blocking: the removed mock of cleanupManagedAgentBrowserOrphansForProviderStartup in agent-browser-provider-dispatch-disclosure.test.ts means the real orphan cleanup could now run if a case sets openWebSessionNames and the managed install exists, so you may want to confirm the test helper never sets it, or take or leave this. I did not run the tests or the guards locally, and I did not check that the removed mock was unreachable. CI has not finished: the queued Repo Guards, Coverage, Integration and Smoke jobs have not failed, and they need to go green before merge. There are no conflicts. |
Contributor
|
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.
Summary
Colocation renames for the small packages (platform-web, platform-android, host-kit, kernel, provider-webdriver, platform-vega). Every renamed test is now named for the module it exercises and sits beside it. No fixture export is touched here (those come in later PRs), so the fixture decision table is empty.
The rule thread's colocation baseline and R83 list are not on main yet. This PR only shrinks what the seed will contain: 11 offenders removed (web 4, android 2, host-kit 1, kernel 1, webdriver 2, vega 1).
Commits
refactor(tests): name platform-web, android, host-kit, kernel, webdriver and vega tests…— puregit mv. Content changes: the vega test's self-import@agent-device/platform-vega→./index.ts, and the web driver's owning-path string incontracts/src/dispatch-disclosure.fixtures.ts.refactor(webdriver): split the profile-field declaration test…—provider-profile-fields.test.tscovered three modules, so it became one file per module; the sharedconsumedProfileFieldshelper joinedprofile-fields.fixtures.ts.test(web): drop the provider-startup cleanup mock the dispatch-disclosure driver never reaches— per coordinator decision: a temporary spy on the mockedcleanupManagedAgentBrowserOrphansForProviderStartuprecorded 0 calls across all 8 cases (the real function was never reachable), so the mock and its hoisted spy are deleted. 8/8 still pass.refactor(android): name the dispatch-disclosure driver for the package entry—dispatch-disclosure.test.ts→index-dispatch-disclosure.test.ts(it drives input-actions, text-input, touch-helper and the adb executor); both owning-path strings in the contracts fixture follow in the same commit.Renames
__tests__/agent-browser-boundary-faultsagent-browser-provider-boundary-faultsagent-browser-provider.ts__tests__/agent-browser-dispatch-disclosureagent-browser-provider-dispatch-disclosureagent-browser-provider.ts__tests__/agent-browser-record-refreshagent-browser-provider-record-refreshagent-browser-provider.ts(its header already says "agent-browser-provider's owned-process record gate")__tests__/agent-browser-record-retentionagent-browser-provider-record-retentionagent-browser-provider.ts__tests__/dispatch-disclosure__tests__/index-dispatch-disclosurerecording/failed-finishrecording/runtime-failed-finishrecording/runtime.ts(bindAndroidScreenRecordingRuntime)internal/durable-fileinternal/atomic-file-durableinternal/atomic-file.ts(publishDurableFileSync)presented-surfacerecord-presented-surfacerecord.ts(readPresentedSurfaceFact)webdriver-mutation-resendwebdriver-interactor-mutation-resendwebdriver-interactor.tsprovider-profile-fieldsbrowserstack-profile-fields,aws-device-farm-profile-fields,index-profile-fieldsbrowserstack.ts,aws-device-farm.ts,index.ts(BUNDLED_CLOUD_WEBDRIVER_PROVIDERS)__tests__/pluginsrc/index.test.tsindex.ts(vegaPlugin)Vega note:
index.test.tsis a new file for the module that definesvegaPlugin, not an addition to a legacy aggregation. If the reviewer would rather not have anindex.test.ts, say so and I'll pick another module;pluginis not a module in that package.Test-count parity (
vitest --reporter=json, passed/total)agent-browser-boundary-faults4/4agent-browser-provider-boundary-faults4/4agent-browser-dispatch-disclosure8/8agent-browser-provider-dispatch-disclosure8/8agent-browser-record-refresh12/12agent-browser-provider-record-refresh12/12agent-browser-record-retention3/3agent-browser-provider-record-retention3/3dispatch-disclosure20/20index-dispatch-disclosure20/20failed-finish1/1runtime-failed-finish1/1durable-file6/6atomic-file-durable6/6presented-surface6/6record-presented-surface6/6webdriver-mutation-resend25/25webdriver-interactor-mutation-resend25/25provider-profile-fields3/3browserstack-…1/1 +aws-device-farm-…1/1 +index-…1/1plugin2/2index.test.ts2/2Selection: every moved file lives under
packages/*/src/**, which theunit-coreinclude covers (vitest.config.ts).pnpm check:affected --runselected and passed 25 files including all of the renamed ones;check:gate-manifestis unchanged.vi.mockeffectivenessThe three moved tests with
vi.mockstay in their directories, so the mocked relative paths are unchanged. I still broke each path once (temporarily, reverted):agent-browser-provider-record-refresh(mocks../agent-browser-process-record.ts): 8 failed | 4 passed.agent-browser-provider-record-retention(mocks../agent-browser-process-record.ts): 2 failed | 1 passed.agent-browser-provider-dispatch-disclosure: its mock was dead (0 calls) and is removed in commit 3.Surface
exportscounts before → after: unchanged for every package (0 subpaths added or removed).input-ownership, handed to the contracts worker).Reported, not changed
platform-android/src/__tests__/input-ownership.test.tstests the contracts moduleandroid-input-ownership; per the coordinator it moves topackages/contractsvia the selectors/contracts worker, not here.Gates
Run on the final head (all exit 0):
pnpm check:quick,check:layering,check:fallow,check:gate-manifest,check:affected --run(all exit 0), pluspnpm format(clean tree).🤖 Generated with Claude Code