You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part 2 of #3746. Depends on part 1 (sub-issue #3770) for PlanReconcile + user CRUD.
Standalone binary that runs the sweep end-to-end against a real devnet RPC but stubs the agent runner behind an interface. The issue's acceptance run (0 → 8 in batches of 2) works except pre_commit_log / applied events (those land in part 3).
Scope
New tree tools/stress/device-orchestrator/, modelled on tools/twamp/:
pkg/runlog/ — append-only JSON-lines writer for orchestrator-runlog.json with the row schema {run_id, user_index, user_pubkey, tunnel_id, event, t_ns, n_after_event}.
pkg/sweep/ — sweep loop driven by PlanReconcile, batches of --users-per-batch, hold via --hold-seconds, deprovision phase in reverse order. Records submit | confirm | activate | deprovision_* events.
pkg/abort/ — poller watching --abort-file on a ticker; signals the sweep loop via context cancel between user iterations (NOT mid-instruction).
pkg/agent/ — Go interface AgentRunner { Start(ctx) error; Events() <-chan AgentEvent }. Ship a noopAgent impl now; SSH impl lands in part 3.
abort_test.go: tempdir, touch the file, assert cancellation within one batch.
runlog_test.go: schema round-trip.
Completion / CI
Binary builds via root make go-build; new package's tests run under make go-test. No live-RPC test in CI — manual only. PR title prefix tools/stress: orchestrator skeleton.
Part 2 of #3746. Depends on part 1 (sub-issue #3770) for
PlanReconcile+ user CRUD.Standalone binary that runs the sweep end-to-end against a real devnet RPC but stubs the agent runner behind an interface. The issue's acceptance run (0 → 8 in batches of 2) works except
pre_commit_log/appliedevents (those land in part 3).Scope
New tree
tools/stress/device-orchestrator/, modelled ontools/twamp/:cmd/device-orchestrator/main.go— every flag from stress: implement tools/stress/device-orchestrator #3746's CLI list; dumpsorchestrator-config.jsonon start.pkg/runlog/— append-only JSON-lines writer fororchestrator-runlog.jsonwith the row schema{run_id, user_index, user_pubkey, tunnel_id, event, t_ns, n_after_event}.pkg/sweep/— sweep loop driven byPlanReconcile, batches of--users-per-batch, hold via--hold-seconds, deprovision phase in reverse order. Recordssubmit | confirm | activate | deprovision_*events.pkg/abort/— poller watching--abort-fileon a ticker; signals the sweep loop via context cancel between user iterations (NOT mid-instruction).pkg/agent/— Go interfaceAgentRunner { Start(ctx) error; Events() <-chan AgentEvent }. Ship anoopAgentimpl now; SSH impl lands in part 3.Makefilemirroringtools/twamp/Makefile.Tests
sweep_test.go: fakeReconcileExecutor+ fake clock +noopAgent; assert event order + runlog rows.abort_test.go: tempdir, touch the file, assert cancellation within one batch.runlog_test.go: schema round-trip.Completion / CI
Binary builds via root
make go-build; new package's tests run undermake go-test. No live-RPC test in CI — manual only. PR title prefixtools/stress: orchestrator skeleton.