Public: anyone can read this; the crew can change it.

The forge's own host is a machine in Infrastructure: its system metrics move to that machine's page and the separate metrics pages go #18674

opened this in answer to

Its check is queued, place 6 of 19

The forge's own host is now a machine in Infrastructure, and /system has stopped drawing the machine. Only part of the issue is done: the host has no containers, log or terminal yet. What changed The host machine.

Notes · 25 files · +348 −158

opened this

The forge's own host is now a machine in Infrastructure, and /system has stopped drawing the machine. Only part of the issue is done: the host has no containers, log or terminal yet.

What changed

  • The host machine. It sits in the cloud tree as This forge ▸ host ▸ <hostname>, at /infra/-/forge/this-forge/host/machine:host.
    • It is built by a new src/system/host_machine.ts.
    • Its facts come from the same sample /system took: CPU busy and cores, load, memory and swap, the four busiest disks, devices and interfaces, hottest sensor, process count.
    • Units are stated: percent, binary bytes, the kernel's 1/5/15-minute load.
    • It is a machine of the tree, but it is not tied to a cloud account and has no price. It does not count toward the tree's cost totals or toward "No cloud account is attached" (rentedCount).
  • All three doors show it. The page, the terminal's Infrastructure tree and the MCP infra tool read the same facts, so no door code was added.
  • Alarms and home. The disk-full alarm and the disk 80%/90% mark alarms now link to the machine. The home problem line links to it when the disk is all that is broken; otherwise it still links to /system. They fire from the general path, unchanged.
  • Reused. buildSystem / live() for the sample, the existing tree and facts rendering, and the old terminal "busiest four" cap, which moved into hostReadings.

Removed from /system

  • The Machine summary, per-core, memory and temperature regions.
  • The Disks and network section.
  • The terminal System screen's machine lines.

/system now has one line pointing to the host. Its processes table, live stream, cells, stalls, database and forge memory stay, because they are about the forge's own work.

Lines: src −78 / +143 (net +65), tests −63 / +158, in 21 files. The cut is small because I only moved what is purely the host's. The per-core sparklines are gone with it, and the Boards machine history still has the CPU series.

Not done, and why

  • The host's containers, log and terminal tab. I did not build them.
  • Same protocol as a rented machine. The host is read from live() in-process, not through the agent protocol.
  • Other pages and alarms for the host. I did not audit /system/bottleneck, loop stalls, /series or the memory-growth alarm. The last is about the forge's own process, so it stays on /system.

Checks

  • tsc and the gate pass, as do the system, TUI, cloud, infra, vitals, design and feature tests and the new test/host-machine.test.ts.
  • test/schema-migrations.test.ts failed once in the gate before my final commit and I did not look into it; I touched no migration.
  • "The duty's own fetch carries redirect: error" fails in the cloud tests, asking for a recorded cloud on localhost. I did not check whether it fails on main.
  • I updated tests that asserted the removed regions, plus cloud-tree and cloud-containers for the extra host machine, and the quiet-debt baseline. The TUI cap test now targets hostReadings.

Try it: sign in as an admin and open /infra/-/forge/this-forge/host/machine:host and /system.

[
 {"go":"/infra/-/forge/this-forge/host/machine:host","look":"the host's facts","expect":"CPU, Load, Memory, Disk lines with units; no price"},
 {"go":"/system","look":"the Machine section","expect":"one line linking to the host; no cores or disks"},
 {"go":"/infra","look":"the top of the tree with no cloud account","expect":"\"No cloud account is attached\" and the This forge host in the tree"}
]

Closes #18661

7 earlier comments
commented

The forge's own host is now a machine in Infrastructure, and /system has stopped drawing the machine. Only part of the issue is done: the host has no containers, log or terminal yet.

What changed

  • The host machine. It sits in the cloud tree as This forge ▸ host ▸ <hostname>, at /infra/-/forge/this-forge/host/machine:host.
    • It is built by a new src/system/host_machine.ts.
    • Its facts come from the same sample /system took: CPU busy and cores, load, memory and swap, the four busiest disks, devices and interfaces, hottest sensor, process count.
    • Units are stated: percent, binary bytes, the kernel's 1/5/15-minute load.
    • It is a machine of the tree, but it is not tied to a cloud account and has no price. It does not count toward the tree's cost totals or toward "No cloud account is attached" (rentedCount).
  • All three doors show it. The page, the terminal's Infrastructure tree and the MCP infra tool read the same facts, so no door code was added.
  • Alarms and home. The disk-full alarm and the disk 80%/90% mark alarms now link to the machine. The home problem line links to it when the disk is all that is broken; otherwise it still links to /system. They fire from the general path, unchanged.
  • Reused. buildSystem / live() for the sample, the existing tree and facts rendering, and the old terminal "busiest four" cap, which moved into hostReadings.

Removed from /system

  • The Machine summary, per-core, memory and temperature regions.
  • The Disks and network section.
  • The terminal System screen's machine lines.

/system now has one line pointing to the host. Its processes table, live stream, cells, stalls, database and forge memory stay, because they are about the forge's own work.

Lines: src −78 / +143 (net +65), tests −63 / +158, in 21 files. The cut is small because I only moved what is purely the host's. The per-core sparklines are gone with it, and the Boards machine history still has the CPU series.

Not done, and why

  • The host's containers, log and terminal tab. I did not build them.
  • Same protocol as a rented machine. The host is read from live() in-process, not through the agent protocol.
  • Other pages and alarms for the host. I did not audit /system/bottleneck, loop stalls, /series or the memory-growth alarm. The last is about the forge's own process, so it stays on /system.

Checks

  • tsc and the gate pass, as do the system, TUI, cloud, infra, vitals, design and feature tests and the new test/host-machine.test.ts.
  • test/schema-migrations.test.ts failed once in the gate before my final commit and I did not look into it; I touched no migration.
  • "The duty's own fetch carries redirect: error" fails in the cloud tests, asking for a recorded cloud on localhost. I did not check whether it fails on main.
  • I updated tests that asserted the removed regions, plus cloud-tree and cloud-containers for the extra host machine, and the quiet-debt baseline. The TUI cap test now targets hostReadings.

Try it: sign in as an admin and open /infra/-/forge/this-forge/host/machine:host and /system.

[
 {"go":"/infra/-/forge/this-forge/host/machine:host","look":"the host's facts","expect":"CPU, Load, Memory, Disk lines with units; no price"},
 {"go":"/system","look":"the Machine section","expect":"one line linking to the host; no cores or disks"},
 {"go":"/infra","look":"the top of the tree with no cloud account","expect":"\"No cloud account is attached\" and the This forge host in the tree"}
]
commented

<!-- look-pages 511e85b8a069 --> Look pages for 511e85b, from the gate:

  • look pages (named): this pull changes src/web/pages/cloud_tree.ts, src/web/pages/home_flow.ts, src/web/pages/system.ts; a commit names /system
commented

The failing check was the kernel boundary test. The cause was that src/kernel/vitals.ts now imports HOST_HREF from ../system/host_machine.ts, so alarms about the machine link to its Infrastructure page. That import was not listed in CROSSINGS in test/kernel-boundary.test.ts.

I added the entry with its one-line reason. The test was the part that was out of date, not the code. test/kernel-boundary.test.ts now passes (4 tests), and bun scripts/gate.ts --fix changed nothing. The gate did stop its duplicate scan early at 8 seconds, so that scan covered only part of the tree.

I did not run bun x tsc --noEmit or the rest of the suite this turn. The forge runs the full check on the push.

The commit message says No door: because only a test's list of kernel crossings changed. The fix is pushed as a74e0bef0.

commented

The forge's own host is now a machine in Infrastructure, and /system no longer draws the machine. I didn't write the earlier commits again this run. I re-ran the gate and checks on them, and git push reported nothing new to send.

What changed

  • The host appears in the cloud tree as This forge > host, with the same lines as a rented machine. Its CPU, load, memory, disks and network come from src/system/host_machine.ts.
  • The Infrastructure page, the terminal's tree and the MCP infra tool all show those same lines.
  • /system and the terminal's System screen drop their Machine, Disks and network sections and the live stream of them. They link to the machine instead.
  • Home's problem line and the disk alarms link to the machine. The disk alarms still fire through the same path.
  • The change is 342 lines added and 154 removed across 23 files.
  • docs/features/infra.md has a new section on the host machine, and docs/features/system.md is updated.

What I did not do: I didn't add a separate terminal or log tab for the host. The issue's "its containers, its log, a terminal for an admin" are not covered by this change. The commit says "No door" for the terminal side, because the terminal's tree screen and the infra tool already draw the host.

Checks run

  • bun x tsc --noEmit is clean.
  • bun scripts/design-lint.ts is clean.
  • The three tests the triage names pass: design-audit, dup-imports and unused-exports.
  • The host-machine, system, terminal-system and cloud suites ran 501 tests, with 500 passing. The one failure was test/cloud-accounts-etag.test.ts, which passes when run alone. The same run printed a "could not flush route timings: Invalid Date" warning, which I didn't investigate.
  • The gate's only note is long comment lines in 9 files, which the nightly rewrap fixes on main. --fix changed nothing.
  • I did not run the full suite. The forge runs it on push.

Try it: sign in as an admin and open /infra/-/forge/this-forge/host/machine:host, then /system.

[
 {"go":"/infra/-/forge/this-forge/host/machine:host","look":"the host machine page","expect":"CPU, load, memory, disks and network as that machine's facts"},
 {"go":"/system","look":"the system page","expect":"no Machine, Disks or network sections, and a link to the host machine"}
]

🤖 Generated with Claude Code

commented

<!-- look-pages a74e0bef07f5 --> Look pages for a74e0be, from the gate:

  • look pages (named): this pull changes src/web/pages/cloud_tree.ts, src/web/pages/home_flow.ts, src/web/pages/system.ts; a commit names /system
commented

I fixed one of the two failing tests and pushed the fix as ef0ed8eb2. I changed nothing for the other, which looks like a timing flake.

  • /system's summary says 'limited by cgroup'…: this was a real failure caused by the pull. Since #18661, /system no longer draws the summary region. The "limited by cgroup" fact now lives in the host machine's CPU line, which hostReadings in src/system/host_machine.ts produces. I changed test/footprint.test.ts to check that line instead. The test was out of date, not the code. It still checks both cases: the text appears under a limit and is absent without one. test/footprint.test.ts now passes (17 tests), and bun x tsc --noEmit printed nothing.
  • migrate from the terminal > space ticks rows and m starts them all…: this timed out in the check, but test/tui-migrate.test.ts passes here (13 tests). The pull doesn't touch migrate. I made no change and can't confirm the cause from here, so it may fail again.
commented

<!-- look-pages ef0ed8eb20a1 --> Look pages for ef0ed8e, from the gate:

  • look pages (named): this pull changes src/web/pages/cloud_tree.ts, src/web/pages/home_flow.ts, src/web/pages/system.ts; a commit names /system
commented

The only gate item on this pull was the look-pages note. I pushed one empty commit that names the pages with Looks: /system and Looks: /. It changes no code. I didn't re-run the gate after the push, so I haven't seen the note clear.

What changed: the host is now a machine in Infrastructure, as before. Its CPU, load, memory, disks and network moved to that machine's page. /system and the terminal's System screen drop their Machine, Disks and network sections and link to the machine instead. The separate metrics pages are gone.

The four recurring refusals: I ran the three covering test files locally, and all 15 tests pass. They cover the page audit, duplicate imports and the first-view budget. I also ran test/account-purge.test.ts for the user-column rule, and all 16 pass. tsc --noEmit shows no errors. bun scripts/gate.ts --fix rewrapped nothing. It reports 9 over-long comment lines in files this pull doesn't touch and leaves them for the nightly rewrap on main.

How to try it: open the preview at https://lab--18674--forge-trevato-apps.open-platform.sh, look at /system and /, then follow the machine link to the host's page under Infrastructure.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs