Repository navigation
Conversation
TomChv
force-pushed
the
feat/bump-engine-beta10
branch
from
August 25, 2026 16:06
554d0c1 to
e8eab51
Compare
TomChv
marked this pull request as ready for review
August 25, 2026 16:15
eunomie
approved these changes
Aug 26, 2026
TomChv
force-pushed
the
feat/bump-engine-beta10
branch
from
August 28, 2026 11:24
e8eab51 to
653f99d
Compare
TomChv
force-pushed
the
feat/bump-engine-beta10
branch
from
August 28, 2026 12:26
653f99d to
b7778e1
Compare
Everything this repo ships is pinned to one engine release, so a bump moves four things together, and skipping any of them is silent: the vendored library sources, its generated bindings, the bundle built from them, and the Go generator. Re-vendored from the tag. beta.10 changes the library's introspector and its registry, and adds `agent` to the module-facing index.ts — the same export whose absence at beta.9 would have left modules unable to resolve it, caught again here by the check that every re-export exists in the bundle. The generator moved too, and three-way merged cleanly against our local changes: `@agent` support in the entrypoint, nullable objects gated on a beta.10 cutover, and the extendable-type list dropping Binding and Env. Left unsynced, that last one would have generated augmentations for types the engine no longer has. tsdistconsts is unchanged, so the typescript pin and bun image digest hold. sdk-sdk pins its own CLI release, which the workspace now overrides to match — otherwise its harness pairs our beta.10 library with a beta.9 engine and every scaffolded module fails to load. The fixture modules move with it. All eight name an engine release in their dagger-module.toml, and a fixture left behind still generates and still loads — so it goes on passing every check while covering a release we no longer ship for. Three sat at beta.9 and four at beta.7 before this. The release itself stops being repeated: the SDK states it once as targetEngineVersion, the runtimes harness reads it off there, and a check asserts every fixture agrees, so the next bump fails until it has moved everything. VENDOR.md records the new tag and commit, and the two deltas this import changed: bun.lock and .mocharc.json are ours, and the yarn-style scoped mocha resolutions are deliberately not carried forward. Signed-off-by: Tom Chauveau <[email protected]>
dagger/sdk-sdk#20 threaded the configured CLI release through to the contract checks, which had been running mod-test's own pinned default and so pairing this SDK's beta.10 bundle with a beta.9 engine. That fix reached us through the sdk-sdk resolution already recorded in dagger.lock, not through anything in this commit — only the comment changes here, and the subject should not suggest otherwise. What the comment now says: the pin stays because this SDK ships a library built for one engine release, so the version the harness runs is load-bearing. sdk-sdk's default happens to match ours today; stating the requirement here means its default moving ahead of ours shows up as a failing check rather than a library quietly paired with a newer engine. All 22 contract-suite checks pass. Signed-off-by: Tom Chauveau <[email protected]>
The client-bundle design leaned on withDirectory being an overlay, which it is not: the polyfill documents it as "add or replace" and the replace is real in the changeset's after tree. What makes client regeneration safe is that a client changeset is only ever applied to disk, and applying is additive. That distinction is the difference between the two paths. Module generation stages its changeset into a workspace and reads it back, where unstaged files — the module's own config and source — do disappear; hence the diff-based staging it uses instead. Verified rather than reasoned: a client directory holding a vendored sdk/core.js and an unrelated NOTES.md keeps both across a regeneration, with removedPaths empty. Signed-off-by: Tom Chauveau <[email protected]>
TomChv
force-pushed
the
feat/bump-engine-beta10
branch
from
August 28, 2026 13:17
b7778e1 to
f1dcf91
Compare
Member
Author
|
Superseded by #39, which squashes this whole stack into a single PR off The stack had PRs overwriting each other — this one included — which made the intermediate states hard to reason about, and thirteen PRs each fanning out a full check suite made CI unreadable. Branch is left pushed, so nothing here is lost. |
TomChv
added a commit
that referenced
this pull request
Aug 28, 2026
A TypeScript module's generated files — `sdk/`, `__dagger.entrypoint.ts`, and the config the runtime reads — were produced by the engine: `dagger generate` called into this SDK, which handed straight back to the engine's built-in TypeScript runtime, which ran `cmd/codegen` and `ts-introspector` in nested sessions. This SDK now produces them itself, the way it already produced clients: schema and module metadata in as plain data, container execs, changeset out, no round trip. Three reasons, the same ones the client move had. The SDK repo should own what the SDK emits, so a codegen fix is not an engine release. The upstream path carries three SDK-lib origins, a Go+TypeScript shared binary, module/client coexistence and per-runtime duplication, nearly all of which is dead on arrival for our narrower contract. And codegen becomes `go test` plus `dagger check` here instead of an engine integration test. Running a module stays with the engine's runtime. That split is the hardest constraint in the design: for a `dagger-module.toml` module the runtime does no codegen at call time, it mounts `sdk/` as `@dagger.io/dagger` and executes the committed entrypoint. Whatever generate writes *is* the artifact that runs, and it has to satisfy an unchanged runtime byte for byte in the parts it reads. **The library.** Generated bindings import their runtime from `./core.js`, a bundle that only existed inside the engine image. `library/` vendors dagger/dagger's `sdk/typescript` at v1.0.0-beta.11 and `.dagger/modules/packager` builds the bundle from it with the same recipe and pinned image the engine uses, committed so that generating a module needs no bun toolchain and no network. A copy has no merge base git can compute, so `library/VENDOR.md` records the one it would have had: source tag and commit, what was deliberately left behind, the exhaustive list of local deltas, and the re-import procedure. **Codegen.** `helpers/codegen` gains `module` (a module's own bindings, split per dependency), `entrypoint` (the static dispatcher, rendered from the introspector's typedef scan) and `library` (the vendored library's own bindings) alongside `client`. `helpers/config-updator` writes the module config the runtime reads. **Routing.** `Mod.generate` takes the local path for `dagger-module.toml` modules and keeps delegating for `dagger.json` ones, which regenerate at call time regardless. Both stage the local dependency closure first — a dependent's schema is only loadable once its deps' generated files exist — and both take that staging back out of the changeset, each in the way its route requires. Regeneration prunes the `*.gen.ts` it owns out of the baseline the generated tree is layered onto. Layering is what keeps the module's own source and config in the changeset, but it can only add, so a dependency dropped from the config would otherwise keep its `<dep>.gen.ts` — an API against a module that is no longer served, which a default tsc rejects. Pruned in one place, matching what #37 established for client generation once `withNewDirectory` stopped meaning different things on different workspace kinds. **Engine pairing.** Everything here is built for one release. The SDK states it once as `targetEngineVersion`; the runtime harness and every fixture read from there, and a check fails when they disagree. **Tests.** Golden tests over the renderers; e2e checks over the generated tree, the routing, dependency edges in both config formats, config preservation and binding pruning; a differential check that generates a fixture through this SDK and through the engine and diffs everything but the bundle; and one fixture per TypeScript runtime that loads a generated module and calls a function on it, which is the only thing that proves the on-disk contract end to end. Replaces the #18 → #34 stack, squashed: several of those PRs overwrote earlier ones, which made the intermediate states hard to reason about and impossible to test independently. Signed-off-by: Tom Chauveau <[email protected]>
TomChv
added a commit
that referenced
this pull request
Aug 28, 2026
A TypeScript module's generated files — `sdk/`, `__dagger.entrypoint.ts`, and the config the runtime reads — were produced by the engine: `dagger generate` called into this SDK, which handed straight back to the engine's built-in TypeScript runtime, which ran `cmd/codegen` and `ts-introspector` in nested sessions. This SDK now produces them itself, the way it already produced clients: schema and module metadata in as plain data, container execs, changeset out, no round trip. Three reasons, the same ones the client move had. The SDK repo should own what the SDK emits, so a codegen fix is not an engine release. The upstream path carries three SDK-lib origins, a Go+TypeScript shared binary, module/client coexistence and per-runtime duplication, nearly all of which is dead on arrival for our narrower contract. And codegen becomes `go test` plus `dagger check` here instead of an engine integration test. Running a module stays with the engine's runtime. That split is the hardest constraint in the design: for a `dagger-module.toml` module the runtime does no codegen at call time, it mounts `sdk/` as `@dagger.io/dagger` and executes the committed entrypoint. Whatever generate writes *is* the artifact that runs, and it has to satisfy an unchanged runtime byte for byte in the parts it reads. **The library.** Generated bindings import their runtime from `./core.js`, a bundle that only existed inside the engine image. `library/` vendors dagger/dagger's `sdk/typescript` at v1.0.0-beta.11 and `.dagger/modules/packager` builds the bundle from it with the same recipe and pinned image the engine uses, committed so that generating a module needs no bun toolchain and no network. A copy has no merge base git can compute, so `library/VENDOR.md` records the one it would have had: source tag and commit, what was deliberately left behind, the exhaustive list of local deltas, and the re-import procedure. **Codegen.** `helpers/codegen` gains `module` (a module's own bindings, split per dependency), `entrypoint` (the static dispatcher, rendered from the introspector's typedef scan) and `library` (the vendored library's own bindings) alongside `client`. `helpers/config-updater` writes the module config the runtime reads. **Routing.** `Mod.generate` takes the local path for `dagger-module.toml` modules and keeps delegating for `dagger.json` ones, which regenerate at call time regardless. Both stage the local dependency closure first — a dependent's schema is only loadable once its deps' generated files exist — and both take that staging back out of the changeset, each in the way its route requires. Regeneration prunes the `*.gen.ts` it owns out of the baseline the generated tree is layered onto. Layering is what keeps the module's own source and config in the changeset, but it can only add, so a dependency dropped from the config would otherwise keep its `<dep>.gen.ts` — an API against a module that is no longer served, which a default tsc rejects. Pruned in one place, matching what different things on different workspace kinds. **Engine pairing.** Everything here is built for one release. The SDK states it once as `targetEngineVersion`; the runtime harness and every fixture read from there, and a check fails when they disagree. **Tests.** Golden tests over the renderers; e2e checks over the generated tree, the routing, dependency edges in both config formats, config preservation and binding pruning; a differential check that generates a fixture through this SDK and through the engine and diffs everything but the bundle; and one fixture per TypeScript runtime that loads a generated module and calls a function on it, which is the only thing that proves the on-disk contract end to end. Replaces the #18 → #34 stack, squashed: several of those PRs overwrote earlier ones, which made the intermediate states hard to reason about and impossible to test independently. Rebased onto #37 (beta.11) and #38 (the interface-return fix and the config-updater rename); the entrypoint golden #38 added is regenerated here, because this generator emits the source maps the engine expects and main's did not. Signed-off-by: Tom Chauveau <[email protected]>
TomChv
added a commit
that referenced
this pull request
Sep 1, 2026
A TypeScript module's generated files — `sdk/`, `__dagger.entrypoint.ts`, and the config the runtime reads — were produced by the engine: `dagger generate` called into this SDK, which handed straight back to the engine's built-in TypeScript runtime, which ran `cmd/codegen` and `ts-introspector` in nested sessions. This SDK now produces them itself, the way it already produced clients: schema and module metadata in as plain data, container execs, changeset out, no round trip. Three reasons, the same ones the client move had. The SDK repo should own what the SDK emits, so a codegen fix is not an engine release. The upstream path carries three SDK-lib origins, a Go+TypeScript shared binary, module/client coexistence and per-runtime duplication, nearly all of which is dead on arrival for our narrower contract. And codegen becomes `go test` plus `dagger check` here instead of an engine integration test. Running a module stays with the engine's runtime. That split is the hardest constraint in the design: for a `dagger-module.toml` module the runtime does no codegen at call time, it mounts `sdk/` as `@dagger.io/dagger` and executes the committed entrypoint. Whatever generate writes *is* the artifact that runs, and it has to satisfy an unchanged runtime byte for byte in the parts it reads. **The library.** Generated bindings import their runtime from `./core.js`, a bundle that only existed inside the engine image. `library/` vendors dagger/dagger's `sdk/typescript` at v1.0.0-beta.11 and `.dagger/modules/packager` builds the bundle from it with the same recipe and pinned image the engine uses, committed so that generating a module needs no bun toolchain and no network. A copy has no merge base git can compute, so `library/VENDOR.md` records the one it would have had: source tag and commit, what was deliberately left behind, the exhaustive list of local deltas, and the re-import procedure. **Codegen.** `helpers/codegen` gains `module` (a module's own bindings, split per dependency), `entrypoint` (the static dispatcher, rendered from the introspector's typedef scan) and `library` (the vendored library's own bindings) alongside `client`. `helpers/config-updater` writes the module config the runtime reads. **Routing.** `Mod.generate` takes the local path for `dagger-module.toml` modules and keeps delegating for `dagger.json` ones, which regenerate at call time regardless. Both stage the local dependency closure first — a dependent's schema is only loadable once its deps' generated files exist — and both take that staging back out of the changeset, each in the way its route requires. Regeneration prunes the `*.gen.ts` it owns out of the baseline the generated tree is layered onto. Layering is what keeps the module's own source and config in the changeset, but it can only add, so a dependency dropped from the config would otherwise keep its `<dep>.gen.ts` — an API against a module that is no longer served, which a default tsc rejects. Pruned in one place, matching what different things on different workspace kinds. **Engine pairing.** Everything here is built for one release. The SDK states it once as `targetEngineVersion`; the runtime harness and every fixture read from there, and a check fails when they disagree. **Tests.** Golden tests over the renderers; e2e checks over the generated tree, the routing, dependency edges in both config formats, config preservation and binding pruning; a differential check that generates a fixture through this SDK and through the engine and diffs everything but the bundle; and one fixture per TypeScript runtime that loads a generated module and calls a function on it, which is the only thing that proves the on-disk contract end to end. Replaces the #18 → #34 stack, squashed: several of those PRs overwrote earlier ones, which made the intermediate states hard to reason about and impossible to test independently. Rebased onto #37 (beta.11) and #38 (the interface-return fix and the config-updater rename); the entrypoint golden #38 added is regenerated here, because this generator emits the source maps the engine expects and main's did not. Signed-off-by: Tom Chauveau <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Everything this repo ships is pinned to one engine release, so a bump moves four
things together, and skipping any of them is silent: the vendored library
sources, its generated bindings, the bundle built from them, and the Go
generator.
Re-vendored from the tag. beta.10 changes the library's introspector and its
registry, and adds
agentto the module-facing index.ts — the same export whoseabsence at beta.9 would have left modules unable to resolve it, caught again
here by the check that every re-export exists in the bundle.
The generator moved too, and three-way merged cleanly against our local changes:
@agentsupport in the entrypoint, nullable objects gated on a beta.10 cutover,and the extendable-type list dropping Binding and Env. Left unsynced, that last
one would have generated augmentations for types the engine no longer has.
tsdistconsts is unchanged, so the typescript pin and bun image digest hold.
The workspace also pins sdk-sdk's CLI release to match. dagger/sdk-sdk#20 threads
the configured release through to the contract checks, which previously ran
mod-test's own pinned default and so paired this SDK's beta.10 bundle with a
beta.9 engine; all 22 contract-suite checks pass again. The pin stays even though
sdk-sdk's default matches ours today, because this SDK ships a library built for
one engine release, so the version the harness runs is load-bearing.
Also records what fork.withDirectory actually does. The client-bundle design
leaned on it being an overlay, which it is not: the polyfill documents it as
"add or replace" and the replace is real in the changeset's after tree. What
makes client regeneration safe is that a client changeset is only ever applied
to disk, and applying is additive. Module generation stages its changeset into a
workspace and reads it back, where unstaged files — the module's own config and
source — do disappear; hence the diff-based staging it uses instead. Verified
rather than reasoned: a client directory holding a vendored sdk/core.js and an
unrelated NOTES.md keeps both across a regeneration, with removedPaths empty.
Signed-off-by: Tom Chauveau [email protected]
Stack created with GitHub Stacks CLI • Give Feedback 💬