Skip to content

Delete the workspace file read - #493

Merged
SaladDay merged 1 commit into
aos/cutoverfrom
aos/delete-workspace-file-read
Oct 7, 2026
Merged

SaladDay merged 1 commit into
aos/cutoverfrom
aos/delete-workspace-file-read

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

workspace_read carried two operations: a byte-file read and a directory listing. Core never requests a file read: runtimegateway.Session.ReadWorkspaceFile had no caller outside tests, and only ListWorkspaceDirectory is called (from execution/environment_directory.go). Every daemon path serving a file read was unreachable.

Deleted end to end (about 860 lines net):

  • Wire: max_bytes, operation, data and truncated, and WorkspaceReadMaxBytes. operation was always directory once the file form is gone. proto.Version stays 0.12.0.
  • Core: ReadWorkspaceFile, with one result validator left.
  • Daemon: dispatch's reader branch; agent.WorkspaceReader and WorkspaceReadResult; localworkspace ReadWorkspaceFile; the Claude SDK read path (Go side, stdin frame, TS workspace_reads.ts, the workspace_read runtime feature); the Codex and MiniMax Code stubs.
  • Selection: workspaceResourceLocked returns a WorkspaceDirectoryLister instead of any. A preparation handle is served only by the local workspace binding (the only producer of a read-only preparation); the dead p.prepared / p.executor.native selection is gone.

Directory listing is unchanged, and workspace_read keeps its name. Docs: docs/runtime-protocol.md and harness-onboarding.md (+ zh).

Checks:

  • Go: focused tests for runtimegateway, execution, dispatch, localworkspace, agent, cli and proto; -race -count=50 on the changed concurrent tests; vet and gofmt; darwin/windows daemon builds.
  • Core integration: 49 tests that touch workspace reads, against Postgres.
  • Claude SDK adapter: pnpm typecheck and node --test (160/160).
  • Repo checks: the translations test and make check-names check-docs check-ci.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Core never requested a byte read of a workspace file; only directory listing is called. Remove the file-read operation end to end: the gateway method, the wire fields operation, max_bytes, data and truncated, the dispatch reader branch, agent.WorkspaceReader and WorkspaceReadResult, the localworkspace, Claude, Codex and MiniMax Code implementations, and the Claude bridge's workspace_read feature. Directory selection returns a typed lister; a preparation handle is served only by the local workspace binding.
@SaladDay
SaladDay merged commit b19805f into aos/cutover Oct 7, 2026
19 checks passed
@SaladDay
SaladDay deleted the aos/delete-workspace-file-read branch October 7, 2026 13:45
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