Skip to content

feat(modules): a standalone worker writes a private agent-device profile for local agents - #963

Merged
V3RON merged 14 commits into
feature/952-adrfrom
task/956
Oct 24, 2026
Merged

V3RON merged 14 commits into
feature/952-adrfrom
task/956

Conversation

@V3RON

@V3RON V3RON commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #956

Status

Implement: done (5/5 green) Review: round 1 passed Hardware: n/a Gate: waiting for the stack

  • pnpm exec vitest run --project unit src/agent-device/local-profile.test.ts passes with the Tests lines: run by the build and fix runs, 5/5, and checked by the review's spec lens (one test per Tests line).
  • The website build passes and using-devices/agent-device.mdx shows the profile connect line, --session on every command, and the connect --force remedy: built by the audit run; the claims lens read the page.
  • CI is green: checked by the gate.

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 13.1M.
Runs: 7. Cost USD: 3.1988. Agent seconds: 1571.

Rejected:

  • claims: "A worker that joins a gateway writes none" (agent-device.mdx:114) is false — [incorrect] config load refuses http.enabled on a joined worker (src/core/config.ts:800-806), so the profile step takes its off path.

Assessment: complete

Written by an agent.

@V3RON
V3RON added this pull request to stack #965 October 23, 2026 20:04
@V3RON

V3RON commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Decision taken

Question: #956 says the profile is written before HTTP listens, but no test at the startDaemon seam can see that order. Deleting the await in src/daemon/main.ts keeps every test green.

Options:

  • Keep the order and pin it with a test that sees it. A user sees no change: an agent that connects the moment the daemon starts finds the file.
  • Drop the order from the spec. An agent that connects in the first instant could find no file yet.

Taken: keep the order and add the test (a new Tests line on #956). This matches the spec and the code as built, and it is the easiest to reverse.

Reverting: delete that Tests line and its test.

Written by an agent.

@V3RON

V3RON commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: baea24d

Runs: 7. Cost USD: 3.1988. Agent seconds: 1571.
Tokens input 258, output 83197, cache read 7821447, cache write 426091.
- build implementer: claude-sonnet-5-5 579 s $1.1997
- audit implementer: claude-sonnet-5-5 197 s $0.22
- fix implementer: claude-sonnet-5-5 103 s $0.1633
- review 1 reviewer: claude-sonnet-5-5 359 s $0.2701
- review 1 spec: claude-sonnet-5-5 40 s $0.1676
- review 1 code both: claude-opus-5-5 254 s $1.0379
- review 1 claims: claude-sonnet-5-5 39 s $0.1402
Finding outcomes: {"incorrect":1}. Classes: {"joined worker writes no profile claim":1}.
{"findings":[{"id":"R1","role":"claims","class":"joined worker writes no profile claim","outcome":"incorrect","path":"website/src/content/docs/docs/using-devices/agent-device.mdx","round":"1"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 23, 2026 20:17
@V3RON
V3RON merged commit f154a96 into main Oct 24, 2026
52 checks passed
@V3RON
V3RON deleted the task/956 branch October 24, 2026 06:13
V3RON added a commit that referenced this pull request Oct 24, 2026
…efault (#967)

Closes #957

### Status
Implement: done (6/6 green) Review: round 2 + fix-check passed Hardware:
profile case pass; full file blocked by pre-existing #971 Gate: not run
(maintainer asked to stop before the gate)

- [x] `pnpm exec vitest run --project unit <file>` passes for
`src/core/config.test.ts`, `src/agent-device/definition.test.ts`,
`src/agent-device/edge.test.ts` and `src/daemon/main.test.ts` with the
lines above: run by the build and audit; the doctor.run cases wait for
`starting` to end.
- [x] `pnpm test:e2e` passes for the e2e files the harness change
touches. CI is green: three fast e2e files run by the audit; CI green on
7253fbc (23 pass).
- [ ] Slow lane: `scripts/slow-e2e.sh e2e/slow-agent-device.test.ts`
passes, including the profile case: the profile case passes on iOS and
Android; the file still fails one sharding case, which fails the same
way on `main` (#971).
- [x] The website build passes, and the docs state the new defaults:
audit run; claims lens found every changed claim true.

Feature #952 Completion conditions:
- [x] Profile written at 0600, stable across restarts, removed when off:
#963's tests.
- [x] Real CLI with the profile, no token (slow lane): the profile case
passed.
- [x] Default standalone worker has HTTP and agent-device on; joined has
both off: config and defaults tests here.
- [x] No doctor finding without agent-device: doctor.run cases here.
- [x] Docs page with the profile connect line, `--session`, `connect
--force`, no `config set`: #963 and this PR.

## Assumptions

- Assumption: the profile's `clientId` value — a constant 16-hex id
(`a51a51a51a51a51a`) in the shape of agent-device's own generated
profiles, so the file's bytes stay stable; agent-device 0.21.28 refuses
a proxy `open` without one (decision comment on this PR).

## Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1
fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 18.5M.
Runs: 13. Cost USD: 6.6777. Agent seconds: 5579.

Assessment: complete

*Written by an agent.*
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.

A standalone worker writes a private agent-device profile for local agents

1 participant