Skip to content

feat: add a health card to remote session environments - #21259

Merged
iamwhatever merged 1 commit into
mainfrom
feat/session-environments-health
Oct 28, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
feat/session-environments-health

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Show the owner of a remote session how its workspace machine is doing, and tell the agent when that machine is short on memory.

Once a chat is fixed to a Coder workspace, its composer chip is a plain label. The owner cannot see whether the workspace is running, stopped or unreachable, or how much CPU, memory and disk it has, without opening Coder. The agent is no better off: the [RESOURCES] line for a remote session measures only the gateway and says the workspace "is not measured", so a workspace that is out of memory gets no warning at all.

Why it matters

Builds and tests in a remote session run on the workspace, not the gateway. A workspace near its memory limit fails heavy builds in ways that look like code bugs, and the person watching the chat has no way to tell. One glance at the chip, and one line of advice to the agent, close both gaps without waking stopped compute.

Not a goal

  • Starting, stopping or resizing the workspace from the card; it is read-only.
  • Health for providers other than Coder; each provider PR in the stack wires its own.
  • Process lists, environment variables or any guest data beyond machine numbers and the platform.
  • Changing how the Session Environments core (feat: add Coder remote session environments #19833) launches, browses or retains workspaces.

What changed (motivation → approach → change)

Hovering (or focusing and clicking) a remote session's fixed composer chip (muted with a lock, as #19833 draws every fixed chip, plus a pointer cursor) opens a read-only status card. The agent's [RESOURCES] line judges the workspace machine on its own memory reading. Neither ever starts a stopped workspace.

Part What it does
src/kiro_crew/remote_session/workspace_tools.py a read-only stats browse op on the guest: arch, CPU count, load, memory, disk, uptime, nothing else. Only the health endpoint asks for it; the dashboard's browse route still accepts only list, read and git_status. Memory comes from one /proc/meminfo read capped at the workspace read ceiling; an oversized or undecodable sample omits memory instead of reporting a partial figure. In a container workspace the cgroup (v2, then v1) memory limit and v2 CPU quota replace the host node's figures when they are lower, with usage taken as the working set (reclaimable page cache excluded, as docker and kubectl report it), and the host node's load average and uptime are left out
src/kiro_crew/coder/session_browse.py session_health: state: stopped for stopped compute without measuring it, unavailable with the error, otherwise the stats. A guest whose files predate stats answers with an unknown-op error, which #22238's _ask already turns into one reinstall and one retry, so session_health adds no install path of its own. The archive warning (unsaved_work) keeps #19833's plain git_status read
src/kiro_crew/dashboard owner-only GET /api/chat/slots/{slot}/environment/health; not_created for a workspace not built yet, 409 not_remote, 502 unavailable
src/kiro_crew/session_environment.py, src/kiro_crew/context_assembly, src/kiro_crew/resource_status.py a bounded in-memory cache of the last workspace memory reading, refreshed in the background at most once a minute per session whatever the read found (never while [RESOURCES] is switched off) and ignored after five; the refresh is scheduled onto the gateway loop the session's runtime started on, because the context build runs on a worker thread, and it goes through the health read the session's provider registered (register_remote_health; Coder registers session_health in prepare_for_session), so another provider's session is never read through Coder. context_line(remote=True, workspace_memory=...) gives build advice only when the workspace is tight (free memory at or below the smaller of the gateway floor and a quarter of its own total), sub-agent advice only when the gateway is, and stays silent when both are clear
website/src/components, website/src/api EnvironmentHealthCard in a popover on the locked remote chip: a "Read-only status" header, state dot, workspace name, directory, CPU and load, memory and disk meters, uptime. It polls every 15 seconds only while open. An unavailable read shows "The workspace isn't responding." over the gateway's reason, through ErrorNotice
website/src/i18n, docs/system-specs/modules/providers.md, docs/feature-map/README.md 18 sessionEnvironments.health.* strings in all 13 catalogs; the provider spec and feature-map row describe the card and the two-machine [RESOURCES] line

A turn never waits on the remote machine: context assembly reads the cache and schedules a refresh for the next turn. A locked local chip stays a plain status. The chip's own environment-read error keeps #19833's "Could not load environment settings." fallback when the error carries no message; the card's "Could not read the workspace's metrics." is only for a failed health read. The stopped card says the workspace starts with the next message and stops on its own after an idle hour; that holds because Kiro Crew creates Coder workspaces with --stop-after 60m. The not-created card says the workspace is created with the next message. The card says "workspace" for the machine, matching #19833's Files panel and settings.

Stack notes

PR Branch Base
PR #19833 feat/session-environments-coder (part A: Coder core) main
PR #22238 feat/session-environments-coder-ui (part B: UI + dashboard API) #19833
this PR feat/session-environments-health #22238
PR #21256, then PR #21257, PR #21258, PR #21260, Git panel credentialed git, Sprites/boxd, Fargate, Kiro Cloud, Git panel each on the one before

Merge order is one straight line: #19833, #22238, this PR, then #21256 and the PRs above it. The health card was moved out of #19833 into this PR.

Developer flag: the health card is unreachable with KIROCREW_DEV_MODE off. SessionEnvironmentChoices.resolve() (session_environments_enabled()) reads every chat as local, so session_health raises NotRemote and the route returns 409 not_remote; test_health_is_unreachable_with_the_developer_flag_off proves it and fails with that gate removed.

Backwards compatibility

Compatible: one new GET route, one new guest browse op and an optional keyword on ResourceStatus.context_line; sessions without a remote environment are untouched. A guest running older worker files gets the current files installed once, through _ask's own reinstall for an unknown op.

Removes nothing: the remote [RESOURCES] line keeps its gateway wording and its "not measured" sentence when there is no reading; the locked chip keeps its label, title, tone and placement and gains a popover. The archive warning reads exactly as in #19833.

Tests

  • test/test_coder_session_launch.py: stats returns only the allowed keys (replaces feat: add Coder remote session environments #19833's pin that browse has no metrics op); a container reports its cgroup memory limit and CPU quota, not the host node's; the meminfo read is bounded for normal, exact-cap, oversized and invalid-encoding samples; health reports stopped without starting; a guest that predates stats gets the current files installed exactly once and is asked once more, through the real _ask, even when the reinstall does not take; health caches the workspace memory; a stale reading refreshes in the background; a context build off the loop schedules the refresh onto the runtime's loop; refresh is a no-op with no loop.
  • test/test_resource_status.py: a healthy workspace beside a tight gateway, a tight workspace with a healthy gateway, both tight, both healthy stays silent, an idle 4 GB workspace (3 GB free) gets no build advice; a tight task slice beside a tight workspace names the gateway machine, so the cgroup reading is not read as the workspace's.
  • test/test_subagent_context_groups.py: the context builder hands the cached workspace reading to the remote line. test/test_coder_rebind_template.py's docstring names health among the template's readers.
  • website/src/test/SessionEnvironmentChip.test.tsx: hovering the fixed chip shows the metrics, with an explicit deadline on the environment-read → card → health-query chain; an unavailable response shows the "isn't responding" title and the hand-off; a not-created response shows the created-with-your-next-message hint; a read failure with no message falls back to the settings load error, not the metrics one. website/src/test/ApiClient.refactor.surface.test.ts lists chatSlotEnvironmentHealth.
  • Determinism, at this head: the five backend files (215 tests, with test_jsonl_util.py) passed in three shuffled orders (seeds 11, 23, 47) and three straight repeats; the two frontend files (204 tests) passed with --sequence.shuffle at seeds 11, 23 and 47.
  • Ran locally: the branch's test files plus the gate tests (spawn audit, wait-discipline ratchet, stdlib shadow, harness parity and the composition/boundary contracts, 1,089 passed) and every test file that reaches session_browse, session_environment, workspace_tools, the handler, context_assembly.turn or resource_status (55 files, 2,933 passed), on a patch-identical commit (git range-diff shows it unchanged) before feat: add Coder remote session environments #19833's last amend, which touched only acp_runtime_start.py and its start-gate test. Static at this head: black, isort, flake8 and mypy on the touched modules; tsc and i18n:check. Earlier on this patch: eslint, production build, bundle budget, chunk cycles, comment-history, brand, docs-lint and the file-line cap.
  • Not run by the agent: the full backend and frontend suites (CI runs them) and semgrep (CI's SAST job). Native Windows/macOS, guest Python 3.9 and live Coder infrastructure were not exercised.
  • Inherited from main, not this PR: Backend Tests (Windows) (6) fails the six TestSpawnEnv tests in test/test_slack_team_id_env.py, added on main by feat: pass the slack workspace id to agents as KIROCREW_SLACK_TEAM_ID #22380. Each spawns a real process through the Windows process-tree path and gets FileNotFoundError: [WinError 2]. feat: add the Session Environments UI and dashboard API #22238's own Windows (6) fails the same six, a re-run here failed the same way, they pass on Linux, and this PR touches no Slack or spawn code. PR Readiness is red only because of that shard. (Earlier heads' Telegram and crew-log XPASS reds cleared once main fixed them.)

Manual verification

  • Still to do: open the card against a live Coder workspace in running, stopped and not-yet-created states on a dev gateway.

Screenshots / video

Rendered from this head in a temporary Storybook story with the real SessionEnvironmentChip and EnvironmentHealthCard, APIs stubbed (no gateway, no compute). Hover opens the card above the chip. The locked chip says "Locked" in words, like #22238's local status.

Running workspace, memory meter in the warning band:

Health card for a running workspace, dark

Health card for a running workspace, light

Stopped workspace (reported without being started; the hint says it starts with the next message and stops on its own after an idle hour):

Health card for a stopped workspace, dark

Unreachable guest (red dot): plain title over the gateway's reason, here the remote workspace did not answer, the wording session_browse uses for a timeout, with the hand-off:

Health card for an unavailable workspace, dark

The health read itself failed (inline ErrorNotice: plain title over the gateway's reason, here this session's Coder deployment has changed, and the hand-off carries the failed request's report), and the card before the first reading arrives:

Health card when the metrics read fails, dark

Health card while loading, dark

Workspace not created yet (the hint says it is created with the next message, which is when #19833's launch creates it):

Health card for a workspace not created yet, dark

Light theme: stopped, unavailable, read failure, loading and not created

Health card for a stopped workspace, light

Health card for an unavailable workspace, light

Health card when the metrics read fails, light

Health card while loading, light

Health card for a workspace not created yet, light

Related Issues

Part of #10433

no linked issue: this PR closes nothing; #10433 stays open until the whole Session Environments stack lands.

Follow-up: #25241 tracks the card polish and the Opus and Design review notes, as its own small PR after this one merges.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@kyleseaman
kyleseaman requested review from a team and KiroCrewCaptain as code owners October 16, 2026 14:38
@kyleseaman
kyleseaman requested review from cruisercohen and removed request for a team October 16, 2026 14:39
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 862aa1878b6096e9694732ca9a32f1f614102f5d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the read-only health card and the workspace memory line both rely on a cached, background-refreshed reading that never starts stopped compute, and screenshots are attached.

Notes

  • This PR replaces the test_the_browse_mode_has_no_metrics_op pin, which records a decision feat: add Coder remote session environments #19833 made. The new browse_session(..., "stats") refusal assertion keeps that decision's intent, because metrics still never reach the browse route. Say so in a PR comment so the change isn't read as a gap fix.

[DESIGN-REVIEWED] 862aa18

Description read

[DESCRIPTION-READ] 27895c4675ccaf25951c7d726808326a3c44fa7011937cf4f8270b09a5261fe3

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 862aa1878b6096e9694732ca9a32f1f614102f5d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: every card state is in a screenshot, in both themes. The blind reader read the chip and the card correctly, though it rated the chip's click only "a guess".

Notes

  • Failed-read card (shot-05): the reader had "no idea" what the server's reason "this session's Coder deployment has changed" means, and with no state dot it "can't tell if the machine is up or down". Rewrite that reason in plain words with a next step, and keep the last known state visible.
  • health.load "Load (1, 5, 15 min)" with three raw numbers, and cpuValue "· x86_64", told the reader nothing ("no idea whether the numbers are good"). Either drop load or label it against the core count (for example "1.42 of 4 cores busy").
  • At 84% the memory meter turns warn-coloured, but nothing says what that means ("it worries me a little and nothing tells me what to do"). Add a short line under the meter at warn/danger, such as "Heavy builds may fail."

[UX-REVIEWED] 862aa18

Description read

[DESCRIPTION-READ] a58170f649da3073ae390710db5e3edbf41c376afc3890a944b622b7ce480037

That sha256 names everything this verdict read: the PR description, plus the 15 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 862aa1878b6096e9694732ca9a32f1f614102f5d — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks: every item serves the frozen Goal, and the whole surface sits behind the KIROCREW_DEV_MODE session-environment preview.

Notes

  • Item 5 — one consumer, generalized: _health_readers: dict[str, Callable[...]] plus register_remote_health has exactly one registrant (grepped register_remote_health in src/: 1 call site, coder/session_launch.py:498). The description says "each provider PR in the stack wires its own", which is support for future providers, not for this PR. Subtraction: call coder.session_browse.session_health directly from refresh_remote_memory_soon, gated on the existing _remote_workspaces entry, and delete the registry and its eviction policy until a second provider lands.

What this change ships

Inventory (8 items) — 6 justified

Intent: let a remote session's owner see how the workspace machine is doing, and warn the agent when that machine is low on memory. ADDITION.

  1. Locked remote chip opens a read-only health card on hover/click — justified
  2. Card polls every 15 s while open — justified
  3. New owner-only GET …/environment/health route — justified
  4. Guest browse gains a read-only stats op (cgroup-aware) — justified
  5. Per-session provider health-reader registry — one consumer, generalized
  6. Background workspace-memory cache, refreshed at most once a minute — justified
  7. Remote [RESOURCES] line reports and judges workspace memory on its own — justified
  8. Tasks-ceiling sentence now says "On the gateway machine" — undeclared

[FIRST-PRINCIPLES-REVIEWED] 862aa18

Description read

[DESCRIPTION-READ] 0088604ed261ea80bc5c1417edafbd6a152e0c6510d884a0fd6e77d079b67cce

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 862aa1878b6096e9694732ca9a32f1f614102f5d — this comment is updated in place on each push.

Review details

No findings.

Notes:

  • SessionEnvironmentChip.tsx:224: the locked branch now follows data.profile, but name, content and title still follow the pending pick. So while a refused switch is still waiting on its answer, the chip briefly shows "This machine" on what is actually the remote health-card trigger.

[OPUS-REVIEWED] 862aa18

Verdict parsed from the review's SHA-scoped output markers for commit 862aa1878b6096e9694732ca9a32f1f614102f5d.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 862aa1878b6096e9694732ca9a32f1f614102f5d false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 862aa1878b6096e9694732ca9a32f1f614102f5d and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 862aa18

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 862aa1878b6096e9694732ca9a32f1f614102f5d false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 16, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 18, 2026
@kyleseaman
kyleseaman force-pushed the feat/session-environments-health branch from 2532366 to 88b7ccf Compare October 18, 2026 23:47
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 18, 2026
@kyleseaman
kyleseaman force-pushed the feat/session-environments-health branch from 88b7ccf to a4a026d Compare October 19, 2026 00:06
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 19, 2026
@kyleseaman
kyleseaman force-pushed the feat/session-environments-health branch 4 times, most recently from a735f6d to 5b1ca26 Compare October 19, 2026 01:33
@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • "Read-only status" heading vs the chip's "Locked" label

Deferred polish. The heading tells the reader the card has no actions, which is a different fact from the chip's lock on the chat's environment. Renaming it to "Workspace status" is a copy change across all 13 catalogs and goes in a follow-up.

@iamwhatever

Copy link
Copy Markdown
Contributor

HOLD at d28f87b.

  • Base. The PR targets feat/session-environments-coder-ui, not main. Retarget it after feat: add Coder remote session environments #19833 and feat: add the Session Environments UI and dashboard API #22238 land; the retargeted head needs a fresh review.
  • Sensitive. It adds the owner-only GET .../environment/health route, and the health read can reinstall worker files on the remote workspace. That stays with a human reviewer. I found no defect: the owner gate runs first, and a stopped workspace is never started.
  • Untracked follow-ups. These UX items are deferred as polish with no linked issue: the low-memory hint under the meter, a per-core load reading, renaming the "Read-only status" heading, and renaming the "Workspace" row label. Open one issue per item and link each in the description, or fix them now.
  • CI. macOS Backend Tests shards 1, 2, 3 and 6 are still pending on this head.

All five AI lanes pass, and the author has answered every note on this head.

— crew-pr-reviewer (r128)

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Item 6 — one consumer, generalized (provider health-read registry)

Kept by conductor ruling; the note itself asks for no subtraction here. Coder is the only registrant in this PR, which is intended. On a735f6d the Design review raised CONCERNS that the provider-neutral [RESOURCES] refresh imported Coder's session_health directly, and it asked for a per-provider health callable. GPT's H13 rule keeps provider names out of the shared runtime path, so a direct Coder call in session_environment.py would trade this note for a GPT block.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Unavailable card's detail line repeats the title

Kept. The plain title leads; the line under it is the gateway's own reason, kept word for word because GPT's upheld finding on effabed required the diagnostics on the card and in the "Ask the agent" hand-off. The reason differs by failure (a timeout, a changed workspace identity, a changed Coder deployment, an invalid reply), so hiding it when it happens to echo the title would need the card to pattern-match gateway prose.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Failed-read card has no plain next step

Kept. The next step the card offers is "Ask the agent", which sends the gateway's reason to the agent. Rewording "metrics" to "machine stats" is a copy change across all 13 catalogs and goes in a follow-up.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Load row has no reference point

Deferred polish. The card shows the CPU core count in the row directly above, which is the reference for the three load averages. A per-core reading is a follow-up.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Item 7 — one consumer, generalized (provider health-read registry)

Kept by conductor ruling. Two review lanes contradicted each other, and this ruling settles it. Coder is the only registrant in this PR; that is true and intended. On a735f6d the Design review raised CONCERNS that the provider-neutral [RESOURCES] refresh imported Coder's session_health directly (the subtraction proposed here), and it asked for a per-provider health callable. GPT's H13 rule keeps provider names out of the shared runtime path, so a direct Coder call in session_environment.py would trade this note for a GPT block and bring Design's concern back.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Failed-read card shows the raw gateway reason with no status

Kept. A failed read does not know whether the machine is running, so the card shows no status word or dot rather than claiming one; a last-known dot could be minutes old and wrong. The line under the title is the gateway's own reason, kept word for word because GPT's upheld finding on effabed required the diagnostics on the card and in the "Ask the agent" hand-off, which is the next step the card offers.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Healthy meters painted green instead of neutral

Deferred polish. The meters use the dashboard's existing ok/warn/danger tones, so warn and danger already differ from the healthy colour. Moving healthy meters to a neutral tone is a follow-up.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Card header icon differs from the chip's icon

Deferred polish. The header icon names the machine (Server), while the chip's icon names the provider. Matching them is a one-icon follow-up.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Item 6 — one consumer, generalized (provider health-read registry)

Kept by conductor ruling. Two review lanes contradicted each other, and this ruling settles it. Coder is the only registrant in this PR; that is true and intended. On a735f6d the Design review raised CONCERNS that the provider-neutral [RESOURCES] refresh imported Coder's session_health directly (the subtraction proposed here), and it asked for a per-provider health callable. GPT's H13 rule keeps provider names out of the shared runtime path, so a direct Coder call in session_environment.py would trade this note for a GPT block and bring Design's concern back.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Load row has no reference point

Deferred polish. The card shows the CPU core count in the row directly above, which is the reference for the three load averages. A per-core reading is a follow-up.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Unavailable card's detail line repeats the title

Kept. The plain title leads; the line under it is the gateway's own reason, kept word for word because GPT's upheld finding on effabed required the diagnostics on the card and in the "Ask the agent" hand-off. The reason differs by failure (a timeout, a changed workspace identity, a changed Coder deployment, an invalid reply), so hiding it when it happens to echo the title would need the card to pattern-match gateway prose.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Failed-read header has no state label

Kept. A failed read does not know whether the machine is running, so the card shows no status word or dot rather than claiming one; an "Unknown" chip would restate the title. The card is read-only, so nothing on it can put work at risk.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Item 6 — one consumer, generalized (provider health-read registry)

Kept by conductor ruling; the note asks for no subtraction while the stack lands in order. Coder is the only registrant in this PR, which is intended. On a735f6d the Design review raised CONCERNS that the provider-neutral [RESOURCES] refresh imported Coder's session_health directly, and it asked for a per-provider health callable. GPT's H13 rule keeps provider names out of the shared runtime path.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Unavailable card's detail line repeats the title

Kept. The plain title leads; the line under it is the gateway's own reason, kept word for word because GPT's upheld finding on effabed required the diagnostics on the card and in the "Ask the agent" hand-off. The reason differs by failure (a timeout, a changed workspace identity, a changed Coder deployment, an invalid reply), so hiding it when it happens to echo the title would need the card to pattern-match gateway prose.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Metrics error card has no plain next step

Kept. The next step the card offers is "Ask the agent", which sends the gateway's reason to the agent; the reason stays on the card because GPT's upheld finding requires the diagnostics there. Mapping each gateway reason to its own advice would need the card to pattern-match gateway prose.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Load row and architecture label

Deferred polish. The CPU row shows the core count and architecture directly above the load row, so the core count is the reference for the three load averages. Dropping or relabelling the row is a copy change across all 13 catalogs and goes in a follow-up.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Item 5 — one consumer, generalized (provider health-read registry)

Kept by conductor ruling. Two review lanes contradicted each other, and this ruling settles it. Coder is the only registrant in this PR; that is true and intended. On a735f6d the Design review raised CONCERNS that the provider-neutral [RESOURCES] refresh imported Coder's session_health directly (the subtraction proposed here), and it asked for a per-provider health callable. GPT's H13 rule keeps provider names out of the shared runtime path, so a direct Coder call in session_environment.py would trade this note for a GPT block and bring Design's concern back.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Failed-read card shows the raw gateway reason with no state

Kept. A failed read does not know whether the machine is running, so the card shows no status word or dot rather than claiming one; a last-known dot could be minutes old and wrong. The line under the title is the gateway's own reason, kept word for word because GPT's upheld finding on effabed required the diagnostics on the card and in the "Ask the agent" hand-off, which is the next step the card offers.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Load row and architecture label

Deferred polish. The CPU row shows the core count and architecture directly above the load row, so the core count is the reference for the three load averages. Relabelling the row is a copy change across all 13 catalogs and goes in a follow-up.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Amber or red memory meter gives no advice

Deferred polish. The actionable signal for a tight workspace goes to the agent: the [RESOURCES] line gives "targeted tests, serialize builds" advice when the workspace is tight. A muted low-memory line under the meter is a follow-up.

@iamwhatever

Copy link
Copy Markdown
Contributor

HOLD at 862aa18.

The base blocker from r128 is cleared: #19833 and #22238 have merged, and this PR now targets main. CI is green and all five AI lanes pass on this head.

  • Sensitive. It adds the owner-only GET .../environment/health route and a new stats op that runs on the remote workspace (workspace_tools.py). Context assembly also schedules background reads of that workspace. Changes to what runs on remote compute stay with a human reviewer. I found no defect: the owner gate runs first, and a stopped workspace is reported without being started.
  • Untracked follow-ups. The load-row relabel and the advice line under the memory meter are still answered as "Deferred polish" with no linked issue. The same holds for the heading, row-label, meter-colour and header-icon items deferred on earlier heads. Open one issue per item and link each in the description, or fix them now.
  • Notes without a reply. The Opus note that the locked chip can briefly read "This machine" while a refused switch is pending (SessionEnvironmentChip.tsx:224), and the Design note asking for a comment on the replaced test_the_browse_mode_has_no_metrics_op pin. A short disposition for each is enough.

— crew-pr-reviewer (r131)

@kyleseaman

Copy link
Copy Markdown
Contributor Author

Re r131 (#21259 (comment)):

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.

2 participants