Draft
Conversation
Renames in packages/base/command.gts:
- GetRealmOfUrl{Input,Result} → GetRealmOfResourceIdentifier{Input,Result}
Field rename: url → resourceIdentifier, realmUrl → realmIdentifier
- RealmUrlCard → RealmIdentifierCard, .realmUrl → .realmIdentifier
- InvalidateRealmUrlsInput → InvalidateRealmIdentifiersInput
Field rename: urls → resourceIdentifiers
- CanReadRealmInput.realmUrl → realmIdentifier
- GetDefaultWritableRealmResult.realmUrl → realmIdentifier
- ValidateRealm{Input,Result}.realmUrl → realmIdentifier
Also renames the host command file get-realm-of-url.ts →
get-realm-of-resource-identifier.ts (and its class), and the matching
test file. Sweeps all consumers and integration tests.
The wire payload to the realm-server invalidation endpoint stays as
'urls' since that's the server's protocol. Other commands that still
use 'realmUrl' as a field name (ExecuteAtomicOperationsInput,
SendAiAssistantMessageInput, EvaluateModuleInput, InstantiateCardInput,
etc.) are out of scope for this commit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Continues the CS-10992 sweep started in the previous commit:
Field renames in packages/base/command.gts:
- CopySourceInput.{originSourceUrl, destinationSourceUrl} → {originSourceIdentifier, destinationSourceIdentifier}
- CopySourceResult.url → identifier
- CopyFileToRealmInput.sourceFileUrl → sourceFileIdentifier
- CopyFileToRealmResult.newFileUrl → newFileIdentifier
- FileUrlCard → FileIdentifierCard, .fileUrl → .fileIdentifier
- WriteBinaryFileResult.fileUrl → fileIdentifier
- ReadBinaryFileInput.url → fileIdentifier
- PatchCodeCommandResult.finalFileUrl → finalFileIdentifier
- PatchCodeInput.fileUrl → fileIdentifier
- SendAiAssistantMessageInput.{attachedFileURLs, realmUrl} → {attachedFileIdentifiers, realmIdentifier}
- EvaluateModuleInput.{moduleUrl, realmUrl} → {moduleIdentifier, realmIdentifier}
- InstantiateCardInput.{moduleUrl, realmUrl} → {moduleIdentifier, realmIdentifier}
- ExecuteAtomicOperationsInput.realmUrl → realmIdentifier
- SanitizeModuleListInput/Result.moduleUrls → moduleIdentifiers
- GetAvailableRealmUrlsResult → GetAvailableRealmIdentifiersResult, .urls → .realmIdentifiers
- GetCatalogRealmUrlsResult → GetCatalogRealmIdentifiersResult, .urls → .realmIdentifiers
- FetchCardJsonInput.url → cardIdentifier
- RealmMetaField.url → realmIdentifier (and the inline RealmMeta type in realm.gts)
Sweeps consumers across host commands, components, services, tests, and
catalog-realm/experiments-realm.
Out of scope: AuthedFetchInput.url and SendRequestViaProxyInput.url
(generic URLs, not realm resource identifiers); RealmInfoField.{backgroundURL, iconURL}
(actual image URLs); GenerateThumbnailInput.{sourceImageUrl, targetRealmUrl} and
GenerateThumbnailOutput.imageDefUrl (image-domain fields).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- GenerateThumbnailInput.targetRealmUrl → targetRealmIdentifier - GenerateThumbnailOutput.imageDefUrl → imageDefIdentifier The catalog-realm UploadImageCommand and GenerateImageCommand have their own targetRealmUrl fields (they're separate command classes defined in catalog-realm) — those stay untouched in this commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ntifier The catalog-realm-defined UploadImageCommand and GenerateImageCommand had their own targetRealmUrl input fields. Rename to targetRealmIdentifier for consistency with the rest of the command-API renames in this branch. Sweeps callers in catalog-realm (image fields, time-machine, adventure, product-rotater) and experiments-realm (image-upload-tester). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Preview deploymentsHost Test Results 1 files 1 suites 1h 43m 14s ⏱️ Results for commit a41aab9. Realm Server Test Results 1 files ± 0 1 suites ±0 18m 3s ⏱️ + 13m 16s Results for commit a41aab9. ± Comparison against earlier commit 5d815bf. |
The previous rename commits updated class definitions in packages/base/command.gts but missed several callers — tsc can't catch them because Partial<FieldsOf<...>> CardDef constructors and matrix runCommand payloads are both untyped object literals, so mismatched keys silently leave the new field empty. Production fixes (constructor was passing the old key): - write-text-file.ts:97 — fileUrl → fileIdentifier - write-binary-file.ts:135 — fileUrl → fileIdentifier - get-default-writable-realm.ts:25 — realmUrl → realmIdentifier - get-all-realm-metas.ts:33 — url → realmIdentifier - software-factory/src/eval-execution.ts:378 — moduleUrl/realmUrl → moduleIdentifier/realmIdentifier in EVALUATE_MODULE_COMMAND payload - software-factory/src/instantiate-execution.ts:722-726 — same for INSTANTIATE_CARD_COMMAND payload Test fixes (tests still passed old keys to InputType): - evaluate-module-test.gts (host integration) - instantiate-card-test.gts (host integration) - evaluate-module-command.spec.ts (software-factory) This unbreaks downstream cascades: switch-submode createFile tests read writeResult.fileIdentifier (empty), realm field tests read realm.realmIdentifier (empty), and all eval-validation / instantiate-validation SF tests fail at the runCommand layer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
This is a mechanical renaming within the commands package, with updates like this:
sourceFileUrl→sourceFileIdentifierGetCatalogRealmUrlsCommand→GetCatalogRealmIdentifiersCommand