Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions .fallowrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,30 +337,15 @@
"GatedKeysAreResolverKeys"
]
},
{
// resolveVitestMaxWorkers is consumed by vitest.config.ts — a tool config outside --production analysis.
"file": "scripts/lib/vitest-concurrency.ts",
"exports": ["resolveVitestMaxWorkers"]
},
{
// Mutation-lane seam: readTestScope is consumed by vitest.mutation.config.ts, a tool config outside --production analysis.
"file": "scripts/mutation/test-scope.ts",
"exports": ["readTestScope"]
},
{
// Mutation-lane completeness gate: ownedTestFiles enumerates the whole derived ownership map, which only the assertion in ownership.test.ts consumes — a production consumer would defeat the point.
"file": "scripts/mutation/ownership.ts",
"exports": ["ownedTestFiles"]
},
{
// ADR 0010 shared-hint pin: the facade re-export's only consumer is src/__tests__/is-argument-surface-parity.test.ts, which asserts the daemon and CLI `is` surfaces raise the SAME hint text. The constant is live inside the package (predicates.ts raises it); a production consumer of the re-export would defeat the point, since it exists so neither surface copies the string.
"file": "packages/selectors/src/index.ts",
"exports": ["IS_PREDICATE_USAGE_HINT"]
},
{
// Help-benchmark conformance seams: helpTopicIds feeds the topic-coverage gate, and the *_SAMPLE constants feed the bench sample producers (scripts/__tests__/help-conformance-sample-producers.ts); every consumer is a test-tree file outside --production analysis.
"file": "{src/cli/parser/cli-help.ts,scripts/help-conformance-sample-outputs.mjs}",
"exports": ["helpTopicIds", "PRIVATE_AX_RECOVERY_SAMPLE", "DEVICE_CLAIM_IN_USE_SAMPLE"]
// Help-benchmark conformance seam: helpTopicIds feeds the topic-coverage gate, whose consumer is a test-tree file outside --production analysis.
"file": "src/cli/parser/cli-help.ts",
"exports": ["helpTopicIds"]
},
{
// #1458: getSessionCommandKind's former production consumer (the session.ts if-chain) was replaced by SESSION_COMMAND_HANDLER_IMPLS, which encodes command-kind groupings directly via shared handler references instead of a kind lookup. The accessor and its SessionCommandKind classification remain covered by daemon-command-registry.test.ts, a test-tree file outside --production analysis.
Expand Down
6 changes: 4 additions & 2 deletions docs/adr/0021-host-simlock-managed-device-allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ sandbox" model applies: agent-device does not verify that a device is leased.
- Remote access to a leased device uses Simlock's own gateway or HTTP API, or agent-device's
existing `proxy` and remote daemon; neither depends on the other.
- The CLI and daemon take no per-request Android adb server port: one daemon talks to one adb
server, so agents holding leases from different Simlock daemons use separate state dirs. Node SDK
callers can instead pass `serverPort` in `AndroidAdbExecutorOptions` (`agent-device/android-adb`).
server, so agents holding leases from different Simlock daemons use separate state dirs. The Node
SDK's `agent-device/android-adb` functions run the caller's own adb executor, so the caller points
that executor at Simlock's server; the per-call `serverPort` in `AndroidAdbExecutorOptions` takes
effect only when that executor honors it.

## 4. Withdrawn design

Expand Down
31 changes: 14 additions & 17 deletions packages/platform-android/src/__tests__/adb-executor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,28 +238,25 @@ test('createLocalAndroidAdbProvider exposes local pull and install capabilities'
]);
});

test('createLocalAndroidAdbProvider carries a private server port through every adb capability', async () => {
test('createLocalAndroidAdbProvider carries a per-call server port through every adb capability', async () => {
mockRunCmd.mockClear();
mockRunCmdBackground.mockClear();
const provider = createLocalAndroidAdbProvider(
{
platform: 'android',
id: 'emulator-5554',
name: 'Pixel Emulator',
kind: 'emulator',
booted: true,
},
{ serverPort: 15_037 },
);
const provider = createLocalAndroidAdbProvider({
platform: 'android',
id: 'emulator-5554',
name: 'Pixel Emulator',
kind: 'emulator',
booted: true,
});
const serverPort = 15_037;

await provider.exec(deviceShellArgv('adb', 'shell', ['echo', 'ok']));
provider.spawn?.(['logcat']);
await provider.reverse?.ensure({ local: 'tcp:8081', remote: 'tcp:8081' });
await provider.pull?.('/sdcard/video.mp4', '/tmp/video.mp4');
await provider.install?.('/tmp/app.apk');
await provider.exec(deviceShellArgv('adb', 'shell', ['echo', 'ok']), { serverPort });
provider.spawn?.(['logcat'], { serverPort });
await provider.pull?.('/sdcard/video.mp4', '/tmp/video.mp4', { serverPort });
await provider.install?.('/tmp/app.apk', { serverPort });

assert.equal(readServerPortArgv(mockRunCmdBackground.mock.calls[0]?.[1]), 15_037);
assert.equal(mockRunCmd.mock.calls.length, 4);
assert.equal(mockRunCmd.mock.calls.length, 3);
for (const call of mockRunCmd.mock.calls) assert.equal(readServerPortArgv(call[1]), 15_037);
});

Expand Down
Loading
Loading