Skip to content

Machines view: every machine the ground station hears from, with drift findings - #74

Merged
avrabe merged 3 commits into
mainfrom
plan-jobs-experiments
Oct 29, 2026
Merged

avrabe merged 3 commits into
mainfrom
plan-jobs-experiments

Conversation

@avrabe

@avrabe avrabe commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Step 1 of getting every machine into warte: the ground station side, starting with what it can see without a network link.

Machines view and GET /api/machines (REQ-PROBE-001/003):

  • Cards. The ground station probes its own machine every minute ([hub] probe_self, on by default) and keeps the latest report per machine in machines.json. Each card shows OS, kernel, load, memory, disks, agent CLIs with versions, and agent sessions, without command lines.
  • CI host. It gets a card from the smithy agent's snapshot.
  • Findings, worst first:
    • kernel or agent-CLI versions behind the newest seen on the same OS (compared numerically: 2.1.9 < 2.1.312);
    • disks at 85% or 95%;
    • under 10% memory free;
    • 5-minute load above the core count;
    • no report for 3 minutes.

Previewed on real data: this Mac running the probe locally, plus the CI host. It showed the Mac's system disk at 95% (critical) and load above its 10 cores, and the CI host at 25 load on 32 cores.

Also carries the plan commit (folded in, as admission advised for docs):

Next: enrollment (DD-PROBE-002) and the QUIC link (DD-TRANSPORT-001), so wohl, gale, the CI host and the Macs can send. Then the smithy role (smithy#40).

Oracles:

  • Findings: drift, silence, a full disk, and the order.
  • Escaping: hostile host, tool and mount names come out escaped.
  • Persistence: a machine's report survives a ground-station restart.
  • Contract: the endpoint is in /api/openapi.json, and the contract test hits it.
  • Browser: the Machines view renders (Playwright, 20/20).
  • cargo test and clippy -D warnings are green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KEjmjacA37doyazDSdB8ez

avrabe and others added 3 commits October 29, 2026 06:48
…w in v1.6.0 once its metadata exists (#73)

REQ-JOBS-001 depends on REQ-PROBE-001: job states travel in each host's
probe report instead of a separate collection. REQ-EXP-001 is proposed for
v1.6.0: its source must be structured metadata in pulseengine.eu, designed
with the view, never parsed prose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEjmjacA37doyazDSdB8ez
…t findings (REQ-PROBE-001/003)

The ground station probes its own machine every minute ([hub] probe_self,
on by default; off in the test servers) and stores the latest report per
machine in machines.json next to the hub state. The CI host gets a card
from the smithy agent's snapshot. GET /api/machines serves the reports
with age, stale flag and findings.

Findings, worst first: kernel or agent-CLI versions behind the newest
seen on the same OS (versions compared numerically: 2.1.9 < 2.1.312),
disks at 85%/95%, under 10% memory free, 5-min load above the core
count, and no report for 3 minutes. Other machines appear once they can
send (enrollment and the QUIC link are next).

Oracles: findings (drift, silence, full disk, order), escaping of what
machines report, persistence across restarts, the endpoint in the
contract, and the view in the browser (Playwright 20/20).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEjmjacA37doyazDSdB8ez
…l errors

Security review of the Machines view: the read API has no auth (#46)
and a permissive CorsLayer let any web page a LAN user opened read it
cross-origin, now including a machine inventory. Nothing needs CORS
(the dashboard is same-origin, agents use the CLI), so the layer is
gone. /api/machines publishes tools as name/installed/version and
sessions as counts per agent; tool paths, tool error output, pids and
working directories stay in the ground station's local machines.json.

Oracle: a request with a foreign Origin gets no
access-control-allow-origin, and none of the private details appear in
the API or the view. Negative control: restoring CorsLayer::permissive()
turns it red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEjmjacA37doyazDSdB8ez
@avrabe
avrabe merged commit d462808 into main Oct 29, 2026
4 checks passed
@avrabe
avrabe deleted the plan-jobs-experiments branch October 29, 2026 13:26
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.

1 participant