Part 3 of #3746. Depends on part 2 (sub-issue #3771) for the AgentRunner interface, and on #3741 for the commit-success log line.
Real AgentRunner implementation that completes the #3746 acceptance criteria.
Scope
pkg/agent/ssh.go — dial --dut-ssh-host with --dut-ssh-key (golang.org/x/crypto/ssh), exec doublezero-agent ... -verbose, tee remote stdout/stderr into <working-dir>/orchestrator.agent.log while feeding it to the parser.
pkg/agent/parser.go:
- Wire
pkg/agent/ssh.go into cmd/device-orchestrator/main.go as the default AgentRunner. Keep noopAgent reachable via --no-agent for offline testing.
Tests
parser_test.go: golden log fixtures (multi-tunnel diff, deprovision diff, commit-success line) — fully offline.
- SSH client itself is integration-only; gate behind a build tag or env var so CI doesn't dial.
Completion / CI
make go-build go-lint go-test green; manual devnet acceptance run per #3746: 0→8 in batches of 2, hold 10s, full five-event timestamps for at least one user end-to-end, abort-file respected within one batch. PR title prefix tools/stress: agent SSH + log parser.
Part 3 of #3746. Depends on part 2 (sub-issue #3771) for the
AgentRunnerinterface, and on #3741 for the commit-success log line.Real
AgentRunnerimplementation that completes the #3746 acceptance criteria.Scope
pkg/agent/ssh.go— dial--dut-ssh-hostwith--dut-ssh-key(golang.org/x/crypto/ssh), execdoublezero-agent ... -verbose, tee remote stdout/stderr into<working-dir>/orchestrator.agent.logwhile feeding it to the parser.pkg/agent/parser.go:Committing config session due to diffs detected: <diff>→ extract every+ interface Tunnel<ID>in the diff and emit onepre_commit_logevent per ID witht_ns = time.Now()at line-read time.appliedevents. Coordinate exact format with config agent: log config size in bytes #3741's PR before merging.pkg/agent/ssh.gointocmd/device-orchestrator/main.goas the defaultAgentRunner. KeepnoopAgentreachable via--no-agentfor offline testing.Tests
parser_test.go: golden log fixtures (multi-tunnel diff, deprovision diff, commit-success line) — fully offline.Completion / CI
make go-build go-lint go-testgreen; manual devnet acceptance run per #3746: 0→8 in batches of 2, hold 10s, full five-event timestamps for at least one user end-to-end, abort-file respected within one batch. PR title prefixtools/stress: agent SSH + log parser.