Repository navigation
Conversation
7 failing -> 1 failing The /v1/agent-device mount, the proxy host, the front map and the lease flow. Fixture fixes in edge.test.ts: phone models for the slow drivers, a long TTL for the held lease, room for 5 devices, timing gaps after a hang-up.
1 failing -> 1 failing Splits the refusal check and the settle steps so Fallow's complexity check passes.
1 failing -> 1 failing
…472) 1 failing -> 0 failing
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.
Closes #472
Status
Green: 48 of 49 spec tests pass. One is red on a spec gap:
stopping the daemon while an allocate waits ends with no simlock lease and no lease request stored(edge.test.ts). A stored request keeps a record with its lease ID forretentionMseven once cancelled, anddispatchrefuseslease.cancelonce a stop has begun (DAEMON_STOPPING), so the front cannot remove the waiting request and thenot.toContain(hex(2))check onstate.jsoncannot hold. Nothing is leased after the stop; the open request is failed at the next start like any other.Done when
src/agent-device/edge.test.ts(the adapter andauthenticatelines insrc/agent-device/host/upstream.test.ts, the front map lines insrc/agent-device/front/front-map.test.ts, the shared line insrc/agent-device/shared/rpc.test.ts), and each fails when the behaviour it names is removed.agentDevice.enabledtrue and HTTP on,/v1/agent-device/healthwith a simlock token answers the proxy's health; with it false, 404.simlock list --devices, shown by the release test.docs/HTTP-API.mddocuments/v1/agent-device/*, the one-token-per-agent rule and the messages above.Assumptions
AgentDeviceHost.tag/.authenticate,SupervisorAgentDeviceUpstream,FrontMap.add/get/markEnded/refresh,commandLeaseId) — the red commit holds inert stubs with these names so the tests typecheck; green may rename them and update the tests that call them, since no spec line fixes them.FakeAgentDevicereads the tenant from thex-agent-device-tenantheader, elseparams.tenantId, elseparams.meta.tenantId, as the proxy on agent-device'ssimlock-integrationbranch stamps it.HostLink.forward(request, identity)takes the identity, and the host tags the request it hands the proxy with a random header value (a map the host owns), not aWeakMapkeyed on theRequest: the proxy givesauthenticatea copy of the request, so aWeakMapwould never match. The header is overwritten on every forward and never reaches agent-device.--targetvalues other thanmobile,tvanddesktopask for no class (the smallest change; the spec names no message for them).createLeasing: they need nothing from leasing, andTokenStorestays where it is because the host does not use it (requireAuthis the one token check).lease.request, the front waits on alease.listdispatch (raced against the CLI's hang-up). A request parked while the daemon starts cannot be called back, and this keeps a CLI that left before startup finished from ever being admitted (the "hangs up before simlock admitted" test).edge.test.ts(no assertion changed): the slow and no-address drivers get phone models; the held lease in the 330 s test gets the maximum TTL so it does not expire during the wait; the--targettest allows 8 running devices for its 5 leases; the two hang-up tests wait 50 ms after the hang-up so the server sees the closed socket before the daemon moves on.Written by an agent.