Skip to content

fix(agent-device): sharding names a leased device by agent-device's device list name - #986

Merged
V3RON merged 6 commits into
mainfrom
bug/971
Oct 25, 2026
Merged

V3RON merged 6 commits into
mainfrom
bug/971

Conversation

@V3RON

@V3RON V3RON commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #971

Status

Implement: done (3/3 green) Review: round 2 passed, 2 fixed Hardware: n/a (fast lane proves both lines) Gate: running
Next: gate

Done when

  • test --shard-all with no --device names each leased device by the name agent-device's inventory gives it when the allocate reply named none (edge.test.ts "inventory gives it", front/token-devices.ts namedTokenDevices)
  • FakeAgentDevice's allocate reply drops device, as the real one does (testing.ts)

Assumptions

  • Assumption: when to read the device list — lazily, the first time a request rule needs the token's devices, once per lease, rather than inside allocate; the repro test sets the list after the grant, and it spares calls for leases no rule asks about.

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 2 blocking, 2 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 21.4M.
Runs: 10. Cost USD: 4.3523. Agent seconds: 2528.
Assessment: complete

Rejected:

  • code: R3 two parsers for the devices reply disagree on size and non-object entries — [nonblocking] no input gives a wrong lease, name or refusal

Written by an agent.

@V3RON

V3RON commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 87601b2
Round 2: 9014ede

Runs: 10. Cost USD: 4.3523. Agent seconds: 2528.
Tokens input 360, output 80800, cache read 8885202, cache write 534395.
- build implementer: claude-sonnet-5-5 492 s $0.5151
- audit implementer: claude-sonnet-5-5 229 s $0.1839
- review 1 reviewer: claude-sonnet-5-5 662 s $0.3728
- review 1 spec: claude-sonnet-5-5 14 s $0.1006
- review 1 claims: claude-sonnet-5-5 18 s $0.084
- review 1 code both: claude-opus-5-5 567 s $2.1696
- fix 1 implementer: claude-sonnet-5-5 179 s $0.2369
- review 2 reviewer: claude-sonnet-5-5 202 s $0.1387
- review 2 reviewer code: claude-opus-5-5 151 s $0.4685
- review 2 reviewer claims: claude-sonnet-5-5 14 s $0.0822
Finding outcomes: {"fixed":2,"nonblocking":1}. Classes: {"architecture 10":1,"architecture 13":1,"rule reads name outside the inventory read":1}.
{"findings":[
{"id":"R1","role":"code","class":"rule reads name outside the inventory read","outcome":"fixed","path":"src/agent-device/front/request-rules.ts","round":"1","fix":"9014ede756ce8f8e606c7c479601fb9970b51f72"},
{"id":"R2","role":"claims","class":"architecture 13","outcome":"fixed","path":"src/agent-device/testing.ts","round":"1","fix":"9014ede756ce8f8e606c7c479601fb9970b51f72"},
{"id":"R3","role":"code","class":"architecture 10","outcome":"nonblocking","path":"src/agent-device/front/token-devices.ts","round":"1"}
]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 25, 2026 07:11
@V3RON
V3RON merged commit 78b9238 into main Oct 25, 2026
32 checks passed
@V3RON
V3RON deleted the bug/971 branch October 25, 2026 07:27
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 sharding with no --device fails: the front rewrites --device to the UDID

1 participant