Skip to content

docs: propose Kubernetes execution and filesystem integration - #2152

Merged
blkt merged 10 commits into
mainfrom
docs/kubernetes-execution-filesystems-proposal-20261007
Oct 27, 2026
Merged

blkt merged 10 commits into
mainfrom
docs/kubernetes-execution-filesystems-proposal-20261007

Conversation

@JAORMX

@JAORMX JAORMX commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Document the current Kubernetes execution provider and the gap between retained storage and file access independent of executor compute.
  • Define requirements for live shared files, stable storage identity, recovery, instruction-source separation, and agent-scoped authorization.
  • Compare API-backed and mounted filesystem approaches, filesystem candidates, and upstream execution platforms without selecting or claiming an implemented integration.
  • Add the proposal to the documentation reading map.

This is a design proposal only; no runtime behavior changes.

Validation

  • Reviewed the proposal against adjacent architecture, identity, grants, and execution-lifecycle material and relevant implementation paths.
  • git diff --check passed.
  • task docs passed locally on the initial proposal commit; no generated-file changes.
  • CI passed on b6071737b, including strict documentation validation. The initial CI run caught references to two drafts removed from main while this branch was being prepared; those references now use immutable historical links.
  • Full local code gates (task lint, task test:race, offline demo) were not completed. PR remains a draft; this change is documentation-only.

@JAORMX
JAORMX force-pushed the docs/kubernetes-execution-filesystems-proposal-20261007 branch 2 times, most recently from 3726ae5 to 16e3d45 Compare October 8, 2026 11:14
@blkt
blkt force-pushed the docs/kubernetes-execution-filesystems-proposal-20261007 branch from 3ec280c to adf8354 Compare October 19, 2026 15:05
@jerm-dro

Copy link
Copy Markdown
Contributor

suggestion: I appreciate the thorough collection of options and the care taken over the security and consistency constraints. Before we choose a placement model, though, I think the doc needs more detail on the long-term direction. As written, it picks its architecture against two scenarios: interactive coding with a shell, and file-only sessions. It doesn't say which user scenarios we're designing for or how we'd weigh them. Some valuable scenarios that the repo already describes seem to change the outcome:

  • Tools working on files directly through scoped grants. Scoped resource grants and cloud-native harness systems describe a filesystem service as a shared foundation. In this design, files in a shell session are reachable only through its executor (L183–187), so a tool can't be granted direct access to them.
  • People uploading, downloading, and sharing files. Today a remote client can't upload or share files into the workspace, and the doc doesn't address it. In this design, getting a shell session's output out means going through its executor, so downloading yesterday's report requires starting a sandbox. Sharing a workspace means sharing an executor, and someone can't browse a running session's files at all.

Both favor file access that doesn't depend on a running executor, which is the property the selected design gives up for shell sessions. Other capabilities worth weighing the options against:

  • cheap workspace forks and snapshots for Parallel and Team branches
  • several sessions on one workspace, such as scheduled tasks
  • adding a shell to a file-only session partway through
  • governed backends such as Drive or S3
  • idle cost for long-lived workspaces

I'd suggest a short, explicit process for choosing between the options:

  1. List the user scenarios and the capabilities each implies, current and expected. This keeps an important use case from being left out.
  2. Assign each capability a value: must have now, must not rule out, or out of scope. This keeps capabilities that matter for only one scenario from shaping the whole design. For example, live visibility between file tools and the shell, and full POSIX behavior, currently push every session onto shared POSIX storage.
  3. Estimate the marginal cost of each capability under each candidate architecture, including operating cost, and state the assumptions. For example, the selected design assumes per-agent permission checks can be enforced on native mounts, but every candidate in Appendix B lists that as open research. If that assumption fails, the cost changes significantly.

That should make the choice of near-term implementation much easier to evaluate and defend.

@blkt
blkt force-pushed the docs/kubernetes-execution-filesystems-proposal-20261007 branch from e5a545c to 4029673 Compare October 22, 2026 12:21
JAORMX and others added 10 commits October 26, 2026 13:42
The drafts were removed from main after this branch was created. Preserve the reviewed references using immutable source links.

Co-authored-by: Mecatl <[email protected]>
Name the placement modes where they are first used, describe the
two-component architecture without committing to executor sharing,
shorten the executor-loss durability requirements, and point to the
identity and grants drafts instead of restating them.
Drop the shared file-service workers: every session with file access
gets a dedicated executor that serves its files and, when admitted, its
commands. Update the architecture, diagram, recovery, trusted-authority,
and integration-choice sections to match, and give the trusted service
sole ownership of authentication, routing, and lifecycle.

Remove the file-tool semantics row from the Substrate comparison.
Versioned reads and conditional replacement are a Mecatl Workspace
adapter concern, not a backend feature. osfs builds them on plain OS
file I/O, and an adapter over Substrate's raw ReadFile/WriteFile could
build them the same way. Treating this as a Substrate shortcoming
invents a limitation that doesn't exist.

Re-verify the env claims against fccd920ae90a and re-pin its links:
the guest truncates in place on write, neither the API nor the guest
authenticates callers, and the process and filesystem services can be
enabled independently.
@blkt
blkt force-pushed the docs/kubernetes-execution-filesystems-proposal-20261007 branch from 4029673 to 9f9c26b Compare October 26, 2026 14:32
@blkt
blkt marked this pull request as ready for review October 26, 2026 14:52
@blkt

blkt commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

@jerm-dro I think this design describes a machinery that operates at a lower level than the one you're describing.

Our initial target is enabling a bunch of rather simple use cases that do not require scoped resource grants, so I won't discuss the details of it here. Also, I'm not terribly familiar with the design.

Regarding your second bullet point, the answer is yes, this design doc does not specify how to get files in and out of an agent's session, because I don't believe that detail belongs here.
I believe the right design involves some intermediary store (e.g. S3-like or Redis) used to move files in both directions that only relies on authorization and a proxy/index service. Ideally, the agent loop would be responsible for moving files between said store and the execution environment (via some unspecified RPC pair).

From the perspective of the execution environment, it is very hard to tell which file was created by the agent (e.g. if the file was downloaded using gh CLI through a Shell tool call vs written via a Write or Edit tool calls) and which file was part of the execution environment, either current or restored.
On the other hand, the agent does know whether a file is the result of some work, so a UploadResult tool can be envisioned to let the agent decide when to move bytes from the execution environment to the intermediary store.
An even simpler argument can be made for client-to-session file uploads, which are entirely mechanical and very limited in scope.

Please let me know if this clarifies your doubts.

@blkt
blkt merged commit 15672f0 into main Oct 27, 2026
57 checks passed
@blkt
blkt deleted the docs/kubernetes-execution-filesystems-proposal-20261007 branch October 27, 2026 13:12
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Nov 18, 2026
2 tasks
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.

4 participants