Repository navigation
Conversation
Size Report
Startup median (7 runs, lower is better):
|
|
There was a problem hiding this comment.
All reported issues were addressed across 56 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
Two tests in this PR no longer reach the real daemon, so they cannot catch daemon regressions. Reviewed commit 1908337. CodeQL fails on this head, and the Smoke Tests jobs are still queued. Once the two findings below are fixed and the checks are green, nothing else stops the merge. No conflicts. The test in remote-test-artifacts-materialization.test.ts (https://github.com/callstack/agent-device/blob/1908337/test/integration/provider-scenarios/remote-test-artifacts-materialization.test.ts#L75) says it covers the composed daemon and client path. It now packs the directory with The fake upstream in remote-proxy-artifact-tenant.test.ts (https://github.com/callstack/agent-device/blob/1908337/test/integration/provider-scenarios/remote-proxy-artifact-tenant.test.ts#L28) enforces the tenant rule itself, then the test asserts that the fake refuses the other tenant. remote-proxy-request-diagnostics.test.ts:50 likewise answers any session path with a canned record. These doubles fail the way the test author wrote them, not the way the daemon fails. A regression in the daemon's artifact tenant check or diagnostics path resolution would still pass. Not blocking: at remote-proxy-parity.test.ts:314, Could one rule replace most of the copies here: a root test that names a daemon producer either runs it through the public harness or moves into the daemon package? Then the proxy and artifact scenarios would use the harness daemon behind the shared forwarder. The output-economy digests and help-conformance error samples would become golden fixtures that tests in Open review threads still apply:
This was a read-only review. I did not rerun the mutation checks, provider-integration or concurrency-torture. I did not inspect the individual move commits, so similarity comes from the PR body. I also did not confirm whether a daemon-package test already pins web-provider ref actions without coordinates, or the |
There was a problem hiding this comment.
All reported issues were addressed across 33 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
Thanks for the update. The new commit 6c6437e fixes most of the earlier points, but two findings from 1908337 are still open. Fixed since the last review: the response-views and help-conformance fixtures now call the real daemon code, the platform-runtime flag is gone, the stale-provider install now goes through the harness daemon, and the extra assertions on the proxy upstream are in. Required evidence is in place. The materialization scenario at test/integration/provider-scenarios/remote-test-artifacts-materialization.test.ts:76 is named "composed daemon and client path", but it still does not use the daemon. The new The tenant scenario at test/integration/provider-scenarios/remote-proxy-artifact-tenant.test.ts:27 has the same gap. The upstream is a fake that returns 401 when the tenant header differs (lines 27-36), and the test asserts that the fake refuses. remote-proxy-request-diagnostics.test.ts:50 still answers with a canned record. On main this scenario used the real createDaemonHttpServer with trackDownloadableArtifact. A regression in the daemon's tenant check or in its diagnostics path resolution now passes, so "tenant-scoped" proves only that the proxy forwards the header. Please move createRecordingUpstreamServer (remote-proxy-parity.test.ts:285), which forwards to the real harness daemon, into harness.ts. Then route the tenant, diagnostics and materialization scenarios through it and assert on the recorded forwarded requests, so one shared fixture owns "proxy in front of the real daemon". Not blocking, and you can take or leave it: scripts/lib/lane-envelope.ts is now a pass-through re-export with four importers (scripts/fuzz/envelope.ts, scripts/fuzz/harness.test.ts, scripts/mutation/envelope.test.ts, scripts/mutation/run.ts), so you could import @agent-device/test-kit there and delete the shim, and the related-selection edge raised on render-fixtures.ts also applies to the second subprocess driver at scripts/tests/help-conformance-sample-producers.ts:109, so fixing both together would be cleaner. Would lifting the recording forwarder into harness.ts and running every proxy and artifact scenario against the harness daemon be simpler overall? Both archive and download-server copies (packages/remote/src/tests/support and test/integration/provider-scenarios/artifact-download-fixtures.ts) could then go. For output-economy and help-conformance, could tests in packages/daemon emit or pin golden fixtures from RESPONSE_VIEWS and the error builders, so the root gates read static fixtures with no subprocess and no hidden import edge? That needs a shared home for golden daemon-output fixtures that both daemon tests and root gates can import, plus a harness-owned proxy-in-front-of-daemon fixture. Open threads from other reviewers: these still apply, #3733 (comment) (finally-block cleanup order), #3733 (comment) (subprocess driver import edge), #3733 (comment) (proxy diagnostics parity), #3733 (comment) (token checked only by fake), and one lower-priority thread on the duplicated packer and server (#3733 (comment)). These are fixed at 6c6437e and can be resolved: #3733 (comment) (public open response check added), #3733 (comment) (click and hover ref checks added), #3733 (comment) (digests now come from RESPONSE_VIEWS), #3733 (comment) (lane-envelope moved to test-kit), #3733 (comment) (boolean flag removed), #3733 (comment) (real error builders used), #3733 (comment) (install goes through harness daemon), #3733 (comment) (device id and lease checks added), #3733 (comment) (tenantId asserted), #3733 (comment) (Bearer token asserted), #3733 (comment) (exact URL asserted), #3733 (comment) (redundant rmSync removed), #3733 (comment) (rpc URL built from baseUrl). CI is still running and no job has failed. Smoke and Coverage run the test tree this PR rewrites, so their results matter once they finish. The Mutants kernel-errors and selectors shards run on packages this PR does not touch. There are no conflicts. I did not run the two subprocess drivers, so their package resolution under |
There was a problem hiding this comment.
All reported issues were addressed across 15 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
c197ce8 to
eee378d
Compare
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
You’re at about 91% 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
ed4d96d to
f2592cb
Compare
Summary
origin/mainafter refactor(remote): extract src/remote into @agent-device/remote #3711 extractedsrc/remoteinto@agent-device/remoteand refactor(plugins): extract the provider plugins into a private package #3712 moved provider plugins into a private package. The remote diagnostics conflict now targets@agent-device/remote/remote-request-diagnostics; the artifact-directory client test moved besidepackages/remote/src/daemon-artifacts.ts.startDaemonRuntime, the root composition, the real daemon HTTP server, and a real client. Provider scenarios use the public runtime/client and no daemon testing imports.packages/daemon/src/server/http; moved the Node concurrency-torture lane and its helpers intopackages/daemon/test/nightly.Placement
remote-test-artifacts-directorynow tests@agent-device/remote'sdaemon-artifactsmodule inpackages/remote/src/__tests__, beside the module it exercises. The proxy diagnostics, tenant, parity, and materialization scenarios stay intest/integration/provider-scenariosbecause they cover composed proxy, daemon, replay-port, and remote-client behavior; the package-local remote tests already cover its individual transfer modules. Provider scenarios remain integration tests around the real daemon and private plugin packages, rather than copies of their package-local runtime tests.scripts/layeringfiles were checked as text:model.tshas a comment, whilepackage-boundaries-facade.test.tsandtest-kit-isolation.test.tsuse fixture strings. None imports daemon test support or callsvi.mockwith it.Test counts
Counts are test cases at the main path and at the head destination. Helper files have no test cases.
test/integration/provider-scenarios/harness.tstest/integration/provider-scenarios/stale-provider-runtime-admission.fixtures.tstest/integration/provider-scenarios/cloud-webdriver-lease-http.test.tstest/integration/provider-scenarios/cloud-webdriver-runtime.test.tstest/integration/provider-scenarios/daemon-http-server.test.tspackages/daemon/src/server/http/http-server-provider-scenarios.test.tstest/integration/provider-scenarios/ios-fold.test.tstest/integration/provider-scenarios/ios-wait-selector.test.tstest/integration/provider-scenarios/limrun-ios-snapshot-owner.test.tstest/integration/provider-scenarios/remote-proxy-artifact-tenant.test.tstest/integration/provider-scenarios/remote-proxy-parity.test.tstest/integration/provider-scenarios/remote-proxy-request-diagnostics.test.tstest/integration/provider-scenarios/remote-test-artifacts-directory.test.tspackages/remote/src/__tests__/daemon-artifacts-directory.test.tstest/integration/provider-scenarios/remote-test-artifacts-materialization.test.tstest/integration/provider-scenarios/scroll-until.test.tstest/integration/nightly/concurrency-torture/bindings.tspackages/daemon/test/nightly/concurrency-torture/bindings.tstest/integration/nightly/concurrency-torture/harness.tspackages/daemon/test/nightly/concurrency-torture/harness.tstest/integration/nightly/concurrency-torture/invariants.tspackages/daemon/test/nightly/concurrency-torture/invariants.tstest/integration/nightly/concurrency-torture/real-scope-serialization.tspackages/daemon/test/nightly/concurrency-torture/real-scope-serialization.tstest/integration/command-coverage/declarations.tstest/integration/interaction-contract/native-ref.contract.test.tstest/output-economy/render-fixtures.tsscripts/__tests__/help-conformance-sample-producers.tsscripts/layering/model.tsscripts/layering/package-boundaries-facade.test.tsscripts/layering/test-kit-isolation.test.tsAdditional moves and split tests:
test/integration/nightly/concurrency-torture.test.tspackages/daemon/test/nightly/concurrency-torture.test.tstest/integration/nightly/concurrency-torture/claim-registry.tspackages/daemon/test/nightly/concurrency-torture/claim-registry.tstest/integration/nightly/concurrency-torture/deterministic-scheduler.tspackages/daemon/test/nightly/concurrency-torture/deterministic-scheduler.tstest/integration/nightly/concurrency-torture/envelope.tspackages/daemon/test/nightly/concurrency-torture/envelope.tstest/integration/nightly/concurrency-torture/prng.tspackages/daemon/test/nightly/concurrency-torture/prng.tspackages/daemon/test/nightly/concurrency-torture/lane-envelope.tspackages/daemon/src/core/__tests__/session-action-recorder.test.tspackages/daemon/src/execution/interaction/internal/interaction-touch-response-contract.test.tsThe native-ref contract remains at 9 cases; its daemon-only response-builder assertion moved to the new package test,
the response builder keeps capture evidence out of serialized touch payloads. The recorder test addsordinary action history preserves authored commands, positionals, and replay flagsand--no-record suppresses a mutating coordinate press from action history. Root script-publication scenarios retain their public error, saved-file, and replay assertions; daemon recording and publication state assertions are covered beside the owning daemon modules, includingparameterized fills keep literals out of recording state with deterministic placeholders,publishes without close, returns the path/count, and leaves a terminal live session,#1533: a re-open leaves an aborted authoring lifecycle aborted, and not recording, and#1533: an ordinary armed authoring session still publishes on bare close. The scroll pass-limit assertion is covered bypackages/daemon/src/execution/scroll-until.test.ts, testthe default budget is the shared constant. The stale-provider scenario still asserts unavailable facts; the daemon fail-closed response/no-bind assertion is owned bypackages/daemon/src/sessions/handlers/__tests__/session-reinstall.test.ts, testinstall fails closed before binding when its provider owner lacks deployment. No test case was dropped from a moved test.Selection
provider-integration(vitest.config.ts, includetest/integration/provider-scenarios/**/*.test.ts).src/**/*.test.tstests are selected byunit-coreviapackages/*/src/**/*.test.ts.packages/remote/src/__tests__/daemon-artifacts-directory.test.tsis selected byunit-corethrough that same package-source include and by CI'sunit-cicoverage gate (test:coverage:ci). Its three tests pass after the relocation.node:testlane, not a Vitest project. Thetest:concurrency-torturescript selectspackages/daemon/test/nightly/concurrency-torture.test.ts; both the PR CI lane and nightly workflow call the existingconcurrency-torturegate. The packagetest/path is outsideunit-core.pnpm check:gate-manifest: passed, 57 checks wired across 25 lanes.pnpm test:concurrency-torture: passed, 4 tests.Moves
Pure move commits are separate from edits:
20972a21f(concurrency tree),f402a5f00(HTTP test), and10c48bf63(remote artifact-directory test). The move commits contain no line edits; follow-up edits are separate.git diff -M --summary origin/main...HEADreports the concurrency test 100%, concurrency helpers 77–98%, HTTP test 98%, and remote artifact-directory test 69% similarity.Mocks and spies
limrun-ios-snapshot-owner.test.ts:@limrun/apimock is observed bycreateInstance.mock.calls.length === 1.limrun-ios-snapshot-owner.test.ts:@limrun/api/ios-clientmock is observed byelementTree.mock.calls.length === 1.stale-provider-runtime-admission.test.ts:@limrun/apimock is observed by one allocation before release and no additional allocation before admission.stale-provider-runtime-admission.test.ts:@limrun/api/instance-clientmock is observed by the release-timedisconnect.cloud-webdriver-runtime.test.ts: theDate.nowspy advances past lease expiry; the server records WebDriver DELETE.remote-proxy-parity.test.tsexpiry case: theDate.nowspy advances past expiry; the proxy returnsLEASE_NOT_FOUNDand a fresh lease has no prior comparison state.remote-proxy-parity.test.tsheartbeat case: theDate.nowspy proves renewed expiry moves forward and the session baseline remains usable.ios-fold.test.ts: theDate.nowspy advances by accumulated tool timeout; the final permitted hinge read succeeds and stays within the client envelope.The dead
ios-app-session-hintand Apple runner operations mocks were removed.Mutation checks
Each new or moved destination test was mutated and then restored:
downloadRemoteArtifactforced to treat directories as files: the moved remote artifact-directory test failed on extraction and rejected symlink coverage; the implementation was restored.scoped-provider: the iOS guard hit its record timeout; the fake was restored tolocal-lease.Exports
packages/daemonexports: 78 on main (.plus 77 testing exports) → 63 on this branch (.plus 62 testing exports). This PR removes:Remaining exports and their owners:
mcp:57b5c3dd(44):./testing/__tests__/android-observation-fixture,./testing/__tests__/application-lifecycle-runtime-fixture,./testing/__tests__/capture-disclosure-target-activation-fact,./testing/__tests__/interaction-get-runtime-fixture,./testing/__tests__/legacy-snapshot-capture-fixture,./testing/__tests__/request-router-dispatch-mocks,./testing/__tests__/request-router-open-harness,./testing/__tests__/runtime-binding-conformance,./testing/__tests__/screenshot-runtime-fixture,./testing/__tests__/selector-capture-fixture,./testing/__tests__/snapshot-runtime-fixture,./testing/__tests__/support/command-surface-fake,./testing/__tests__/support/screen-recording-live-handle,./testing/__tests__/support/unavailable-device-runtime-gateway,./testing/__tests__/test-device-runtime-gateway,./testing/android-system-dialog,./testing/app-events,./testing/artifact-tracking,./testing/capture-disclosure,./testing/deferred-interaction-outcome,./testing/device/device-ready,./testing/generic-leaf-execution,./testing/gesture-runtime,./testing/handlers/snapshot,./testing/interaction/index,./testing/interaction/internal/__tests__/*,./testing/provider-device-admission,./testing/ref-frame,./testing/request-dispatch-disclosure,./testing/request-finalization,./testing/request-generic-dispatch,./testing/request-handler-chain,./testing/request-platform-provider-context,./testing/screenshot-runtime,./testing/selector-capture-binding,./testing/selector-runtime,./testing/selector-runtime-backend,./testing/session-capture-binding,./testing/session-snapshot,./testing/session-state,./testing/snapshot-diff-runtime,./testing/snapshot-quality-latch,./testing/snapshot-runtime,./testing/wait-runtime.src/**owner (9):./testing/__tests__/human-control-fixtures,./testing/__tests__/platform-services-fixture,./testing/handlers/__tests__/*,./testing/handlers/lease,./testing/handlers/session-appstate,./testing/provider-lease-expiry,./testing/server/transport,./testing/session-action-recorder,./testing/session-runtime. test: move root src tests off the daemon's testing exports #3728 owns seven removals from this root-src work, including./testing/server/transport; this PR leaves all nine alone.src/**owners (8):./testing/__tests__/support/session-factories,./testing/__tests__/support/store-factory,./testing/lease-registry,./testing/request-dispatch-ledger,./testing/request-runtime-binding,./testing/server/http-server,./testing/session-store,./testing/snapshot-interactor-capture../testing/contextis named only byscripts/layering/test-kit-isolation.test.ts; it is not a live importer. Its released export remains for the final-pin owner, threadmcp:57b5c3dd, to resolve.Validation:
CI=true pnpm install --frozen-lockfile,pnpm build,pnpm format,pnpm check:quick,pnpm check:layering,pnpm check:fallow,pnpm check:gate-manifest,pnpm test:concurrency-torture, and provider-integration (61 files, 184 tests) passed. Layering reports 75 test-only exports against 90 at its base and R84 unchanged at 191 unmatched tests. The rebase's four priorcheck:affected --runtiming failures were rerun one by one and all passed: daemon-command-policy 1/1 (14.03s), fuzz self-check 1/1 (4.02s), Apple runner cancellation 8/8 (0.82s), and request-router open-claim recovery 3/3 (0.89s). The full affected run is not repeated here. The output guard's fake runner-recording transport now declares runner recording unavailable; its iOS simulator case passes with the injected simulator transport.