Repository navigation
core: name modules by version, GraphQL-style field casing - #14891
Merged
Merged
Conversation
vito
force-pushed
the
naming/module-naming-graphql-casing
branch
from
October 28, 2026 03:08
a2cb7a4 to
2fa7fb2
Compare
vito
force-pushed
the
naming/module-naming-graphql-casing
branch
2 times, most recently
from
October 28, 2026 17:04
98eb629 to
528effa
Compare
vito
force-pushed
the
naming/module-naming-graphql-casing
branch
from
October 29, 2026 01:20
528effa to
28f4847
Compare
vito
marked this pull request as ready for review
October 29, 2026 01:24
vito
force-pushed
the
naming/module-naming-graphql-casing
branch
from
October 29, 2026 02:06
28f4847 to
b8daadb
Compare
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
This was referenced Oct 29, 2026
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/module-naming-graphql-casing
branch
3 times, most recently
from
November 2, 2026 15:55
eb6ac2b to
a22d6e5
Compare
vito
added a commit
that referenced
this pull request
Nov 2, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 2, 2026
Describe Query.naming and ModuleNaming's version, name and originalName in the identifier casing design, and update the changelog fragments of #14891 and #14996 for the consolidated API. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/module-naming-graphql-casing
branch
from
November 4, 2026 16:25
a22d6e5 to
b7bc79b
Compare
vito
added a commit
that referenced
this pull request
Nov 4, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 4, 2026
Describe Query.naming and ModuleNaming's version, name and originalName in the identifier casing design, and update the changelog fragments of #14891 and #14996 for the consolidated API. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/module-naming-graphql-casing
branch
from
November 4, 2026 17:14
b7bc79b to
bdf7fa2
Compare
The cut slipped to v1.0.0-beta.22 with #14810. Also record two decisions: the core-renames change drops the uppercase-acronym field names outright, with no deprecated duplicates, and SDKs generating dependency clients at the consumer's view may mismatch across the cut, which is accepted for the beta (no clientVersion argument). Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
Review found two places where a legacy module (one before the naming cut) whose name has digits or terms lost its strcase spellings, which the cut promises to keep byte for byte. Collection dimension names were spelled by the latest rules while their identifiers follow the module's, so the module prefix no longer trimmed and k8s's selector became k-8-s-k8s-cluster; they now use the module's rules too. A module that fails to load has no known engine version, and its load failure was only matched by its latest spelling (e2e-tests), so selecting it by the legacy spelling its artifacts were listed under (e-2-e-tests) dropped the load error. Failure matching now accepts either spelling, as do module dimension keys, which strcase matched both ways before. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
The implementation plan still described naming every v1 module with hidden aliases, and the engine integration section cited a cmd/codegen mirror of Namer that doesn't exist. Also record the known gap where dagger call and dagger list spell a legacy module's collection selectors differently. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
A module declaring a version past the engine's (bare v1.0.0, or a later prerelease) is now served the engine's view (engine.ModuleAPIViewVersion) instead of being refused. Name it by that view's rules too, so no engine names a module by rules it doesn't have: ModuleSource.NamingView returns the capped view, and NamerForEngineVersion and Module.EngineView go through it. Update the naming design doc, which still said such modules are refused, and test the capped naming in core and in an integration test. Signed-off-by: Alex Suraci <[email protected]>
Review follow-up. The design doc still gated SDK codegen and runtimes on the version a module declares; with views capped at the engine's, the engine names a module by min(declared, engine), so a v1.0.0-beta.21 engine (which serves the identifier API) names a module declaring beta.22 or v1.0.0 by strcase. Say so in the gate, and in identifierVersion's comment. Drop Module.EngineView: Namer only reached it without a source, where it was always the latest view. Signed-off-by: Alex Suraci <[email protected]>
A module client that declares its version (DAGGER_CLIENT_VERSION, or the client metadata header) is served that version's core API, so its typedef constructors (core.IsNamingField) recorded the declared view and named the module's declarations by the SDK's rules instead of the module's: a module declaring a pre-cut engineVersion got HTTPClient from a post-cut runtime. Declared client versions now move only the core API. serveQuery stamps the module's NamingView on those constructors' selections (core.ContextWithNamingView, over a new dagql.ContextWithSelectorViews hook in parseASTSelections), the way the in-engine Dang runtime stamps its selectors, so their calls, IDs and cache keys carry the naming view. A field absent from the naming view keeps the client's. Signed-off-by: Alex Suraci <[email protected]>
When the workspace main fails to load, its shorthand paths must not start with another module's name. Siblings are listed by the latest rules (e2e-tests), but a legacy sibling's artifacts are spelled e-2-e-tests, and a pattern's respellings can be e2-e-tests too, so dag://e-2-e-tests/lint also selected the main's load failure. Compare sibling names with SameCLIName, and collection names against both spellings. Signed-off-by: Alex Suraci <[email protected]>
Main's filtered collection views (3440a16) spelled a module's constructor with gqlFieldName, which the module naming rules replaced: use Module.ConstructorName, so the path follows the module's own naming rules. Signed-off-by: Alex Suraci <[email protected]>
Main's 2268227 namespaces a Dang module's self types through a stand-in ModuleSource that carries only the module's names. ensureModuleSelfTypes now namespaces by the source's Namer, so without the engine version a module before the cut had its stubs named by the new rules: keep it. Signed-off-by: Alex Suraci <[email protected]>
v1.0.0-beta.22 and beta.23 shipped without the identifier casing changes, but with prerelease views (#14810), which are now frozen. So IdentifierCasingVersion gets its own value, v1.0.0-beta.25, instead of following PrereleaseViewsVersion, which stays at v1.0.0-beta.22 with basePrereleaseView at v1.0.0-beta.21. The betas between the two have their own views and are pre-cut: the view and naming tests now cover the release just before the cut alongside the view shared by earlier prereleases. version-gating.md's "If the cut slips" now moves IdentifierCasingVersion alone. Signed-off-by: Alex Suraci <[email protected]>
Beta.25 shipped without the naming changes. Keep its naming rules intact, report the upcoming cut in dev engines, and clarify the shared legacy view in the naming fixture comment. Prerelease views remain frozen. Signed-off-by: Alex Suraci <[email protected]>
Artifact addresses do not promise compatibility across beta releases. Remove implicit legacy pattern alternatives and use current CLI spelling for paths, collection dimensions, includes and load failures. Keep the underlying module GraphQL names and dispatch versioned, and preserve user glob unions. Record empty pattern matches exactly so their URI cannot replay as an unfiltered selection. Cover canonical-to-legacy dispatch, digit-bearing selectors, collections, includes, failures and URI round trips with finite regressions. Signed-off-by: Alex Suraci <[email protected]>
Preserve bracket classes and escapes while formatting CLI pattern literals, so numeric ranges keep their glob meaning without a legacy alternative. Use current spelling for session and overlay module lookup keys too, so canonical GitHub/macOS selectors do not load unrelated modules. Signed-off-by: Alex Suraci <[email protected]>
Match descendants with glob semantics rather than stripping pattern syntax through API-name conversion. This keeps discovery and recorded selector replay in agreement, including numeric classes, without changing literal include behavior. Signed-off-by: Alex Suraci <[email protected]>
Remove the speculative dependency spelling repair during type namespacing and its private helpers. Supported dependency calls and local interface wrappers do not need it; public signatures cannot expose dependency types. Keep exact dependency lookup and the existing naming rules unchanged. Signed-off-by: Alex Suraci <[email protected]>
Keep the mixed-version design note limited to dependency types retaining their own naming rules now that namespacing no longer repairs references. Signed-off-by: Alex Suraci <[email protected]>
A module function named load<X>FromID kept its spelling of ID, by both the legacy and the new naming rules, unlike a field or argument of the same name. Name functions like fields and arguments instead, so one rule covers all three and SDK codegen can't get it wrong. The core load<Type>FromID loaders come from legacyIDHook and coremod's verbatim typedefs, not Namer, so they keep their names; nothing in the repo declares a module function by such a name. Signed-off-by: Alex Suraci <[email protected]>
The load<X>FromID exception removal now belongs to the module naming PR, not the later ModuleSource.naming API layer. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/module-naming-graphql-casing
branch
from
November 5, 2026 16:28
70f3dd6 to
617c221
Compare
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Describe Query.naming and ModuleNaming's version, name and originalName in the identifier casing design, and update the changelog fragments of #14891 and #14996 for the consolidated API. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Describe Query.naming and ModuleNaming's version, name and originalName in the identifier casing design, and update the changelog fragments of #14891 and #14996 for the consolidated API. Signed-off-by: Alex Suraci <[email protected]>
dagger list/check/... decides whether to show presence-only collection columns by matching the user's include path against the listed rows, after converting each segment with cliName. Since ccca804 cliName parses names with the engine/naming dictionary, which drops characters that can't be part of a name, so an include like item* became item, matched nothing, and the collection column was hidden (TestArtifactListMainModulePathKeepsColumns). Move core.Namer.CLIName's glob-preserving walker into engine/naming as MapNamePattern, which converts only the name runs of a pattern and keeps metacharacters, classes and escapes in place. Namer.CLIName and the CLI's include matching now share it. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Describe Query.naming and ModuleNaming's version, name and originalName in the identifier casing design, and update the changelog fragments of #14891 and #14996 for the consolidated API. Signed-off-by: Alex Suraci <[email protected]>
grouville
self-requested a review
November 5, 2026 20:28
grouville
approved these changes
Nov 5, 2026
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Describe Query.naming and ModuleNaming's version, name and originalName in the identifier casing design, and update the changelog fragments of #14891 and #14996 for the consolidated API. Signed-off-by: Alex Suraci <[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.
Part of the identifier-casing epic, #13668. Builds on #14810 (merged, shipped in v1.0.0-beta.22), whose API views are prerelease-granular. The cut,
engine.IdentifierCasingVersion, is now v1.0.0-beta.26, with its own value; v1.0.0-beta.25 is the last pre-cut release.Artifact addresses
Artifact paths, collection dimensions/endpoints, includes and module lookup keys use current CLI spelling, even for legacy modules. There are no implicit cross-beta spelling alternatives; explicit user brace unions and glob syntax remain supported. Filters record selections that replay faithfully, including empty selections. Stored GraphQL names and actual dispatch remain versioned.
Module naming
Modules are named by the naming rules of the engine version they declare:
engine/namingwith that version's dictionary.The module's view is capped at the running engine's view. Declaring a newer beta or bare
v1.0.0cannot select naming rules the engine does not have. Typedef constructors record the naming view in their IDs/cache keys, keeping modules on opposite sides of the cut separate.A runtime client's declared version selects its core API view; it does not change the owning module's declaration names. This is covered by
TestDeclaredModuleClientNamingandTestContextWithSelectorViews.Field casing changes only for modules using the new rules:
JSONValue,HTTPClientasJson,baseUrl,httpClient,fromGitHubIpv6,k8sToolsHTTP_CLIENT,E2E_TEST--base-urlMost field names keep their previous spelling; changes include digits/terms (
e2ETest→e2eTest) and type acronyms (TestHttpclient→TestHTTPClient). Unknown field acronyms use word casing (useHttpxClient). Module GraphQL schemas do not gain aliases for old spellings. Functions follow the same naming rules as fields and arguments:loadFooFromIDbecomesloadFooFromId, including for pre-cut modules. This removes the old module-function exception; coreload<Type>FromIDloaders are unchanged.Scope
Public API
The latest-view SDL is unchanged in this layer. The existing identifier API (
Query.identifier,formatIdentifiers,namingDictionaryand their types) is available fromv1.0.0-0, independently of the module-naming cut. Availability of those fields is not a signal that a module uses the new rules. Generated API bindings are unchanged; the generated Go engineconn version is bumped as noted above.Validation
After removing dependency-reference spelling repair, on the combined source-engine stack:
TestModuleNaming: 26 passed.TestInterface/TestIfaceCallandTestModule/TestUseLocalDependencyFromParentModule: 10 passed.After moving the loader-name cleanup into this layer,
go test ./core -run '^TestLoadFromIDFunctionName$' -count=1 -vpassed; review found nothing to fix. Moving it did not change the final stack's code, tests or schema (only its changelog PR link changed).Earlier targeted checks covered naming/view/cache identity, declared-client naming, identifier API visibility, CLI naming, and artifact selection/URI replay. Artifact regressions include canonical dispatch to legacy fields, glob ranges, includes, intersections, collection endpoints, empty selections, and GitHub/macOS module narrowing. Targeted build and vet passed with the pre-existing
lostcancelwarnings disabled.The full integration suite and all SDK runtimes have not been validated. Earlier full CLI-package runs encountered environment failures; they were not compared against the base branch.
Compatibility limits
Dependency-owned types cannot be exposed directly in a module's public fields or function signatures. This PR does not try to repair respelled dependency references by scanning for similar names. An unsupported interface signature may consequently report an unknown type rather than the more specific external-type error.
API changes
go -C hack/sdl-diff run . a45241b20a5e07fbfc5954479ef0b61da843499c:docs/docs-graphql/schema.graphqls 70f3dd6e9f4c9b8597660ec74ddda3415b941997:docs/docs-graphql/schema.graphqlsNo semantic API changes.