Skip to content

Harden devbox ZeroFS homes, widen CA trust, and unwedge ingest - #4742

Merged
michaeljguarino merged 35 commits into
masterfrom
devbox-truncate-ingest-titles
Nov 30, 2026
Merged

michaeljguarino merged 35 commits into
masterfrom
devbox-truncate-ingest-titles

Conversation

@michaeljguarino

@michaeljguarino michaeljguarino commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

ZeroFS crash robustness

  • Run each ZeroFS writer with oom_score_adj -900 so the node OOM killer takes workloads before the process backing a mounted home.
  • Count unexpected writer exits and expose writer/exit gauges on a Prometheus /metrics endpoint (port 9821) on the CSI node plugin, with scrape annotations in the agent-substrate chart.
  • Trim the volume when it is unstaged.
  • The daemon probes the home (write + fsync of a probe file) and reports failures as DaemonHeartbeat.home_error. The gateway remounts a home that stays unhealthy past a 3m grace (at most every 15m) and records SUSPEND_REASON_HOME_UNAVAILABLE. Protos and generated Go/KAS/Elixir code are updated.

CA trust for package managers

  • Export the private CA bundle through the env vars package managers and runtimes read: Node/npm/yarn/pnpm, Deno, Python requests/pip/twine/ conda, cargo, hex, bundler, nix, curl, git, and the AWS and gcloud CLIs. Keep them across sudo, and re-run trust setup from a ca-certificates update hook. A test keeps the image, sudoers and container tests in sync with trust.EnvVars.

Ingest

  • Truncate session and interaction titles to 255 characters instead of rejecting them. Permission requests use the full tool call as their title, so a long shell command failed the whole UpsertInstanceIndex batch. The gateway retried it forever, the permission never reached the UI and the instance looked stuck on "running..." with no way to reprompt.

Also

  • Thread creation fixes in the daemon workspace and console threads.
  • Smaller file tree caret with a tighter gap to the label.

Test Plan

Test environment: https://console.plrldemo.onplural.sh/cd/clusters/1fb8bed1-20a9-4ddd-b5f8-5a68f314cc79/services/501cb8b2-3ce2-440b-93d7-722e5929295d/components

Checklist

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (required only when changing agent code).

Fixes PROD-5479 PROD-5480

Plural Flow: console

cursoragent and others added 3 commits November 25, 2026 21:41
The browser replaces the center column the way an open file does, behind
the DevboxBrowser flag and a box with browser enabled. Back to session
clears the view, and fullscreen uses the native Fullscreen API so the
noVNC session stays connected and starts in control.

Gateway and KAS tests cover the binary WebSocket subprotocol on the VNC
stream. The flag stays off until that stream is confirmed on a dev cluster.

Co-authored-by: Chris Akinrinade <chrisakinrinade@users.noreply.github.com>
A view=browser link was starting VNC even with DevboxBrowser off, because
only the header button checked the flag. The main view now checks it too.

Opening the browser unmounts the composer. The unsent prompt and its
attachments are stored by session and restored when the conversation
comes back, including after a file or diff takes the same view.

Co-authored-by: Chris Akinrinade <chrisakinrinade@users.noreply.github.com>
ZeroFS crash robustness
- Run each ZeroFS writer with oom_score_adj -900 so the node OOM killer
  takes workloads before the process backing a mounted home.
- Count unexpected writer exits and expose writer/exit gauges on a
  Prometheus /metrics endpoint (port 9821) on the CSI node plugin, with
  scrape annotations in the agent-substrate chart.
- Trim the volume when it is unstaged.
- The daemon probes the home (write + fsync of a probe file) and reports
  failures as DaemonHeartbeat.home_error. The gateway remounts a home
  that stays unhealthy past a 3m grace (at most every 15m) and records
  SUSPEND_REASON_HOME_UNAVAILABLE. Protos and generated Go/KAS/Elixir
  code are updated.

CA trust for package managers
- Export the private CA bundle through the env vars package managers and
  runtimes read: Node/npm/yarn/pnpm, Deno, Python requests/pip/twine/
  conda, cargo, hex, bundler, nix, curl, git, and the AWS and gcloud
  CLIs. Keep them across sudo, and re-run trust setup from a
  ca-certificates update hook. A test keeps
  the image, sudoers and container tests in sync with trust.EnvVars.

Ingest
- Truncate session and interaction titles to 255 characters instead of
  rejecting them. Permission requests use the full tool call as their
  title, so a long shell command failed the whole UpsertInstanceIndex
  batch. The gateway retried it forever, the permission never reached
  the UI and the instance looked stuck on "running..." with no way to
  reprompt.

Also
- Thread creation fixes in the daemon workspace and console threads.
- Smaller file tree caret with a tighter gap to the label.

Co-authored-by: Cursor <cursoragent@cursor.com>
@michaeljguarino
michaeljguarino requested review from a team as code owners November 26, 2026 03:07
@michaeljguarino michaeljguarino added the enhancement New feature or request label Nov 26, 2026
@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this (alongside the kas image with the same tag)

@plural-copilot

Copy link
Copy Markdown
Contributor

The deployment GitOps PR is ready: https://github.com/pluralsh/plrl-up-demos/pull/3817

It pins both Console and KAS to sha-08df638 for commit 08df638570ad7e6bbb53510c8ff61a3758682869, and it is annotated for mgmt/apps.

@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5 · One earlier blocking issue remains: a hung home write can still stop heartbeats from reporting the failure.RetriggerView in GreptileConfidence Score: 4/5

[High impact] The changes reach devbox storage, developer tool trust, and thread workflows.

One earlier blocking issue remains: a hung home write can still stop heartbeats from reporting the failure.

Findings

  1. P1 Home errors cannot get through ▶

Summary

This PR strengthens ZeroFS homes, widens package-manager CA trust, and prevents long titles from blocking ingest.

  • ZeroFS writers are harder to lose, and their health is easier to see.
  • The gateway remounts a devbox home when it stops accepting writes.
  • More devbox tools trust the private CA bundle.
  • Long session and interaction titles are shortened before saving.
  • Thread setup handles repeated repositories and slower checkouts.
  • File-tree carets are smaller and sit closer to their labels.

Reviews (2) · Last reviewed commit: "address comments" · Reviewed by Greptile

Comment on lines +282 to +283
Event: &devboxv1.DaemonEvent_Heartbeat{Heartbeat: &devboxv1.DaemonHeartbeat{HeadOffset: head, Idle: d.idle.State(),
HomeError: d.home.error()}}}); err != nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Home errors cannot get through

Each heartbeat calls d.events.Head() before sending HomeError. That call takes the same lock that eventlog.Sync() holds during disk writes and fsync. When home I/O hangs, the heartbeat can block before reporting the failure, so the gateway cannot start the new recovery path. Read the heartbeat's offset without waiting for disk work, and keep home-health reporting off the event log.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread lib/console/devboxes/ingest.ex Resolved
Comment thread lib/console/devboxes/threads.ex Resolved
Comment thread lib/grpc/devbox/v1/common.pb.ex Resolved
@michaeljguarino

Copy link
Copy Markdown
Member Author

@greptileai

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this (alongside setting kas to the same sha)

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up: GitOps promotion PR pluralsh/plrl-up-demos#3818 pins Console and KAS to sha-fca61ca from this PR head fca61cae136fa5b8751a3bd358a50ff24a0dae98. The GitOps PR is annotated Plural Service: mgmt/apps.

Brings the main-view browser, fullscreen, and draft restore onto the
branch already deployed for testing.

Co-authored-by: Chris Akinrinade <chrisakinrinade@users.noreply.github.com>

# Conflicts:
#	js/console/src/components/workbenches/workbench/devboxes/DevboxControlPanel.tsx
@cursor

cursor Bot commented Nov 26, 2026

Copy link
Copy Markdown

Added the devbox browser main view from #4740 so it is on this branch for the plrldemo test.

The Browser button and the main view stay behind the DevboxBrowser flag, which still defaults to off. Turn that flag on for a box with browser set to try the session.

@cursor cursor Bot mentioned this pull request Nov 26, 2026
4 tasks done
@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Demo deployment handoff: https://github.com/pluralsh/plrl-up-demos/pull/3821 updates the Console image to sha-2516584 and includes the required Plural Service: mgmt/apps annotation. Thanks!

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

Copy link
Copy Markdown
Contributor

Follow-up: demo deployment GitOps PR: https://github.com/pluralsh/plrl-up-demos/pull/3822

The demo deployment is pinned to sha-7fb078a.

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment PR created: https://github.com/pluralsh/plrl-up-demos/pull/3824

It promotes the Console main image to sha-00a3abd and is annotated Plural Service: mgmt/apps.

@michaeljguarino
michaeljguarino force-pushed the devbox-truncate-ingest-titles branch from 00a3abd to 601b355 Compare November 26, 2026 18:35
@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up (non-blocking): deployment GitOps PR pluralsh/plrl-up-demos#3825 pins the demo Console main image to sha-601b355 from source head 601b35545234b9209351583bd9a321aae6fbcf03, and contains Plural Service: mgmt/apps for reconciliation.

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment promotion PR created: https://github.com/pluralsh/plrl-up-demos/pull/3865

It pins Console to sha-dc32297, derived from current PR head dc32297, and is annotated Plural Service: mgmt/apps.

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

Copy link
Copy Markdown
Contributor

Deployment PR created: https://github.com/pluralsh/plrl-up-demos/pull/3867 — pins the demo Console image to sha-ea0691a (head ea0691ab2429a8600ed431ae311a78134a6dfea4).

@michaeljguarino
michaeljguarino force-pushed the devbox-truncate-ingest-titles branch from ea0691a to e987cbb Compare November 29, 2026 06:26
@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requested demo deployment promotion has been created: https://github.com/pluralsh/plrl-up-demos/pull/3868

@michaeljguarino
michaeljguarino force-pushed the devbox-truncate-ingest-titles branch from 1aa2c3e to f8299c3 Compare November 29, 2026 15:53
@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment promotion PR created: https://github.com/pluralsh/plrl-up-demos/pull/3869

It updates the Console image tag to sha-f8299c3 and is annotated Plural Service: mgmt/apps.

@michaeljguarino
michaeljguarino force-pushed the devbox-truncate-ingest-titles branch from 01cb31b to 02974b7 Compare November 29, 2026 17:03
@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested deployment PR: https://github.com/pluralsh/plrl-up-demos/pull/3870

It pins Console to sha-eb84bb5 from source head eb84bb5e962f1f81c300645c0748c92bce1ea4a0. The GitOps PR is annotated Plural Service: mgmt/apps.

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot

Copy link
Copy Markdown
Contributor

Deployment PR created: https://github.com/pluralsh/plrl-up-demos/pull/3872 — promotes the demo Console image to sha-68c5b7e via mgmt/apps.

@linear

linear Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

PROD-5479

PROD-5480

@michaeljguarino

Copy link
Copy Markdown
Member Author

plural deploy this

@plural-copilot plural-copilot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaeljguarino
michaeljguarino force-pushed the devbox-truncate-ingest-titles branch from 2530103 to c7e10ae Compare November 30, 2026 00:23
@michaeljguarino
michaeljguarino merged commit 7c7fd98 into master Nov 30, 2026
140 of 141 checks passed
@michaeljguarino
michaeljguarino deleted the devbox-truncate-ingest-titles branch November 30, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hotfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants