Skip to content

[1.0-beta] feat: back workspaces with private sources - #13347

Merged
eunomie merged 6 commits into
mainfrom
codex/synthetic-workspace-tests
Jun 22, 2026
Merged

eunomie merged 6 commits into
mainfrom
codex/synthetic-workspace-tests

Conversation

@dagger-codex

@dagger-codex dagger-codex Bot commented Jun 6, 2026 •

Copy link
Copy Markdown
Contributor

Requested by solomon (<@488409085998530571>, Discord user ID 488409085998530571).

Why

Synthetic workspaces should behave like workspaces, not like leaked storage details.

This matters because file reads, Git state, and future write methods all need one clear source of truth.

What changed

  • Directory.asWorkspace(cwd:)
  • GitRef.asWorkspace(cwd:)
  • GitRepository.asWorkspace(cwd:) still works by using head
  • Remote -W keeps its Git ref internally
  • workspace.git() reads Git state from that ref
  • Workspace write methods return a modified copy
  • Source, backend, and client details stay private

Tests

Passed:

  • git diff --check HEAD~1..HEAD
  • go test ./core ./core/schema ./engine/server ./core/integration -run '^$' -count=0
  • go test ./core/schema ./engine/server
  • go test ./core/schema -run TestWorkspacePrivateSourceFieldsAreNotGraphQLFields -count=1

The focused runtime tests still stop early in this VM because its active engine schema does not include the new workspace fields yet.

Base automatically changed from 1.0-beta to main June 8, 2026 21:52
@grouville
grouville changed the base branch from main to design/cli-1.0 June 17, 2026 22:33
@grouville
grouville changed the base branch from design/cli-1.0 to main June 17, 2026 22:33
@grouville
grouville force-pushed the codex/synthetic-workspace-tests branch from 7c9dedd to e89202f Compare June 17, 2026 22:34
@grouville
grouville requested review from a team as code owners June 18, 2026 00:36
@shykes shykes added this to the 1.0.0-beta.4 milestone Jun 18, 2026
Describe the private source model for local, directory, Git ref, and
overlay workspaces without exposing backend details in GraphQL.

Co-authored-by: Solomon Hykes <[email protected]>
Signed-off-by: Tibor Vass <[email protected]>
@tiborvass
tiborvass force-pushed the codex/synthetic-workspace-tests branch 2 times, most recently from b42e5ef to 3cd2344 Compare June 21, 2026 01:47
@tiborvass
tiborvass force-pushed the codex/synthetic-workspace-tests branch 3 times, most recently from 24df415 to c199cfc Compare June 22, 2026 02:55
tiborvass and others added 4 commits June 21, 2026 20:24
Store the backing source as an internal Workspace detail and use it for
filesystem, git, persistence, and dependency attachment semantics.
Add GitRef.asWorkspace, make GitRepository.asWorkspace resolve head,
keep remote -W tied to its Git ref, and model functional writes as
overlays.

Co-authored-by: Solomon Hykes <[email protected]>
Co-authored-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Tibor Vass <[email protected]>
Workspace.ClientID is now internal state used to route workspace host
filesystem operations to the owning client. It is intentionally not a
GraphQL field in the private-source workspace model.

base_schema.json is the golden schema for the oldest supported module view,
so it also needs to drop Workspace.clientId. Keeping it there makes the base
schema allowlist claim that older clients can select a field the engine no
longer exposes.

Signed-off-by: Tibor Vass <[email protected]>
Update generated schema, SDK bindings, and reference output for
GitRef.asWorkspace and Workspace overlay methods.

Co-authored-by: Solomon Hykes <[email protected]>
Co-authored-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Tibor Vass <[email protected]>
Assert the public behavior for directory and GitRef-backed workspaces,
overlay writes, remote -W rootfs shape, local-only mutation errors,
and private source fields.

Co-authored-by: Solomon Hykes <[email protected]>
Co-authored-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Tibor Vass <[email protected]>
@tiborvass
tiborvass force-pushed the codex/synthetic-workspace-tests branch from c199cfc to acadf4b Compare June 22, 2026 03:34
TestInstallK3S was treating the k3s service port and kubeconfig as enough
readiness before running kubectl. In CI, the API server can accept connections
before discovery and node readiness are available, causing kubectl to fail with
ServiceUnavailable.

Replace the one-shot kubectl probe with a bounded readiness loop that waits for
node listing and the Ready condition, and dumps cluster state on timeout.

Signed-off-by: Tibor Vass <[email protected]>
@eunomie
eunomie merged commit ee3341f into main Jun 22, 2026
81 checks passed
@eunomie
eunomie deleted the codex/synthetic-workspace-tests branch June 22, 2026 14:40
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.

3 participants