fleet monitor T4: hostpoll.py — ssh transport with bootstrap poll #67

Closed
opened 2026-08-24 18:35:22 +00:00 by ben · 3 comments
Owner

Implement Task 4 of docs/superpowers/plans/2026-08-24-fleet-monitor.md (on main; spec: docs/superpowers/specs/2026-08-24-fleet-monitor-design.md) exactly as written: failing tests first, then the implementation, then the task's own commit. The plan's Global Constraints apply to every task: fleet-tui/** stays vendor-excluded, no product literal in code or fixtures (invented names only), read-only against the factory, offline tests (fake ssh, fixture blobs, swarm.db seeded via the real swarm-db.py), module suite green (cd fleet-tui && python3 -m pytest tests/ — use tui/.venv if no system pytest).

One ssh round-trip per poll (two on first contact: registry bootstrap, then full probe with derived --db/--killswitch/... args). Every failure is a returned display state, never an exception; probe_version mismatch refused by name. Carries limit-lib.sh's verbatim marker-path defaults (the one allowed literal exception, commented).

Implement **Task 4** of `docs/superpowers/plans/2026-08-24-fleet-monitor.md` (on `main`; spec: `docs/superpowers/specs/2026-08-24-fleet-monitor-design.md`) exactly as written: failing tests first, then the implementation, then the task's own commit. The plan's **Global Constraints** apply to every task: `fleet-tui/**` stays vendor-excluded, no product literal in code or fixtures (invented names only), read-only against the factory, offline tests (fake ssh, fixture blobs, swarm.db seeded via the real swarm-db.py), module suite green (`cd fleet-tui && python3 -m pytest tests/` — use `tui/.venv` if no system pytest). One ssh round-trip per poll (two on first contact: registry bootstrap, then full probe with derived --db/--killswitch/... args). Every failure is a returned display state, never an exception; probe_version mismatch refused by name. Carries limit-lib.sh's verbatim marker-path defaults (the one allowed literal exception, commented).

swarm-claim host=matou-dev-server-01 run=776
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=776 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #67 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit e9331f8f is not a valid commit object (fabricated, or never pushed)
  • changed_files: 'fleet-tui/hostpoll.py' is not in the diff of the claimed commits
  • changed_files: 'fleet-tui/tests/test_hostpoll.py' is not in the diff of the claimed commits
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
envelope
{
  "issue": 67,
  "status": "success",
  "commits": [
    "e9331f8f"
  ],
  "changed_files": [
    "fleet-tui/hostpoll.py",
    "fleet-tui/tests/test_hostpoll.py",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "cd fleet-tui && python3 -m pytest tests/test_hostpoll.py -q",
      "exit_code": 0
    },
    {
      "command": "cd fleet-tui && python3 -m pytest tests/ -q",
      "exit_code": 0
    },
    {
      "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Task 4 implemented exactly as written (hostpoll.py + test)": "fleet-tui/hostpoll.py and fleet-tui/tests/test_hostpoll.py per plan Task 4; test written first (red: ModuleNotFoundError), then implementation (green: 4 passed)",
    "One ssh round-trip per poll, two on first contact (bootstrap then full probe)": "poll() bootstraps --registry-only into caller-owned cache then runs probe_args-derived full probe; test_bootstrap_then_full_poll_and_cache asserts 2 calls first contact, 1 thereafter",
    "Every failure is a returned display state, never an exception": "run_ssh maps timeout->124/OSError->127; _run/poll return {ok:False,error}; test_ssh_failure_is_a_result_not_an_exception + test_garbage_stdout_and_version_mismatch",
    "probe_version mismatch refused by name": "_run returns 'probe version N, expected 1'; asserted by test_garbage_stdout_and_version_mismatch (probe version 9)",
    "Carries limit-lib.sh verbatim marker-path defaults with comment": "DEFAULT_LIMIT_MARKER/DEFAULT_ACTIVE_MARKER = /tmp/matou-swarm-claude-{limit,active-token}, matching limit-lib.sh:52,103, commented as the one allowed exception",
    "fleet-tui/** stays vendor-excluded": "vendor-manifest-coverage-test.sh PASS — new tracked paths covered by fleet-tui/** exclude",
    "No product literal in code/fixtures (except the marker)": "fixtures use box-a/agent@box-a/Acme; only marker literal per exception",
    "Offline tests, module suite green": "fake_runner injected; no network/ssh; cd fleet-tui && pytest tests/ -> 26 passed"
  },
  "summary": "Implemented Task 4 hostpoll.py — the fleet-monitor ssh transport with bootstrap+full poll and error-as-display-state semantics, test-first, module suite green.",
  "blockers": []
}
**close-report** for #67 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit e9331f8f is not a valid commit object (fabricated, or never pushed) - changed_files: 'fleet-tui/hostpoll.py' is not in the diff of the claimed commits - changed_files: 'fleet-tui/tests/test_hostpoll.py' is not in the diff of the claimed commits - changed_files: 'STATUS.md' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 67, "status": "success", "commits": [ "e9331f8f" ], "changed_files": [ "fleet-tui/hostpoll.py", "fleet-tui/tests/test_hostpoll.py", "STATUS.md" ], "tests": [ { "command": "cd fleet-tui && python3 -m pytest tests/test_hostpoll.py -q", "exit_code": 0 }, { "command": "cd fleet-tui && python3 -m pytest tests/ -q", "exit_code": 0 }, { "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh", "exit_code": 0 } ], "criteria": { "Task 4 implemented exactly as written (hostpoll.py + test)": "fleet-tui/hostpoll.py and fleet-tui/tests/test_hostpoll.py per plan Task 4; test written first (red: ModuleNotFoundError), then implementation (green: 4 passed)", "One ssh round-trip per poll, two on first contact (bootstrap then full probe)": "poll() bootstraps --registry-only into caller-owned cache then runs probe_args-derived full probe; test_bootstrap_then_full_poll_and_cache asserts 2 calls first contact, 1 thereafter", "Every failure is a returned display state, never an exception": "run_ssh maps timeout->124/OSError->127; _run/poll return {ok:False,error}; test_ssh_failure_is_a_result_not_an_exception + test_garbage_stdout_and_version_mismatch", "probe_version mismatch refused by name": "_run returns 'probe version N, expected 1'; asserted by test_garbage_stdout_and_version_mismatch (probe version 9)", "Carries limit-lib.sh verbatim marker-path defaults with comment": "DEFAULT_LIMIT_MARKER/DEFAULT_ACTIVE_MARKER = /tmp/matou-swarm-claude-{limit,active-token}, matching limit-lib.sh:52,103, commented as the one allowed exception", "fleet-tui/** stays vendor-excluded": "vendor-manifest-coverage-test.sh PASS — new tracked paths covered by fleet-tui/** exclude", "No product literal in code/fixtures (except the marker)": "fixtures use box-a/agent@box-a/Acme; only marker literal per exception", "Offline tests, module suite green": "fake_runner injected; no network/ssh; cd fleet-tui && pytest tests/ -> 26 passed" }, "summary": "Implemented Task 4 hostpoll.py — the fleet-monitor ssh transport with bootstrap+full poll and error-as-display-state semantics, test-first, module suite green.", "blockers": [] } ``` </details>

close-report for #67 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 67,
  "status": "success",
  "commits": [
    "e9331f829af70c047b7d5c0d4782b03e242e2d36"
  ],
  "changed_files": [
    "fleet-tui/hostpoll.py",
    "fleet-tui/tests/test_hostpoll.py",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "cd fleet-tui && python3 -m pytest tests/test_hostpoll.py -q",
      "exit_code": 0
    },
    {
      "command": "cd fleet-tui && python3 -m pytest tests/ -q",
      "exit_code": 0
    },
    {
      "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Task 4 implemented exactly as written (hostpoll.py + test)": "fleet-tui/hostpoll.py and fleet-tui/tests/test_hostpoll.py per plan Task 4; test written first (red: ModuleNotFoundError), then implementation (green: 4 passed)",
    "One ssh round-trip per poll, two on first contact (bootstrap then full probe)": "poll() bootstraps --registry-only into caller-owned cache then runs probe_args-derived full probe; test_bootstrap_then_full_poll_and_cache asserts 2 calls first contact, 1 thereafter",
    "Every failure is a returned display state, never an exception": "run_ssh maps timeout->124/OSError->127; _run/poll return {ok:False,error}; test_ssh_failure_is_a_result_not_an_exception + test_garbage_stdout_and_version_mismatch",
    "probe_version mismatch refused by name": "_run returns 'probe version N, expected 1'; asserted by test_garbage_stdout_and_version_mismatch (probe version 9)",
    "Carries limit-lib.sh verbatim marker-path defaults with comment": "DEFAULT_LIMIT_MARKER/DEFAULT_ACTIVE_MARKER = /tmp/matou-swarm-claude-{limit,active-token}, matching limit-lib.sh:52,103, commented as the one allowed exception",
    "fleet-tui/** stays vendor-excluded": "vendor-manifest-coverage-test.sh PASS — new tracked paths covered by fleet-tui/** exclude",
    "No product literal in code/fixtures (except the marker)": "fixtures use box-a/agent@box-a/Acme; only marker literal per exception",
    "Offline tests, module suite green": "fake_runner injected; no network/ssh; cd fleet-tui && pytest tests/ -> 26 passed"
  },
  "summary": "Implemented Task 4 hostpoll.py — the fleet-monitor ssh transport with bootstrap+full poll and error-as-display-state semantics, test-first, module suite green.",
  "blockers": []
}
**close-report** for #67 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 67, "status": "success", "commits": [ "e9331f829af70c047b7d5c0d4782b03e242e2d36" ], "changed_files": [ "fleet-tui/hostpoll.py", "fleet-tui/tests/test_hostpoll.py", "STATUS.md" ], "tests": [ { "command": "cd fleet-tui && python3 -m pytest tests/test_hostpoll.py -q", "exit_code": 0 }, { "command": "cd fleet-tui && python3 -m pytest tests/ -q", "exit_code": 0 }, { "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh", "exit_code": 0 } ], "criteria": { "Task 4 implemented exactly as written (hostpoll.py + test)": "fleet-tui/hostpoll.py and fleet-tui/tests/test_hostpoll.py per plan Task 4; test written first (red: ModuleNotFoundError), then implementation (green: 4 passed)", "One ssh round-trip per poll, two on first contact (bootstrap then full probe)": "poll() bootstraps --registry-only into caller-owned cache then runs probe_args-derived full probe; test_bootstrap_then_full_poll_and_cache asserts 2 calls first contact, 1 thereafter", "Every failure is a returned display state, never an exception": "run_ssh maps timeout->124/OSError->127; _run/poll return {ok:False,error}; test_ssh_failure_is_a_result_not_an_exception + test_garbage_stdout_and_version_mismatch", "probe_version mismatch refused by name": "_run returns 'probe version N, expected 1'; asserted by test_garbage_stdout_and_version_mismatch (probe version 9)", "Carries limit-lib.sh verbatim marker-path defaults with comment": "DEFAULT_LIMIT_MARKER/DEFAULT_ACTIVE_MARKER = /tmp/matou-swarm-claude-{limit,active-token}, matching limit-lib.sh:52,103, commented as the one allowed exception", "fleet-tui/** stays vendor-excluded": "vendor-manifest-coverage-test.sh PASS — new tracked paths covered by fleet-tui/** exclude", "No product literal in code/fixtures (except the marker)": "fixtures use box-a/agent@box-a/Acme; only marker literal per exception", "Offline tests, module suite green": "fake_runner injected; no network/ssh; cd fleet-tui && pytest tests/ -> 26 passed" }, "summary": "Implemented Task 4 hostpoll.py — the fleet-monitor ssh transport with bootstrap+full poll and error-as-display-state semantics, test-first, module suite green.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/dev-factory#67
No description provided.