Commit Graph
6 Commits
Author SHA1 Message Date
Rohit Prasad 8cf715cd2c Merge pull request #252 from Dhevenddra/fix/relay-tests-hermetic-name-lookup
test: stub Slack name resolution instead of relying on a dead port
2026-10-25 14:57:59 -07:00
Rohit C Prasad 89bdad221f Let leads own repository setup and preserve configured targets
Let leads clone repositories and workers create their own worktrees without replacing missing configured sessions.
2026-09-20 16:59:18 -07:00
Rohit C Prasad ea021ff6aa Connectors on machines: grant handoff, GitHub and Slack on a box, subscriptions
A connector account moves to a machine, or connects there directly; managed grants move by delegation.
GitHub and Slack reach a box by polling the relay; subscriptions register with the cloud first.
2026-09-06 10:19:23 -07:00
Dhevenddra 988d4ce2e7 test: stub Slack name resolution instead of relying on a dead port
Both relay test modules pinned SLACK_API_URL at http://127.0.0.1:9/ on the
stated assumption that lookups "fail instantly at a dead loopback port". That
holds on POSIX, where a refused connection returns in microseconds. It does
not hold on Windows, where refusing a loopback connect takes about 2.0s:

    socket.create_connection(("127.0.0.1", 9))   median 2.033s over 5 trials
    urllib.urlopen("http://127.0.0.1:9/...")     median 2.032s over 3 trials

RelayHub._run only increments _dispatched after awaiting the frame handler,
and _dispatch_slack_event awaits both _display_name and _channel_name, so a
single frame cost roughly 4s against the 2.0s wait_dispatched budget. The
result was a deterministic "only 0 frames dispatched" across five tests,
reproduced identically on three consecutive runs.

Stub _slack_get, the single chokepoint both lookups go through, so the tests
are hermetic by construction rather than by depending on how fast the host OS
refuses a connection. SLACK_API_URL still points at the dead port as a
backstop so an unstubbed path can never reach slack.com.

The stub goes on the class, so the two tests that exercise real name mapping
keep working: they set _slack_get on the instance, which shadows it.

On Windows this takes the two modules from 5 failed / 29 passed in 21.2s to
34 passed in 10.2s. Linux is unaffected: 889 passed, 1 skipped.
2026-07-27 21:18:00 +05:30
Rohit P ac83bc0490 security: complete local access protections 2026-07-24 18:44:39 -07:00
Rohit C PrasadandDevika 2b45018ffa OpenWorker: initial import
Imported from andrewyng/aisuite@1b4bbf303e
(contents of its platform/ directory, hoisted to the repo root).
Development history prior to this commit lives in that repository.

Co-authored-by: Devika <devikaverma11@gmail.com>
2026-07-21 11:09:41 -07:00