Skip to content

refactor: the intermediate representation's exported names say what they hold - #165

Merged
ShocOne merged 1 commit into
mainfrom
refactor/the-intermediate-representation-api-names-what-it-holds
Aug 30, 2026
Merged

ShocOne merged 1 commit into
mainfrom
refactor/the-intermediate-representation-api-names-what-it-holds

Conversation

@ShocOne

@ShocOne ShocOne commented Aug 30, 2026 •

Copy link
Copy Markdown
Member

What

The owner-ruled renames of the intermediate representation's exported API, applied across every consumer (emit, sdkbind, fixtures, providergen, cli, templates), plus the two contract changes they imply.

Was Now
Attribute.Kind Attribute.Type
Attribute.Nested Attribute.NestedAttributes
Resource/Datasource/ListResource.Schema, ListResource.AddressingSchema, Action.RequestSchema .Attributes, .AddressingAttributes, .RequestAttributes
Parameter URLPathParameter
Authority + Authority* consts + Attribute.Authority SchemaAttributeTypeDetermination (+ SchemaAttributeTypeDetermination<Route>)
Resource.EventualConsistency Resource.ReadAfterWriteDelay
ConfigVariant ValidConfigurationVariant
ConditionalRequirement.Equals, ConditionalValidity.Equals WhenPropertyEquals
ConditionalValidity.Valid, ValidConfigurationVariant.Valid AttributesValidWhenEqual
Attribute.Filter Attribute.IsDatasourceFilterArgument
Attribute.SilentlyIgnoredOnUpdate Attribute.IgnoredOnUpdate
UnsupportedEntity.Kind, emit.Unsupported.Kind TerraformBlockType
OperationInvoke OperationAction
refuse(), refuseReservedRootNames(), refusedAttributes(), emissionRefusals exclude(), excludeReservedRootNames(), excludedAttributes(), emissionExclusions
sdkbind.FieldBinding.Kind .Type

"excluded" is the word for the toolkit setting an entity or attribute aside, in identifiers and in docs prose (CLAUDE.md, contract, glossary, emittance tracker, mapping, comment-style, rehearsal, releasing). Two senses deliberately keep their own words: an API answering a request with a 4xx stays the audit's refusal (refusal_grammar, uncorrectableRefusal, refusedOptionalField), and Terraform's own behaviour ("terraform refuses to load a provider") stays as Terraform describes it. Where a verb declines bad input (exit code 1, config validate, a store rejecting a malformed document) the docs now say what happens ("stopped on an exclusion", "not accepted") and the corresponding test names (…RefusesTrailingArguments) are left alone — renaming eighty of those to "Excludes" would have made them wrong. Say if you want that scope widened.

Contract changes (semver; migration note)

  • unsupported.json format version 2 → 3: format_version → formatVersion; kind → terraformBlockType; cause shapelessObject → objectWithoutPropertiesOrAdditionalProperties. A provider repo's committed unsupported.json regenerates on its next run; nothing reads the old spelling.
  • Toolkit JSON tags are camelCase, matching the OpenAPI document's own keys: every tag in the intermediate representation (ephemeral, never committed) and in sdkbind migrates; Names tags pascal/camel become pascalCase/camelCase (R6: the wire spelling is the Go spelling).
  • Emitted resource code: the constant eventualConsistency is now readAfterWriteDelay (template fields HasReadAfterWriteDelay / ReadAfterWriteDelay). A generated tree changes by that one identifier.

Docs

  • docs/glossary.md: entries for NestedAttributes, Attributes, Type, URLPathParameter, SchemaAttributeTypeDetermination, ReadAfterWriteDelay, TerraformBlockType, exclude, IsDatasourceFilterArgument, ValidConfigurationVariant, WhenPropertyEquals/AttributesValidWhenEqual; retires authority, refuse (code verb), shapelessObject.
  • docs/naming-standard.md: R6's JSON row reads camelCase "matching the OpenAPI document's own keys"; R4 exception 1 names the acronym table as the record rather than repeating a drifted list.
  • docs/config.md regenerated (one description reworded).

Verification

make check green: 90.2% total, every package above 80%, hygiene gate clean. TestUnit_Run_Curated* builds both dialects' trees and runs their tests with the renamed constant.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XPLePCqzyYncF7TedagFkg

Base automatically changed from refactor/the-intermediate-representation-names-what-it-holds to main August 30, 2026 09:00
…hey hold

Every exported identifier of the intermediate representation that the
owner ruled on is renamed, and every consumer follows:

  Attribute.Kind -> Type; Attribute.Nested -> NestedAttributes;
  Resource/Datasource/ListResource.Schema -> Attributes,
  ListResource.AddressingSchema -> AddressingAttributes,
  Action.RequestSchema -> RequestAttributes; Parameter -> URLPathParameter;
  Authority -> SchemaAttributeTypeDetermination (and its four routes);
  Resource.EventualConsistency -> ReadAfterWriteDelay; ConfigVariant ->
  ValidConfigurationVariant; Equals -> WhenPropertyEquals; Valid ->
  AttributesValidWhenEqual; Attribute.Filter -> IsDatasourceFilterArgument;
  SilentlyIgnoredOnUpdate -> IgnoredOnUpdate; UnsupportedEntity.Kind ->
  TerraformBlockType; OperationInvoke -> OperationAction.

"excluded" is the one word for the toolkit setting an entity or attribute
aside: refuse() -> exclude(), refuseReservedRootNames() ->
excludeReservedRootNames(), refusedAttributes() -> excludedAttributes(),
and the docs say the same. The audit's "refusal" — an API answering a
request with a 4xx — is a different fact and keeps its word.

The toolkit's own JSON is camelCase throughout, as the OpenAPI document's
keys are: the intermediate representation's and sdkbind's tags migrate,
and unsupported.json moves to format version 3 — formatVersion,
terraformBlockType in place of kind, and the cause
objectWithoutPropertiesOrAdditionalProperties in place of shapelessObject.

The resource template reads HasReadAfterWriteDelay / ReadAfterWriteDelay
and emits the constant readAfterWriteDelay.

The glossary records every new term and retires authority, refuse (as the
code verb) and shapelessObject; the naming standard's R6 row names
camelCase as the JSON convention and points at the acronym table as the
record of that set.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XPLePCqzyYncF7TedagFkg
@ShocOne
ShocOne force-pushed the refactor/the-intermediate-representation-api-names-what-it-holds branch from 2ae6132 to 3fb7677 Compare August 30, 2026 09:02
@ShocOne
ShocOne merged commit 500db9f into main Aug 30, 2026
2 checks passed
@ShocOne
ShocOne deleted the refactor/the-intermediate-representation-api-names-what-it-holds branch August 30, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant