Repository navigation
Conversation
Centralize case conversion in the engine behind a core API: parse names into words using a versioned dictionary of acronyms and terms, falling back to a case heuristic, then format them in any casing and acronym style. Replaces strcase in the engine and the per-SDK converters, which disagree today (e.g. prerequisite_sh_as, JsonValue vs JSONValue). Refs dagger#13668 Signed-off-by: Alex Suraci <[email protected]>
Keep design docs in one place alongside the rest. Signed-off-by: Alex Suraci <[email protected]>
Add engine/naming, the single implementation of identifier case conversion described in hack/designs/identifier-casing.md: parse a name in any casing into WORD/ACRONYM/TERM words using a dictionary of acronyms and terms with a case heuristic as fallback, and format them as PASCAL, CAMEL, SNAKE, SCREAMING_SNAKE, KEBAB or FLAT in UPPERCASE or CAPITALIZED acronym style. The initial dictionary is a fixed value so later engine versions can add terms in a new dictionary without renaming anything for older modules. Tests cover the design's test vectors, its guarantees, and the canonical-name measurements against the core schema. Signed-off-by: Alex Suraci <[email protected]>
Expose engine/naming through Query.identifier, Query.formatIdentifiers and Query.namingDictionary, with the Identifier, IdentifierWord, NamingTerm, IdentifierWordKind, Casing and AcronymStyle types from the identifier casing design. The API is experimental and only visible to v1.0.0+ clients. formatIdentifiers returns plain strings so SDK codegen can format thousands of names in one round trip instead of loading an Identifier per name. Identifiers persist their words rather than re-parsing, so a cached value keeps formatting the same way if the dictionary changes. Signed-off-by: Alex Suraci <[email protected]>
Regenerate the schema snapshot, API reference pages, and the Go, Python, TypeScript, Elixir, PHP and Rust clients for the identifier casing API. Signed-off-by: Alex Suraci <[email protected]>
Update the design to match engine/naming where the spec was ambiguous or contradicted its test vectors: - digit gluing appends to an ordinary word's text rather than a suffix, as the vectors show (base64, v1, s3) - a fourth segmentation tiebreak keeps digits in heuristic words - the guarantees exclude names made only of acronyms in PASCAL/UPPERCASE (htmlURL -> HTMLURL), which parse caseless; E2EAPI -> e2eapi rules out splitting them - the field/argument counts measured on main are 696 of 703 - record the capitalized forms of the initial terms and API notes Signed-off-by: Alex Suraci <[email protected]>
Input with no lowercase letters was caseless and never split, so a Go type like JSONAPI became Jsonapi, and htmlURL in PASCAL (HTMLURL) didn't come back unchanged. Each chunk of all-caps input is now eligible for the same full dictionary cover as a caps piece: JSONAPI is JSON · API, while HTTP_CLIENT and HTTPX_CLIENT stay as they were because CLIENT and HTTPX can't be covered. All-lowercase input still never splits. The asymmetry means a lowercase word spelled like a run of entries changes in SCREAMING_SNAKE. The core schema's only case is sshfsVolume, so SSHFS joins the initial dictionary. The design doc's parsing steps, guarantees, known limitations, test vectors and open question 4 are updated to match. Signed-off-by: Alex Suraci <[email protected]>
testdata/vectors.json gives SDK formatters in other languages the words (kind, text, suffix, capitalized) and every casing for each non-error input in the package's tests, plus names from the core schema. It is generated with `go test ./engine/naming -run TestSharedVectors -update`; TestSharedVectors fails when it is stale, and TestSharedVectorsFormatFromWords checks that the words alone reproduce Format, as an SDK without a dictionary would. Signed-off-by: Alex Suraci <[email protected]>
Schema JSON from v1.0.0 engines carries a top-level "__identifiers" map from each schema name to its parsed words, so offline codegen can format names without the naming dictionary. Response now (un)marshals that key to/from Schema.Identifiers, which Include/Exclude carry along, and (*Schema).Identifier rebuilds a naming.Identifier from the words so Go codegen can reuse naming.Format. Identifiers.AddSchema builds the map for the engine. Generator output is unchanged. A test checks the words against engine/naming/testdata/vectors.json and that rebuilt identifiers format exactly like parsed ones. Signed-off-by: Alex Suraci <[email protected]>
codegen.naming formats the words the engine parses schema names into (PASCAL, CAMEL, SNAKE, SCREAMING_SNAKE, with UPPERCASE or CAPITALIZED acronyms), mirroring engine/naming. Tests run it against the engine's shared vectors. Signed-off-by: Alex Suraci <[email protected]>
When the schema JSON carries __identifiers (engine views v1.0.0-0 and later), method, argument and input field names are the engine's words in SNAKE, then escaped for keywords and builtins as before. That fixes names like prerequisite_sh_as (now prerequisite_shas) where the old converter guessed at acronyms. Without __identifiers, or for a name it doesn't cover, the old converter still runs, so older schemas generate the same code. A method whose name changed keeps its old one as a deprecated alias. Class and enum member names stay the schema's own: the runtime selects types by class name and sends enum members by name, and the engine's names are already PASCAL and SCREAMING_SNAKE (except for legacy enum values, which have SCREAMING_SNAKE aliases). Signed-off-by: Alex Suraci <[email protected]>
Live introspection (introspection.Introspect, and `codegen introspect`, which writes the JSON the Python, PHP and Rust client builds read) uses the GraphQL introspection query, which can't carry "__identifiers". When the engine's schema has Query.identifier (v1.0.0 views), FetchIdentifiers now asks it for the words of every name, in batches of aliased queries, so the result matches the engine's schema JSON and uses its version-selected dictionary. Older engines leave Identifiers nil. Signed-off-by: Alex Suraci <[email protected]>
Schema JSON handed to SDK codegen now carries a top-level "__identifiers" map from every type, field, argument, input field and enum value name to its parsed words (kind, text, suffix, capitalized), so codegen that runs offline from the JSON can format names in any casing without the dictionary. It is emitted for views at v1.0.0-0 or later, the identifier API's gate, with the dictionary namingDictionaryFor selects; older views leave it out and SDKs keep their own converters. This covers __schemaJSONFile (and so module and client introspection JSON), Schema.merge, which parses the names a merge adds, and cmd/introspect. __schemaJSONFile results are already cached per view, so the gate keeps them distinct; a test interleaves both views on one cache. Signed-off-by: Alex Suraci <[email protected]>
Add a "Schema JSON words" subsection under SDK Integration with the __identifiers contract, how SDKs format the words, the v1.0.0 gate and the fallback, and mark Open Question 3 (offline codegen) resolved. Signed-off-by: Alex Suraci <[email protected]>
The Python codegen tests check its identifier formatter against the engine's shared test vectors, engine/naming/testdata/vectors.json. Mount that one file in the dev container and point DAGGER_NAMING_VECTORS at it, since pytest runs the SDK from a copy without the rest of the repository. Signed-off-by: Alex Suraci <[email protected]>
Two methods change name, keeping the old ones as deprecated aliases: - Container.experimental_with_all_gp_us -> experimental_with_all_gpus - GitBundle.prerequisite_sh_as -> prerequisite_shas Signed-off-by: Alex Suraci <[email protected]>
When the schema JSON carries identifier words (engine views v1.0.0-0 and later), Go client codegen formats names from them instead of guessing acronyms with golint's initialism list, which lacks SHA, VCS, SSHFS and GPU: - types and methods: PASCAL/UPPERCASE (ParentShas -> ParentSHAs) - parameters: CAMEL/UPPERCASE, then keyword escaping (pushUrl -> pushURL) - enum value constants: PASCAL/CAPITALIZED, the closest casing to the strcase.ToCamel they had, so TCP stays Tcp; only boundaries strcase got wrong change (OCIMediaTypes: OcimediaTypes -> OciMediaTypes) Names without words keep the legacy conversion, so older schemas generate byte-identical code. Wire strings (selections, argument names, enum values, GraphQL type names) and the private field caches are unchanged. Renamed methods keep their old name as a deprecated wrapper, and renamed option structs and enum constants as deprecated aliases, so regenerating a client against a v1 engine doesn't break callers. Signed-off-by: Alex Suraci <[email protected]>
cmd/codegen/introspection now imports engine/naming, so generating the Go SDK client failed to build codegen without it. Signed-off-by: Alex Suraci <[email protected]>
Move tests off the deprecated wrappers (Sha, ShortSha, ParentShas, SshfsVolume, ImageLayerCompressionEstarGz, ImageMediaTypesOcimediaTypes), which staticcheck flags. Signed-off-by: Alex Suraci <[email protected]>
When the schema carries the engine's identifier words, TypeScript client codegen formats names from them instead of guessing with toPascalCase: - methods, args and opts keys: CAMEL / UPPERCASE - Opts types and enum converter prefixes: PASCAL / UPPERCASE - enum members: PASCAL / CAPITALIZED, the closest match to what the generator has always written (Tcp, ObjectKind) Only TypeScript identifiers change. Field names in select, arg keys, input object fields and enum values stay as the schema has them: required args are keyed by their schema name, and renamed opts keys are mapped back to it before the call. Type names are left alone, since the runtime looks generated classes up by GraphQL type name; in views with words they are canonical already, which a test checks. Renamed methods, Opts types and opts keys keep their old names as deprecated aliases. Without words, every name falls back to the legacy converters, so older schemas generate byte-identical code. Signed-off-by: Alex Suraci <[email protected]>
Modules at engine version v1.0.0 and up get their type, field, function, argument and enum member names normalized by engine/naming instead of strcase; older modules keep the strcase rules byte for byte. This is the fix for module types that reference core types starting with an acronym (LLMMessage, JSONValue), which strcase respelled (Llmmessage) so they resolved to a namespaced copy, and for mangled module names (MyModHttpclient becomes MyModHTTPClient). The rules are a core.Namer, selected by engine version: - Typedef constructors take it from the view of their call. They now record the caller's view (View(AllVersion)), so a module's runtime, which calls at the view of its engineVersion, gets its own rules, and the cache keeps the results apart. Public constructors pass the view on to the internal ones they delegate to. The in-engine Dang runtime stamps its module's view on those selectors itself. - Module assembly (namespacing, which now compares word lists, lookups, the constructor field name) uses Module.Namer, from the module source's engineVersion. - CLI paths of checks, generators and artifacts are spelled by the rules of the module that defines them; patterns, addresses and pre-load module matching accept the spellings of both rules. References to a dependency's types that only miss because the two modules name by different rules fall back to the dependency type with the same normalized name. Engine calls into SDK modules spell the interface arguments (introspectionJson) by the SDK module's rules. The strcase acronym workarounds in llm.go and json.go and the withFinalTypeName re-application stay, documented, for as long as the legacy rules exist. Signed-off-by: Alex Suraci <[email protected]>
The CLI derives command, flag and type names from schema names. It now spells them by the naming rules of the engine version it ships with (e2eTest is --e2e-test, not --e-2-e-test): the typedefs it loads don't say which engine version each module declares, so a per-module choice isn't available, and a client follows the version it connects with. What users type still resolves by the legacy rules too: legacy flag spellings are normalized to the current ones, legacy command spellings are aliases, and module constructors and type names match either spelling. Signed-off-by: Alex Suraci <[email protected]>
Renamed in the core client, each keeping its old name as a deprecated alias: - methods: Artifacts.filterUri -> filterURI, Artifacts.withoutUri -> withoutURI, GitCommit.parentShas -> parentSHAs, GitCommit.shortSha -> shortSHA, LLMContentBlock.callId -> callID - Opts types: ArtifactUriOpts -> ArtifactURIOpts, ClientHttpOpts -> ClientHTTPOpts, ClientSshfsVolumeOpts -> ClientSSHFSVolumeOpts, WorkspaceWithSdkOpts -> WorkspaceWithSDKOpts, WorkspaceWithoutSdkOpts -> WorkspaceWithoutSDKOpts - opts keys: GitRepositoryWithRemoteOpts.pushUrl -> pushURL, WorkspaceWithSDKOpts.asSdkName -> asSDKName The LLM.withToolResult parameter callId becomes callID. Types, enum members and everything sent over the wire are unchanged. Signed-off-by: Alex Suraci <[email protected]>
Elixir derived a function's deprecated alias from its schema name, which would now give parentSHAs a parent_sh_as alias that never existed: its old name, parentShas, gave parent_shas, as the new one does. Codegen now derives the alias from the old schema name of a renamed core field, from a small table of them. None of the renamed names changes an Elixir name, so no alias is needed. Regenerated: shortSha -> shortSHA, parentShas -> parentSHAs, filterUri -> filterURI, withoutUri -> withoutURI, callId -> callID, pushUrl -> pushURL, asSdkName -> asSDKName on the wire, and FunctionCachePolicy's values :DEFAULT, :PER_SESSION and :NEVER (functions unchanged). Signed-off-by: Alex Suraci <[email protected]>
PHP kept FunctionCachePolicy's legacy values as deprecated constants next to their SCREAMING_SNAKE cases. With the values renamed, codegen finds the old names in a small table of renamed core names and keeps Default, PerSession and Never as deprecated constants of the new cases. LLMContentBlockInput's callID field keeps its old property, callId, so named arguments still work: input objects now map a property named otherwise to its schema name (FIELD_NAMES) when they're sent. Regenerated: shortSha -> shortSHA, parentShas -> parentSHAs, filterUri -> filterURI, withoutUri -> withoutURI, callId -> callID, pushUrl -> pushURL, asSdkName -> asSDKName on the wire, and FunctionCachePolicy's values DEFAULT, PER_SESSION and NEVER. Method and parameter names don't change. Signed-off-by: Alex Suraci <[email protected]>
Java derived deprecated aliases from schema names: with the renamed core names, that would add aliases that never existed (shortSHA(), withPushURL(), getCallID()) and drop FunctionCachePolicy's Default, PerSession and Never constants. Codegen now takes the old schema names of renamed core names from a small table: methods, setters and accessors keep the names they had (shortSha(), withPushUrl(), getCallId()), and the old values stay as deprecated constants. Renamed on the wire: shortSha -> shortSHA, parentShas -> parentSHAs, filterUri -> filterURI, withoutUri -> withoutURI, callId -> callID, pushUrl -> pushURL, asSdkName -> asSDKName, and FunctionCachePolicy's values DEFAULT, PER_SESSION and NEVER. Signed-off-by: Alex Suraci <[email protected]>
The source generator named obsolete forwarders, input properties and enum aliases after schema names: with the renamed core names, it would add ones that never existed (ShortSHAAsync, CallID, a DEFAULT member). It now takes the old schema names of renamed core names from a small table, so the generated names stay as they were (ShortShaAsync, CallId, FunctionCachePolicy.Default), with no alias needed. Regenerated the core schema fixtures. Renamed on the wire: shortSha -> shortSHA, parentShas -> parentSHAs, filterUri -> filterURI, withoutUri -> withoutURI, callId -> callID, pushUrl -> pushURL, asSdkName -> asSDKName, and FunctionCachePolicy's values DEFAULT, PER_SESSION and NEVER. Signed-off-by: Alex Suraci <[email protected]>
Queries use the new names: filterUri -> filterURI, withoutUri -> withoutURI, callId -> callID, pushUrl -> pushURL. Signed-off-by: Alex Suraci <[email protected]>
Go derived the deprecated aliases of core fields and arguments from their schema names, which no longer have the old spelling. Codegen now takes the old schema names of renamed core names from introspection's table, so GitCommit keeps its deprecated ParentShas and ShortSha wrappers. Regenerated: shortSha -> shortSHA, parentShas -> parentSHAs, filterUri -> filterURI, withoutUri -> withoutURI, callId -> callID, pushUrl -> pushURL, asSdkName -> asSDKName on the wire, and FunctionCachePolicy's values DEFAULT, PER_SESSION and NEVER (constants unchanged). Signed-off-by: Alex Suraci <[email protected]>
The 7 non-canonical core field and argument names, and FunctionCachePolicy's values, are renamed on the views with the new rules, their old spellings kept as hidden aliases: shortSha -> shortSHA, parentShas -> parentSHAs, filterUri -> filterURI, withoutUri -> withoutURI, callId -> callID, pushUrl -> pushURL, asSdkName -> asSDKName, Default/PerSession/Never -> DEFAULT/PER_SESSION/NEVER. Describe that, the aliases it took (input object fields, struct-tag fields, renamed enum values), what the SDKs keep, and close the open question. Signed-off-by: Alex Suraci <[email protected]>
Arguments and input object fields get their alias copies the same way: one generic helper builds both, as dupl asked. Signed-off-by: Alex Suraci <[email protected]>
gqlparser.LoadQuery is deprecated (staticcheck SA1019): the renamed names test validates queries with LoadQueryWithRules and the default rules instead. Signed-off-by: Alex Suraci <[email protected]>
Contributor
Author
|
🤖 Hand-off: splitting #14501 into stacked PRs The final state is Rebuild from the final tree, not the historyThe 153 commits include three designs that later commits undo:
Cherry-picking would replay all of that. It's easier to build each PR branch from main with Ordering constraints
Suggested stackPR 1:
|
This was referenced Oct 13, 2026
vito
added a commit
that referenced
this pull request
Oct 14, 2026
Add engine/naming, the single implementation of identifier case conversion described in hack/designs/identifier-casing.md: parse a name in any casing into WORD/ACRONYM/TERM words using a versioned dictionary of acronyms and terms with a case heuristic as fallback, and format them as PASCAL, CAMEL, SNAKE, SCREAMING_SNAKE, KEBAB or FLAT in UPPERCASE or CAPITALIZED acronym style. Nothing uses it yet. The design doc describes the end state of the whole stack split out of #14501. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
This was referenced Oct 14, 2026
Contributor
Author
|
Closing in favor of the split PRs above. |
This was referenced Oct 22, 2026
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.
What and why
Every layer that converts identifier casing makes its own guess about acronyms, and the guesses disagree:
strcase, which lowercases runs of capitals unless the whole name is a registered acronym:LLMContentBlock→LlmcontentBlock,MyMod+HTTPClient→MyModHttpclient. A module type that references a core type starting with an acronym (LLMMessage,JSONValue) gets a namespaced copy instead.core/llm.gopapers over this with onestrcase.ConfigureAcronymper affected core type, andwithFinalTypeNameexists only because re-normalizing a final name corrupts it.prerequisite_sh_as; Go generatesParentShasandVcsGeneratedPaths; .NET generatesWithMcpserver. The same core type isJSONValuein Go/TypeScript/Python/Elixir andJsonValuein Rust/PHP.This PR replaces all of them with one implementation,
engine/naming, and moves the engine (for modules that opt in throughengineVersion), the CLI, and every SDK's codegen onto it. A name is parsed once into words (ordinary words, acronyms likeHTTP, and terms with a fixed spelling likeGitHub,IPv6) using a versioned dictionary of acronyms and terms, falling back to a case heuristic. The words can then be formatted in any casing (PASCAL,CAMEL,SNAKE,SCREAMING_SNAKE,KEBAB,FLAT), in either acronym style (HTTPClient/HttpClient).Design:
hack/designs/identifier-casing.md(parsing algorithm, guarantees, test vectors, engine and SDK integration, compatibility).What's in this PR
engine/naming: parser, formatter, and the dictionary, selected by engine version (naming.DictionaryFor) so a later addition never renames anything for a module on an older version. Tests cover every row of the design's test-vector table, the three guarantees (round trip, idempotence, canonical names come back unchanged), and every core name indocs/docs-graphql/schema.graphqls: all type, field and argument names are canonical (the 7 that weren't are renamed, item 7).@experimental, visible fromv1.0.0-0):Query.identifier,Query.formatIdentifiers(names, casing, acronyms, version)(plain strings, so codegen formats thousands of names in one round trip;versionselects the dictionary of the schema being generated, defaulting to the caller's),Query.namingDictionary, plusIdentifier,IdentifierWord,NamingTerm,IdentifierWordKind,Casing,AcronymStyle.formatIdentifiersis uncached, and dagql now renders lists of leaf values without a result per element, which took a ~1000-name call from ~780 ms to ~11 ms.formatIdentifiersonce per casing it uses: Go and TypeScript (cmd/codegen), PHP and Java live; Python, Rust, Elixir and .NET read a names file written by the online step (codegen introspect --names-out ... --names CASING:ACRONYMS,...). Module runtimes (Python, PHP, Elixir, Java) write the same names file for module codegen. Gate: a schema withoutQuery.formatIdentifiers(views beforev1.0.0-0) keeps each SDK's old converter, so older schemas generate byte-identical code.engineVersionv1.0.0-0and up, prereleases included;core.IdentifierNamingVersion): acore.Namertaken from the caller's view (typedef constructors) or the module source (module assembly), with the legacy strcase path kept byte for byte for modules belowv1.0.0. Manifest v2 entrypoint modules declare noengineVersionand are served at the engine's own version, so they get the new naming too. This is the real fix for Clean up longstanding API warts and pending breaking changes #13668's core-type acronym bug:LLMMessageandJSONValuereferences resolve to the core types, andMyModHttpclientbecomesMyModHTTPClient. Also:engine/naming(E2ETestis--e2e-test, not--e-2-e-test); old spellings of commands, flags and shell function names stay accepted.cmd/codegencan't importcore, somodule_naming.gomirrorscore.Namer, gated onQuery.formatIdentifierslike SDK codegen.dagql.Aliases): types, fields (struct-tag fields included), arguments, input object fields and enum values can declare old spellings, optionally limited to some views. Queries are validated againstSchemaWithAliasesForView, butSchema, introspection and codegen never see the aliases, which would collide in SDK generators (shortSha/shortSHA→short_sha). Field, argument and type aliases are rewritten to the canonical name at parse time; enum value and input field aliases are resolved by their decoders. Either way the calls, IDs and cache keys are the canonical ones.EnumValues.RenameViewrenames an enum value per view. Each use adds adagger.io/dag.aliasspan event. The in-engine Dang runtime gets a schema JSON with the field, argument, input field and enum value aliases, so Dang callers using old spellings typecheck. Every alias goes throughcore.NameAliases(core renames, v1 views only) orcore.ModuleNameAliases(module renames, every view), so ending the transition is deleting them.ARM_64forARM64; input only, kept onEnumMemberTypeDef.LegacyName). They're accepted on every view, since a module's names follow its own version, not its caller's. Also:_/-) and send the canonical name.cmd/codegenkeeps a dependency's old Go identifiers as deprecated aliases (DaggerCli,DaggerCliOpts,VcsCommitnext toVCSCommit, enum constants, also re-exported frominternal/dagger), recovered by applying the legacy namer to the new schema names. Core output is unchanged.GitCommit.shortSHAandparentSHAs,Artifacts.filterURIandwithoutURI,LLMContentBlock.callID,LLMContentBlockInput.callID,LLM.withToolResult(callID:),GitRepository.withRemote(pushURL:),Workspace.withSDK(asSDKName:), andFunctionCachePolicy'sDEFAULT/PER_SESSION/NEVER. The old spellings stay as hidden aliases there; older views are unchanged, and bothFunctionCachePolicyspellings decode to the same value (same IDs and cache keys). Each SDK generator keeps a small table of these renames, so it keeps the deprecated identifiers it had instead of deriving new ones. The CLI'sworkspace git log --jsonkeys stayshortSha/parentShas, and the cloud artifact query keepsfilterUrifor older cloud engines.engineVersionv1.0.0. Python and TypeScript resolve names for calls through a module's own interfaces withformatIdentifiers(including Python enum members) instead of predicting them.migrate-settings-hints-tracking.md,single-query-workspace-module-loading.md,workspace-location-model.md) intohack/designs/.SDK casing: "when in Rome"
Each SDK follows its language's own acronym convention rather than one house style:
PASCAL/UPPERCASEPASCAL/UPPERCASE(ParentSHAs)CAMEL/UPPERCASE(pushURL)PASCAL/UPPERCASE(NetworkProtocolTCP)CAMEL/UPPERCASE(filterURI)CAMEL/UPPERCASEPASCAL/CAPITALIZED(Tcp, as before)SNAKE(prerequisite_shas)SNAKESCREAMING_SNAKE(PER_SESSION, value: schema value)PASCAL/CAPITALIZED(JsonValue, as before)SNAKESNAKEPASCAL/CAPITALIZEDPASCAL/UPPERCASESNAKESNAKEPASCAL/CAPITALIZED(Llm,JsonValue)CAMEL/CAPITALIZED(withGpu,filterUri)CAMEL/CAPITALIZEDSCREAMING_SNAKEPASCAL/CAPITALIZED(Llm,Json,Id)CAMEL/CAPITALIZED(asJson,withGpu)CAMEL/CAPITALIZEDSCREAMING_SNAKE(PER_SESSION)PASCAL/CAPITALIZED(Llm,JsonValue)PASCAL/CAPITALIZED(WithMcpServer)CAMEL/CAPITALIZED(insecureSkipTlsVerify)PASCAL/CAPITALIZED(Tcp)Type names stay as the schema has them where the runtime looks types up by name (TypeScript, Python). PHP, Java and .NET classes renamed from their GraphQL type carry the wire name (
#[GraphQLType('LLM')],@GraphQLType("LLM"), literals in .NET), and enums whose members are renamed carry their schema values (PythonValueEnum, JavaGraphQLEnum, .NET[GraphQLValue]withGraphQLEnumConverter<T>).Compatibility
The gate. Module naming and SDK codegen key on the same API view,
v1.0.0(core.IdentifierNamingVersionisv1.0.0-0, so every prerelease counts):engineVersionselects a v1 view is named byengine/naming, including modules already published againstv1.0.0betas and manifest v2 entrypoint modules (served at the engine's own version):MyModHTTPClient,LLMMessage, Pythoncom_url→comURL, enumARM_64→ARM64, CLI--e2e-test. Modules belowv1.0.0keep strcase naming byte for byte.Query.formatIdentifiers, and every SDK generator (and Go module codegen) falls back to its old converter: older schemas regenerate byte-identical clients.Query.formatIdentifiersin their session schema (served at the module's version).Transition aliases. Old bindings and queries keep working without regenerating: the old spellings of renamed module names (types, constructors, functions, fields, arguments, enum values; every view) and renamed core names (item 7; v1 views) are hidden aliases that make the same calls as the new names. Python dependency module enums keep their member values (
ACTIVEstill holds"ACTIVE value"); only core enums useValueEnum.Deprecated aliases. Renamed SDK names keep their old spelling, deprecated, wherever the language allows:
ParentShas,Sha,ShortSha,Sdks,SshfsVolume,VcsGeneratedPaths,VcsIgnoredPaths(wrappers and opts aliases); enum constantsNetworkProtocolTcp/Udp,RegistryProtocolHttp/Https,ImageMediaTypesOcimediaTypes/Oci,ImageLayerCompressionEstarGz. For dependency modules, the old Go identifiers of renamed names (DaggerCli,VcsCommit, ...), in in-repo codegen only.filterUri,withoutUri,parentShas,shortSha,callId; Opts typesArtifactUriOpts,ClientHttpOpts,ClientSshfsVolumeOpts,WorkspaceWithSdkOpts,WorkspaceWithoutSdkOpts; opts keyspushUrl,asSdkName;LLMContentBlockInput'scallIdkey (the engine takes it ascallID).prerequisite_sh_as,experimental_with_all_gp_us. Elixir:prerequisite_sh_as. Python enum members keep their old names as aliases (FunctionCachePolicy.PerSession).Dagger\Service\LegacyClassNames); legacy enum cases stay as deprecated constants (FunctionCachePolicy::PerSession);LLMContentBlockInputkeeps itscallIdproperty, sent ascallID.FunctionCachePolicy.PerSession).WithVcsgeneratedPaths,WithVcsignoredPaths,WithMcpserveras[Obsolete]forwarders; renamed enum members as[Obsolete]aliases.Hard breaks (no alias possible):
insecureSkipTLSVerify→insecureSkipTlsVerifyonContainer.from/publish(.NETFrom/PublishAsync), andexpectedRemoteSHA→expectedRemoteShaonGitRef.push.ID→Id,JSON→Json,JSONValue→JsonValue, the 11LLM*,SdkConfig,HttpState,WorkspaceSdk) can't sit next to a case-only alias on case-insensitive file systems; .NET's 16 can't be aliased across assemblies..name(and listing members) now givesPER_SESSION, notPerSession.__typenamealways returns the new name: the server can't know which spelling a client expects. Old Go bindings'Concrete()fails with "unknown … implementation" for a renamed implementation until they're regenerated.PythonSDK,PhpSDK, ..., which extension SDKs built on them see;dagger-module.tomlGo modules regenerated by the external go-sdk getDaggerCLIwhere callers sayDaggerCli, until the go-sdk port.Migration Plan
Kept up to date as work lands. Each external repo has an
identifier-casingbranch reserved for its port.The SDKs are moving out of this repository (
github.com/dagger/{go,python,typescript,php,java,dang}-sdk, seecore/sdk/sdkmeta/sdks.json). This PR completes the change against the in-repo code, which is the reference those repositories port from. Old spellings of renamed module and core names stay accepted by the engine as hidden transition aliases (design: "Transition aliases"), so unported SDKs and already-generated bindings keep working while each repo ports at its own pace.Phase 1: dagger/dagger (this PR)
engine/naming,Query.formatIdentifiers, engine module naming, CLI naming+legacy-namingviewscallId,pushUrl,shortSha,parentShas,filterUri,withoutUri,asSdkName,FunctionCachePolicyvalues) with the old spellings as aliasesPhase 2: engine release. Needed before any external port: the ports call
Query.formatIdentifiers, which only exists in an engine that has this PR.Phase 3: external SDK repos (after Phase 2, in any order; each regenerates against the released engine and bumps its pinned engine version):
identifier-casing): portcmd/codegen/generator/gonaming (formatted names, legacy wrappers, enum aliases,CoreConstructorNamewith legacy names) into its forkcmd/dagger-go-sdk-codegen, andmodule_naming.gofor module codegen. That includes the deprecated Go wrappers for renamed dependency names. Without them, regenerating adagger-module.tomlGo module against the new engine renamesdag.DaggerCli→dag.DaggerCLI. In this repo,engine-dev,docs-devand the release module would need caller updates (DaggerCli,CliDev*) when their bindings are regenerated, and they can only be regenerated once CI's engine has this PR. Also update its own call sites of renamed names (e.g.legacyJson→legacyJSON).identifier-casing): update call sites of renamed names (legacyJson→legacyJSON, ...) and regenerate.identifier-casing): re-vendorsdk/typescript(library and runtime naming,introspection_json.tsnote) and portcmd/codegen/generator/typescriptnaming intohelpers/codegen.identifier-casing): portsdk/python/codegen(names file, enum members, aliases) into itssdk/codegen, andValueEnumplus the interface-call naming into its library.identifier-casing): port the PHP generator,#[GraphQLType]handling and theLegacyClassNamesautoloader.identifier-casing): port the codegen plugin (three name formats,@GraphQLType,GraphQLEnum) and the annotation processor changes.identifier-casing): regenerate entrypoints; check Dang code that uses old spellings (accepted via aliases, except old type names in annotations).identifier-casing, extraction in progress): portsdk/elixircodegen if extraction lands first.Phase 4: dagger/dagger follow-up. Bump the SDK pins in
core/sdk/sdkmeta/sdks.jsonto the ported releases.Phase 5: end of the transition (after 1.0). Delete
core.NameAliases,core.ModuleNameAliasesand their callers, plus the deprecated SDK-side aliases.How to review
It's large, but grouped by layer, and each SDK is self-contained (formatter or engine names → codegen → regenerate). Regenerated files (
sdk/*/generated,client.gen.ts,sdk/go/core/core.gen.go, the API reference) can be skimmed using the commit messages, which list every rename. The history keeps two earlier designs that later commits replace: identifier words in the schema JSON (replaced by engine-formatted names), and a full-version gate with+legacy-namingviews and legacy-named entrypoint modules (replaced by the v1-view gate and transition aliases, 1281ecc). Reviewing the final diff per file is easier than replaying it.hack/designs/identifier-casing.md(e4ec0ee, then updated throughout); 98be708 is a pure move.engine/naming: 826c699, a403a4f, fcb6c75, 0c929ed.core/gqlformat.go,core/module.go,core/typedef.go), 5873008, 140e585, ae418f7, d083dc7, e50874a; the v1-view gate 1281ecc (undoing 92aeeb7's full-version gate); tests 9a6d2e2, cf245e1, ab2a3ce (updated by 3578f5c); c56bdbb restores a builder name main still calls.core.IsNamingField) and c863d00 (design: pinning an entrypoint's naming) stand.sdk/go/coresplit), 2368b27, 4297ea9__formatIdentifiers.Testing
engine/naming(vectors, guarantees, core schema names),core/core/schema/core/sdk/.../dagqltests,cmd/codegen, the runtime modules' Go tests, Python unit tests and lint, PHPStan and CodeSniffer,java-clientcodegen tests and lint, the .NET source generator tests, and the staleness checks of every regenerated client.dagql/aliases_test.go,enum_aliases_test.go,input_aliases_test.go;TestNameAliasesView,TestModuleNameAliases,TestModuleEnumLegacyMemberAliases,TestSchemaJSONAliases,TestCoreRenamedNames(andPreV1); Go codegen'slegacy_names_test.go.TestIdentifier,ModuleNamingSuite(module naming by version, v1 prereleases, legacy enum member literals, CLI flags), andTestModuleEntrypointLegacyNameAliases.TestModuleEntrypointLegacyNameAliases(fixed in 92ff23d) andgo-sdk/generate/stale(likely the missing self binding fixed in 3eb1561; unconfirmed).php-client/test,java-client/test,dotnet-client/test). The Java and .NET enum converters and the PHP legacy-class autoloader run against an engine there for the first time. The in-repo modules' committeddagger.gen.gofiles weren't regenerated for the core renames (their old names work through the aliases), so their staleness checks are expected to flag them.Follow-ups and open questions
namingVersion-style key, Load modules through manifest v2 entrypoints #14038) only matters before the first dictionary addition; see the design's "Module entrypoints".XMLHttpRequest,innerHTML): members follow the schema'sUPPERCASE, enum members keep the generator'sTcpstyle. Worth a call with the TypeScript maintainers.Namerpath, theConfigureAcronymcalls incore/llm.go/core/json.go, andwithFinalTypeNamestay while modules below the gate exist.@cache(policy:)introspection still shows the internalPerSessionvalues; alias names can show up in validation's "Did you mean …" suggestions.ContainerId.php,LLMId.php, ...) are left insdk/php/generated/.Refs #13668
API changes
go -C hack/sdl-diff run . ce10b54a63bfdea982af4b64c52d48fb70490cba:docs/docs-graphql/schema.graphqls 87f041b18f3b5efe69108032ec7a47d6ab2e18b5:docs/docs-graphql/schema.graphqlsDetailed diff