Repository navigation
Conversation
APIViewVersion now keeps a declared prerelease from PrereleaseViewsVersion (v1.0.0-beta.21) on, so a view gate can separate v1.0.0 betas. Dev builds still drop their prerelease and share the release's view. Every earlier v1.0.0 prerelease, from v1.0.0-0 to v1.0.0-beta.20, shares the v1.0.0-beta.20 view: it sorts above every gate set while views were base-granular, so those callers keep exactly the API they had. Add IdentifierCasingVersion, the cut for the identifier casing changes, and APIVersionAtLeast, the same gate for a declared version outside a call. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
Prove that a field gated at engine.IdentifierCasingVersion is visible to beta.21+, dev builds and v1.0.0, and hidden from beta.20 and earlier, including v1.0.0-0, while gates set before views kept prereleases keep applying to every v1.0.0 prerelease. Pin that view-scoped calls are cached per view and unscoped ones are not, and that every pre-cut v1.0.0 prerelease gets one core schema. Update the version-gating doc and the comments that said views drop prereleases. Signed-off-by: Alex Suraci <[email protected]>
While the engine is a v1.0.0 prerelease or dev build, a module declaring exactly v1.0.0 gets the shared pre-cut view (v1.0.0-beta.20) instead of the release's. Every sdk-helpers tag and go-sdk declare v1.0.0 and are locked by SDKs and users; on a beta.21 engine they would otherwise see the renamed API and break with no way to re-pin a locked tag. The clamp moves that break to v1.0.0 GA. ModuleAPIViewVersion maps module engineVersions to views (module client sessions, default schema builders) and backs APIVersionAtLeast. Client versions keep APIViewVersion. Proposal pending maintainer sign-off; this commit drops cleanly. Signed-off-by: Alex Suraci <[email protected]>
Say which mapping applies to modules (ModuleAPIViewVersion) and clients (APIViewVersion), that fixtures testing API past the cut must declare a prerelease from the cut on, and that a client's view follows the CLI that starts its session, not the SDK release it was generated with. Signed-off-by: Alex Suraci <[email protected]>
Stores written before prerelease-granular views recorded "v1.0.0" as the view of every v1.0.0 prerelease caller. That view is now the release's, past every prerelease gate, so a GA or dev-build caller would hit pre-cut results, and IDs naming fields gated before the cut would stop loading once such gates exist. Bump the persistence schema so they are wiped on import. Signed-off-by: Alex Suraci <[email protected]>
This was referenced Oct 22, 2026
The core schema's last names that aren't canonical under the identifier casing rules are renamed in the views from engine.IdentifierCasingVersion (v1.0.0-beta.21) on, dev builds and v1.0.0 included: GitCommit.shortSHA and parentSHAs, Artifacts.filterURI and withoutURI, LLMContentBlock(Input).callID, LLM.withToolResult(callID:), GitRepository.withRemote(pushURL:) and Workspace.withSDK(asSDKName:). Each spelling is its own field, argument or input field with a view filter (core.CanonicalNamesView, core.LegacyNamesView), as for withGPU, so no client view has both: in the SDKs' casings they would collide (shortSha and shortSHA are both Python's short_sha). They were all added during the v1.0.0 prereleases. FunctionCachePolicy follows ImageLayerCompression instead: DEFAULT, PER_SESSION and NEVER are added from the cut on as AliasViews of the PascalCase values, which stay in every view, because SDK module runtimes and clients generated before the cut name them. Both spellings decode to the same value, so IDs and cache keys don't change. The Dang SDK decodes @cache(policy:) through the enum, since a module's view decides which spellings it has. Internal selectors use the spelling of the view they select in (core.ViewName), or the canonical one in the internal view "". Earlier engines recorded workspace checkpoints' withRemote(pushUrl:) and agent tool results' withToolResult(callId:) in that view, so it keeps accepting those old spellings as internal arguments (core.RecordedNamesView), and their recipes still load. The cloud artifact query spells filterURI by the cloud engine's version (engineclient.Client.EngineVersion). `dagger workspace git log --json` keeps its shortSha/parentShas keys, so scripts reading them don't break. Signed-off-by: Alex Suraci <[email protected]>
engine/naming's core-schema test reads this schema, the latest view's, so its allowlist of non-canonical core names is now empty. The schema is the internal view "", where withToolResult's callID is optional: recipes recorded before the rename only spell callId there. Signed-off-by: Alex Suraci <[email protected]>
The Go client is generated from the dev engine's schema, whose view has the canonical names: GitCommit.ShortSHA and ParentSHAs, and the new wire names. The integration tests that use them follow. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/6-core-renames
branch
from
October 22, 2026 16:05
77e61d5 to
6db5cf6
Compare
vito
changed the base branch from
naming/5-sdks-combined
to
naming/view-prerelease-gate
October 22, 2026 16:05
vito
added a commit
to dagger/typescript-sdk
that referenced
this pull request
Oct 22, 2026
dagger/dagger#14812 serves an entrypoint module at the Dagger version its dang.toml declares ([imports.Dagger] dagger), and at v1.0.0-beta.20 when it declares none. Write entrypoint/dang.toml beside main.dang with dang = "2.1" and that version: the running engine's (minus build metadata) for a module being initialized, v1.0.0-beta.20 for one that already had an entrypoint, so regenerating never moves it onto the beta.21 naming. An existing dang.toml is kept as it is. It is written with the manifest, before the module's schema is read, so the bindings and the entrypoint are generated for the version the engine will serve. Engines before beta.21 get no file. The Dang entrypoint's FunctionCachePolicy spellings stay Default/PerSession/Never, valid on every view per dagger/dagger#14681. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
to dagger/go-sdk
that referenced
this pull request
Oct 22, 2026
Generated Dang entrypoints now come with a dang.toml beside them, declaring dang = "2.1" and [imports.Dagger] dagger = "<version>". Engines with dagger/dagger#14812 serve an entrypoint module the API, and name it by the rules, of that version; without one they serve v1.0.0-beta.20, the last version before the naming cut. Older engines copy only the .dang files and ignore it. The version follows the module, like a runtime module's engineVersion: - a dang.toml that declares one is kept, and the bindings are generated for it (one without a version is refused rather than rewritten); - an existing entrypoint without dang.toml gets v1.0.0-beta.20, what engines serve it today, so generating again never renames its API; - a new module, or one migrating from the Go runtime, gets the running engine's version (sdk-helpers' normalizeEngineVersion). The file is not generated code: it is the module's declaration to change. FunctionCachePolicy keeps its Default/PerSession/Never spelling: those stay valid at every view (dagger/dagger#14681), so the entrypoint needs no version-dependent spelling. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/view-prerelease-gate
branch
from
October 27, 2026 20:05
2873e64 to
94fdbda
Compare
vito
force-pushed
the
naming/view-prerelease-gate
branch
2 times, most recently
from
October 29, 2026 01:18
7cbf566 to
4979152
Compare
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.
Part 6/6 of the stack splitting #14501 (identifier casing). Plan: #14501 (comment) (decisions 24 and 25 in #14501 (comment))
Refs #13668
Base and merge ordering
Rebuilt on #14810 (
naming/view-prerelease-gate): prerelease-granular API views andengine.IdentifierCasingVersion(v1.0.0-beta.21). It doesn't need #14669 (module naming). Once #14810 merges, retarget this PR tomain.The earlier version of this PR (hidden aliases from #14668, plus a renamed-names table in every in-repo SDK generator) is kept on the backup branch
naming/6-core-renames-aliases(77e61d5). That design is abandoned, with the in-repo SDK PRs.Merge ordering: the versionless module entrypoint tests (
TestModule/TestModuleEntrypoint*) and SDK-generated entrypoints nameFunctionCachePolicy.Never/PerSession/Default. These keep working in every view (see below), so this PR doesn't depend on the entrypoint-versions PR. They don't move to the new spellings until entrypoints declare a version.What it does
The last core schema names that aren't canonical under the naming rules get renamed in the views from v1.0.0-beta.21 on (
engine.IdentifierCasingVersion), dev builds and v1.0.0 included. It's plain view gating, the waywithGPUanddisableDaggerInDaggerwere added. Each spelling is its own field, argument or input field with a view filter (core.CanonicalNamesView,core.LegacyNamesView). Views before the cut (v1.0.0-0 to beta.20, and pre-v1) see exactly the old names, and views from the cut on see only the new ones. No hidden aliases and no new dagql mechanism.GitCommitshortSha,parentShasshortSHA,parentSHAsArtifactsfilterUri,withoutUrifilterURI,withoutURILLMContentBlock,LLMContentBlockInputcallIdcallIDLLM.withToolResultcallId:callID:GitRepository.withRemotepushUrl:pushURL:Workspace.withSDKasSdkName:asSDKName:FunctionCachePolicyDefault,PerSession,NeverDEFAULT,PER_SESSION,NEVERengine/naming's core-schema test reads the latest view's schema and now allows no non-canonical field or argument names (the 7-name allowlist from #14659 is empty).core/schema/renamed_names_test.gochecks every rename in each view: v1.0.0-0, beta.17 and beta.20 see only the old names, and beta.21, beta.22, a dev build and v1.0.0 see only the new ones.Mechanism per kind
shortSHA,parentSHAs,filterURI,withoutURI,LLMContentBlock.callID): twoFuncs, one per spelling, withView(CanonicalNamesView)/View(LegacyNamesView).LLMContentBlock.callIDwas afield:"true"struct field, so it becomes an explicit trivial accessor.withToolResult(callID:),withRemote(pushURL:),withSDK(asSDKName:)): the args struct has both fields.Args()gives each spelling its view, the same mechanism as theexperimentalPrivilegedNestingvariants, and the resolver takes whichever is set. Every renamed field and argument variant has a view filter, and so do the fields they're on, so the view is part of the call's cache identity.LLMContentBlockInput.callID): the struct has both fields. The installedInputObjectSpecgives each its view (contentBlockInputSpec). Decoding takes either.FunctionCachePolicy): this followsImageLayerCompression, not pure gating.DEFAULT/PER_SESSION/NEVERareAliasViews added from the cut on, andDefault/PerSession/Neverstay in every view. Both decode to the same Go value and literal, so IDs and cache keys don't change. The old values have to stay. SDK module runtimes hard-code them (Python's_module.py, the TS and Java entrypoint templates), and so do versionless entrypoints and clients generated before the cut. With pure gating, a Python module onlatestthat usescache=failed to load (TestModule/TestFunctionCacheControl/python). Every SDK's codegen already handles enums with both spellings:ImageLayerCompressionhasGzipandGZIP.Host clients generated before the cut: accepted break
The CLI serves a host client its own view: the Go SDK only sends a version on an explicit override. So a client generated at beta.20 and run under a beta.21+ CLI gets the new view, and its calls to
shortSha,parentShas,filterUri,withoutUri,callId,pushUrlandasSdkNamefail validation. I didn't keep the old names as visible@deprecatedduplicates, the wayexperimentalWithGPUwas kept next towithGPU:shortSha/shortSHAare bothshort_shain Python, Rust and Elixir.asSdkName/asSDKNamewould be a duplicate keyword argument in Python (aSyntaxError) and a duplicate method or field in Rust and PHP. Modules past the cut regenerate their bindings from that view, so that would break them, not just old clients. ThewithGPUanddisableDaggerInDaggerprecedents had no collision: the names differed.GitCommit,Artifacts,LLMContentBlock,withRemoteandwithSDKare v1-only APIs, several of them experimental.FunctionCachePolicy, the one name from before v1, keeps its old values.Internal view and old recipes
Internal selectors use the spelling of the view they select in (
core.ViewNamefor the artifact scope selectors), or the canonical one in the internal view"". Engines before the cut recorded workspace checkpoints'withRemote(pushUrl:)and agent tool results'withToolResult(callId:)in view"". So that view keeps acceptingpushUrlandcallIdasInternal()arguments (core.RecordedNamesView), and those recipes still load: a checkpoint keeps its push URL, anddagger agent -rresumes an old conversation. BecausewithToolResultrecords either spelling there,callIDis optional in view"". The docs schema is generated from view"", so it showscallID: String! = "". Client views keepcallID: String!.Deliberate exceptions
dagger workspace git log --jsonkeeps itsshortSha/parentShasoutput keys, so scripts reading them don't break.core/artifact_cloud.go) spellsfilterURIby the cloud engine's version (newengineclient.Client.EngineVersion):filterUribefore the cut,filterURIfrom it on. It comparesAPIViewVersiondirectly, notAPIVersionAtLeast, which clamps a bare v1.0.0 to the pre-cut view.Dang
@cache(policy:)now decodes throughFunctionCachePolicyEnum.Lookupin both Dang runtimes, soFunctionCachePolicy.NEVERworks in modules past the cut.Neverstill works everywhere. Theblockerandagent-hirerfixtures (latest) useNEVER.Not in it / known gaps
sdk/gois regenerated (go-client/generate), and the integration tests follow itsGitCommit.ShortSHA/ParentSHAs. The other clients' stale checks (TypeScript, Python, Rust, Elixir, PHP) will show the new wire names until they're regenerated or moved out.""by earlier engines that select a renamed field (e.g.filterUri) fail to load. Persisted caches are wiped anyway by engine: prerelease-granular API views for v1.0.0 betas #14810's schema bump.LLMContentBlockInputliteral carries bothcallIDandcallId(one empty). A renamed argument's name is in the ID too, so the same call made in a pre-cut view and in a post-cut view has different IDs. The view is part of their identity anyway, because these fields have view filters.Testing
go build ./...andgo veton the touched packages.go test ./core/ ./core/schema/ ./dagql/... ./core/sdk/... ./engine/naming/ ./engine/client/pass. New:TestCoreRenamedNamesViews,TestCoreRenamedNamesInternalView,TestCoreRenamedNamesPreV1,TestFunctionCachePolicySpellingsandTestCoreRenamedArgsDecode.TestLLMCommittedLeafRestorenow also loads a recipe withwithToolResult(callId:)recorded in view"". In./internal/cmd/dagger, only the known sandbox failures fail (TestDaggerCMDagent/session tests,TestShellAutocompleteon the stock engine,TestInitConsoleShowsCommands).golangci-lint/lint-all,docs/references/stale,go-client/generate/stale.TestGit/(TestWithRemote|TestGitCommit|TestPushCapturedDestination|TestPushHTTPAuth|TestGitLog)TestArtifacts/(TestFilterURI|TestAbsoluteURI|TestSelectorRoundTrip|TestFilterURIUnderFailedModule)TestCollections/(TestArtifacts|TestDimensionItems)TestChecks/TestChecksGenerateAsCheckTestLLM/(TestMedia*|TestToolState*|TestChangesetToolAppliesAtCwd|TestRecomposeLivePrivateRoster|TestSpawnExpertiseFailureCanRetry)TestAgentRuntime/(TestSendContent|TestInterruptModuleToolCall|TestRosterAddressingFromModule|TestSendAfterSpawnerReleased|TestRehydrate*)TestWorkspace/(TestGitCLI|…): the--jsonkeys exception.TestModule/(TestModuleEntrypointCallAfterTTL|TestModuleEntrypointCallCachePolicies|TestModuleEntrypointSpanTree|TestFunctionCacheControl):@cacheandwithCachePolicywith the old spellings, in Go, Python and TypeScript modules.TestDang/TestDirectivesandTestDangForcingAPI changes
go -C hack/sdl-diff run . 9e35dbfe9eb6d9a2da53a36f3dbd1f42ba3cdabe:docs/docs-graphql/schema.graphqls 6db5cf62860c39713f6609603fcbdc07f137137b:docs/docs-graphql/schema.graphqlsDetailed diff
extend type Artifacts { """ Apply a DAG address as one filter: the chain of path, type, and dimension-key filters it encodes. The scheme is optional. The path may be a pattern; an empty path selects all artifacts. A module that failed to load keeps its load failure when the module could hold what the address selects, as with every filter (see Artifacts). """ - filterUri( + filterURI( """ A DAG address: [dag[+<type>]://][<path>][?<dimension>=<key>&...] """ uri: String! ): Artifacts! """ - The DAG address that selects this whole selection: filterUri(uri) selects the same set. + The DAG address that selects this whole selection: filterURI(uri) selects the same set. """ uri: String! """ Remove artifacts selected by a DAG address. """ - withoutUri(uri: String!): Artifacts! + withoutURI(uri: String!): Artifacts! } extend enum FunctionCachePolicy { + DEFAULT @enumValue(value: "Default") + NEVER @enumValue(value: "Never") + PER_SESSION @enumValue(value: "PerSession") } extend type GitCommit { """ Parent commit SHAs. """ - parentShas: [String!]! + parentSHAs: [String!]! """ The abbreviated commit SHA. """ - shortSha: String! + shortSHA: String! } extend type GitRepository { """ Register a named remote on this repository, replacing any registered remote of the same name. Registered remotes are recorded in checkouts materialized from this repository (GitRef.tree, Workspace.git.directory), so remote-aware tooling like gh can resolve and fetch from them. The origin remote also routes push when no explicit destination is passed: its push URL, or its URL, becomes the default destination. Routing metadata only, never a credential grant: pushes still authenticate with the caller's own credentials and require approval as usual. """ withRemote( """ The remote's name, e.g. "origin" or "upstream". """ name: String! """ Push destination, when pushes go somewhere other than url. Empty uses url. """ - pushUrl: String = "" + pushURL: String = "" """ The remote's fetch URL. """ url: String! ): GitRepository! } extend type LLM { """ Discover every artifact this conversation can address, as one selection, without evaluating their values. Tool objects bound with withTools contribute their modules' artifacts, rooted at their current values: evaluating one reads the live state of the bound tools, not a fresh construction. If a module's main object is bound, only its tree is included; otherwise each bound object of that module contributes its own tree. Addresses start with the module name. These artifacts have no workspace of their own: they evaluate in the LLM's bound workspace, if any, whoever evaluates them. The workspace part is the artifacts of the workspace bound with withWorkspace, as returned by Workspace.artifacts; an LLM with no bound workspace has none. A workspace module with the same name as a module with bound tool objects is omitted: the bound tools shadow it. Unless they are only a plain construction of the module, which has no state of its own: then the workspace module's artifacts are kept instead. Tool arguments that take an address resolve it here: a DAG address to one object, or, for Artifacts and Artifact arguments, a selection filtered like - filterUri. + filterURI. """ artifacts( """ Only include artifacts matching these path patterns, as with Workspace.artifacts. A path selects that path and its children. """ include: [String!] ): Artifacts! @experimental(reason: "Agent APIs are likely to change.") """ Append the result of a tool call to the message history. """ withToolResult( """ Ordered text and media returned by the tool """ blocks: [LLMContentBlockInput!] = [] """ The ID of the tool call this result responds to """ - callId: String! + callID: String! = "" """ Text returned by the tool, placed before blocks """ content: String! """ Whether the tool call resulted in an error """ errored: Boolean! ): LLM! } extend type LLMContentBlock { """ The unique ID of a tool call (for TOOL_CALL or TOOL_RESULT kinds). """ - callId: String! + callID: String! } extend input LLMContentBlockInput { """ The unique ID of a tool call (for TOOL_CALL or TOOL_RESULT kinds). """ - callId: String = "" + callID: String = "" } extend type Workspace { """ Resolve an address in this workspace. A DAG address (dag://<path>) selects exactly one workspace artifact: - artifacts.filterUri(value).one(). Its typed loaders use that artifact and + artifacts.filterURI(value).one(). Its typed loaders use that artifact and never fall back to external resolution. A value without the dag:// scheme keeps its external meaning, such as a container image reference. The Address retains this workspace across module calls and ID reloads. """ resolve( """ A DAG address, or an external reference. """ value: String! ): Address! """ Return this workspace with an SDK installed in its config. """ withSDK( """ Optional override for the SDK name conventionally derived from the installed module name. """ - asSdkName: String = "" + asSDKName: String = "" """ Write to the workspace config directory at the workspace cwd. """ here: Boolean = false """ Override name for the installed SDK entry. """ name: String = "" """ SDK module reference to install. """ ref: String! ): Workspace! }