Skip to content

feat(agent-device): the gateway side runs as an optional module - #606

Merged
V3RON merged 5 commits into
task/597from
task/598
Oct 15, 2026
Merged

V3RON merged 5 commits into
task/597from
task/598

Conversation

@V3RON

@V3RON V3RON commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #598

Status

Implement: done Review: round 1 passed, 4 text fixes applied unreviewed Hardware: deferred to the end of the run Gate: waiting for the stack
Next: hardware check at the end of the run, then the stack gate

Done when

  • Every Tests line passes, and every existing test in gateway-front.test.ts and lease-requires.e2e.test.ts passes with only its setup changed.
  • git grep -n "agent-device\|agentDevice" -- src/daemon/main.ts prints nothing.
  • On a Mac with an iOS runtime: scripts/slow-e2e.sh e2e/slow-agent-device-gateway.test.ts passes.

Assumptions

  • Assumption: "a worker whose view has no lease.maxTtlMs is not in serving()" — the spec text says serving() filters on capability only and agent-device's port keeps the maxTtl rule, so that rule is agent-device's, proved by its own fleet port tests, and the gateway-modules serving() test does not cover it.
  • Assumption: the "catalog-unread" half of the serving() test is covered by a unit test in src/modules/conformance.test.ts, which shows serving() keeps a connected, available worker with no catalog read.

Review

Spec review: 1 blocking, 1 fixed, 0 notes. Code review: 3 blocking, 1 fixed, 1 notes. Claims review: 3 blocking, 2 fixed, 4 notes.
Rounds: 1. Tokens: 12.5M.

Fixed unreviewed: spec: src/daemon/gateway-modules.test.ts:226 catalog-unread workers in serving(); code: src/daemon/gateway-modules.test.ts:309 30 s deadline; claims: src/agent-device/front/relay-host-link.ts:46, src/daemon/AGENTS.md:5.

Rejected:

  • code: src/modules/conformance.test.ts:142 beforeDrain assertion can never fail — not blocking: a hang fails by timeout, so the test can still fail
  • claims: src/module-registry/AGENTS.md:5 entry is index.ts not the definition file — not blocking: index.ts only re-exports the definition

Written by an agent.

@V3RON
V3RON added this pull request to stack #600 October 15, 2026 13:38
@V3RON
V3RON force-pushed the task/598 branch 2 times, most recently from 54fa140 to c838322 Compare October 15, 2026 13:45
@V3RON

V3RON commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • claims: src/agent-device/AGENTS.md:13 definition.ts "loads worker.ts only when on"; it also loads gateway.ts through loadGateway
  • claims: src/modules/AGENTS.md:4 the entry lists testing.ts → fakeModule, fakeWorkerContext; it also exports fakeGatewayContext
  • claims: src/modules/AGENTS.md:22 only the Module* by-shape types are said to have a type test; the Fleet* types are tested in fleet-types.test.ts
  • code: src/modules/conformance.test.ts:149 expect(settled).toBe(true) runs after await pending, so it is redundant; a hanging beforeDrain still fails by test timeout
  • claims: src/module-registry/AGENTS.md:5 "a module's entry here is its definition file"; the registry imports agent-device's index.ts, which re-exports the definition

Written by an agent.

@V3RON
V3RON merged commit 0f035bc into main Oct 15, 2026
34 of 44 checks passed
@V3RON
V3RON deleted the task/598 branch October 15, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent-device's gateway side runs as an optional module

1 participant