Repository navigation
Name every node by its full address, starting with the app name - #384
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…app name ADR-0056 supersedes ADR-0051. Addresses start with the deployed app name, resource IDs and COMPOSER_ env keys are built from them, and existing stages migrate on their next deploy through renamedFrom declarations. The index marks ADR-0051 superseded and notes the amendments to ADR-0006, ADR-0019, ADR-0048, ADR-0052 and ADR-0053. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…lossary and domain docs The address principle, the glossary entry, core-model, deploy-cli, alchemy-lowering, pdp-data-model, config-params, local-dev and module-composition now describe addresses that start with the app name, dotted resource IDs with their previous IDs, and env keys built from the full address. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Load now joins every child to the root's id, so addresses read shop.catalog and shop.auth.api instead of catalog and auth.api. The CLI resolves the app name (the root's name or --name) before Load, so its graph and the deploy lowering share one root, and the topology's root logicalId equals the Project's. logicalIds, bundle keys, reports and errors follow from the graph. The name-length error now names the address it measured. Tests use the full form (ADR-0056). Resource IDs still use the old suffix pattern on top of the new address; the next change replaces them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…- turned into _ An app name may contain -, which no POSIX variable name may. configKey, generatedParamVarName and local dev's copies of the key rule now map it to _, so my-shop.api gives COMPOSER_MY_SHOP_API_... (ADR-0056). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ource ID The resource ID of a Database or Bucket is now the node's address, which is also the node's key in the directory's record. Keying by it frees the name prop to stay a label in its old form, so recordKeyOf goes away. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…m its old one Each node's main resource is now its address (shop.catalog) and every other piece is <address>.<role> (shop.catalog.conn, shop.web.env.<KEY>, shop.web.generated.<path>, <consumer>.servicekey.<input>, <provider>.streamskey). Every resource declares the ID the previous release built with renamedFrom, computed in legacy-resource-ids.ts, so an existing stage moves its state instead of recreating databases, buckets, generated values and service keys. Names whose change makes upstream replace a resource (Connection, BucketAccessKey, Bucket, branchless Database) stay the address without the app name, so credentials are not rotated (ADR-0056). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…igrate Also corrects where an unknown serviceOrigin() address fails: while the deploy builds its plan, not at Load. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…s the address upgrade A record keyed by addresses without the app name now reads with the app name in front of each such key, and is written back that way, so the first prisma dev after upgrading reuses every instance and port. The rule lives in legacy-address-keys.ts. A bucket's objects stay in buckets/<app>/<address without the app name>, the folder earlier releases used, so an existing bucket instance keeps its directory. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…he upgrade Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Every address now starts with the app name, so the tree built from the addresses had the app as its only top-level node, under a first line that already names the app. The tree now starts below it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ttach tests These tests run against local-target's built output, so they kept passing with short addresses until it was rebuilt with the app-relative bucket folders. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… with project delete
Guides, the agent skill, the auth module's README and examples now write
addresses with the app name (serviceOrigin('auth-example.api'),
prisma dev url my-app.gateway, COMPOSER_MY_APP_... keys). The deploying
guide explains the upgrade to full addresses, and points whole-app
teardown at prisma project delete, keeping the destroy operation for a
single stage.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
The app name (the root module's name or --name) is the first segment of every address and of every COMPOSER_ key, so Load now requires letters, digits, - and _, starting with a letter or digit, before anything is assembled or deployed. A provision edge also carries the app name, so a provisioner can build names below it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…old keys Every write stores formatVersion 2. A record without it was written before node keys were full addresses, so every one of its keys gets the app name in front, including a child named like the app. A versioned record is read as is. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…noun roles addressBelowApp removes the known app name from an address. It is the one place that computes it, used for every legacy ID and for every platform name Composer writes: the App display name, the branchless Database name, and the Connection, Bucket and access key names. Those names are labels inside the app's own Project and stay within the 65-character limit however long the app name is. validateName checks that name and says plainly that fixing it changes the node's identity. Roles are now nouns: connection, accesskey, deployment, warmup, migration, streamkey. The local App provider finds its instance by resource ID, like databases and buckets, and the emulators hook keys every node through resourceId, with a test pinning the two together. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ormat and serviceOrigin with --name Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… and rename dispatches Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… including state outside the graph Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Main added the dev-server decision as ADR-0056 and the v0.34.0 release. Conflicts kept both sides: ADR-0053 carries both amendment notes, the ADR index lists both records, and the deploying guide keeps main's piped-output paragraphs between the branch's address definition and its logicalId text. The identity record is renumbered in the next commit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Main took ADR-0056 for the dev-server decision. The identity record and every reference that means it now say ADR-0057; references to the dev-server record keep ADR-0056. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
The App display name, the local dev Database name, and the Connection, Bucket and bucket access key names are now the full address. Name validation checks each kind against the platform's own limit (Connection 65, Bucket 100, App 256, access key none) and names the address on failure. addressBelowApp moves into legacy-resource-ids.ts, the only place that still needs it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
ADR-0057, the glossary, the principle, the lowering doc, core-model and the deploying guide now say every platform name is the address, and that the upgrade recreates Composer's Connections and access keys with new credentials that its services receive in the same deploy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…wner The move to full addresses can give one row's new key to another row's old key: a module or service named like the app in any letter case, or modules spelling an app name with `-` or `_`. Upstream then fails partway with a conflict that names neither node. Deploy preflight now computes every row's new and old key from the graph and, while the old owner's row still holds the key on the stage and has not moved, fails before any change, naming both addresses, the variable and the `prisma project env delete` command that clears it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
APP_NAME and assertAppName had been inserted between Load and its doc comment. Two comments still cited the superseded ADR-0051 for the rule that the row holding a node's logicalId is that node's row. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…r labels ADR-0057 no longer says keys cannot collide during the move, describes every form of the clash and the preflight that stops it, and replaces the advice to rename a node, which would delete its rows, with deleting the one old variable. The deploying guide gives the same fix and notes that emulator instances keep their old address labels until --fresh. upgrade-effects.md states when a Database update rotates its default connection: never for a stage last deployed by v0.34.0. The glossary says a Connection's platform name carries upstream's suffix; core-model's sketch names the Connection by its address. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
With `shop.x`, `shop.shop.x` and `shop.shop.shop.x`, the middle node's new key is the last node's old key, so it exists before any move and hid the first clash. A row under the old owner's new key now counts as moved only when that key's own clash is not pending. The error also says what is true: no resource has been created, changed or deleted, but the Branch's topology has been replaced and the build recorded. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
ADR-0057, the deploying guide and upgrade-effects.md no longer say the deploy stops before changing anything. They say, as the ADR does for serviceOrigin, that no resource has been created, changed or deleted but the Branch's topology has been replaced, and that a chain of clashes is reported in one run. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…elete Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
|
✅ Gizmo reviewed 1e44464 — posted 0 inline comment(s) this pass. Open findings: none Change walkthroughThis incremental delta hardens the deploy-preflight error message in preflight.ts so the What changed
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Comment |
commit: |
…e check env-key-clash.ts, legacy-resource-ids.ts and resource-ids.ts are only imported by deploy-time code (descriptors, control, preflight, the local target), so they join the control plane of the prisma-cloud extensions layer. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…aries App display names are now the full address, so looking an App up by its short name (`storefront`, `blobs`, `widgets`, `jobs`, `streams.service`, `cron.runner`) finds nothing. The scripts now match the App's logicalId, the full address built from STACK_NAME, which every CI deploy passes as `--name`. The cold-start canary also looks for the streams artifact under its full-address file name. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
There was a problem hiding this comment.
New findings: 🟡 5 minor · trace
Findings outside the diff
- 🟡 Minor · consistency architecture.config.json — architecture.config.json keeps a glob rule for the deleted service-app.ts
This PR deletespackages/1-prisma-cloud/1-extensions/target/src/service-app.ts(itsserviceAppName/resourceNamehelpers are replaced by full-address names built withresourceId) and adds architecture rules for the three new files (env-key-clash.ts,legacy-resource-ids.ts,resource-ids.ts) in the same layer/plane, but the glob rule for the now-deletedservice-app.ts(around line 340) is left behind. A grep confirms no other reference to the deleted module remains. The stale entry misleads the next architecture audit and any tooling that validates the config's globs against the tree.
Recommended fix: Delete thepackages/1-prisma-cloud/1-extensions/target/src/service-app.tsrule block fromarchitecture.config.json.
…clash error - Remove the architecture rule for the deleted service-app.ts. - validatePlatformName enforces the Management API's minimums as well as its maximums (Connection 3 to 52 after upstream's suffix, Bucket 1 to 100, App 1 to 256) and names the address and both limits. - The env key clash error single-quotes the key, project id and stage in the printed delete command, so it is safe to paste; the guide's example is quoted the same way. - serializer.ts's header describes the current key scheme: the full address from the app name, `-` turned into `_`; only the boot stash is address-free. - The core-concepts skill says short provision ids are fine, since every platform name is the full address, and gives each kind's real limits. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… command missingError printed `--branch "<stage>"` with the stage unescaped, so a stage containing `"`, `$` or a space printed a command unsafe to paste. It now single-quotes the `KEY=<value>` pair, the project id and the stage with the same shellQuote the env key clash error uses. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
wmadden
approved these changes
Oct 23, 2026
sneub
added a commit
that referenced
this pull request
Oct 27, 2026
Brings in ADR-0057 (#384): addresses start with the app name and COMPOSER_ keys normalise - to _. configKey moved to config-key.ts on this branch, so addressKeySegments moves there with it and serializer.ts re-exports both; stashRows keeps building keys through configKey and needs no other change. The dev-server tests use full addresses (shop.auth, hello-dev.app, fixture-module.web), and the stashRows test uses my-shop.web so it covers the - to _ rule. Signed-off-by: Shane Neubauer <[email protected]>
sneub
added a commit
that referenced
this pull request
Oct 27, 2026
…R-0057) After the merge of #384 every address starts with the app name, so the front door, the dev-server lines and dev url read shop.web, not app. Signed-off-by: Shane Neubauer <[email protected]>
wmadden-electric
added a commit
that referenced
this pull request
Oct 27, 2026
Brings in dev servers (#381), full node addresses (#384, ADR-0057), the deploy entry in prisma.config.ts (#387) and prisma deploy list (#388). The secrets decision becomes ADR-0058, and every reference to it moves with it. A dev server gets its environment from materializeEnv, so it receives the same per-service secret values from process.env, an unset optional secret is absent, and a changed value restarts it; the serve test now covers both. The docs that described placeholders for dev servers now describe reading secrets before the dev server starts. Tests and expected error text use full addresses. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> Co-Authored-By: Claude Opus 5.5 <[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.
The decision: a node is named by its full address, starting with the app name
Every module, service, database and bucket in a Composer app is a node. Each node has an ID: its
name, unlessprovision()gives it another one. A node's address is the IDs on the path from the root module down to the node, joined with dots. The root module's ID is the app's name.Until now, addresses left out the root. The database above was
catalog, notshop.catalog. So the stringcatalogdid not say which app it belonged to. To find the node, you also had to know which app you meant, from the linked project or the directory you were in. That gets in the way of the next pieces of this project: platform commands that take an address (prisma service logs @pr-42:shop.api), andprisma deploy list, which will print every node on a stage. It also meant two apps deployed to the same stage could have nodes with the same address.This PR puts the app name at the start of every address. That string is now the only way a node is identified. Everything that names a node is built from it:
dev urlapishop.apilogicalIdon the node's platform row. The platform uses it to recognise the same service on every stage.apishop.apiapishop.apiapi-svc,catalog-connshop.api,shop.catalog.connectionCOMPOSER_API_…COMPOSER_SHOP_API_…The decision is recorded in ADR-0057, which replaces ADR-0051. The principles, glossary, domain docs, guides, agent skill and examples are updated to match.
What app authors change
serviceOrigin()takes the full address:serviceOrigin('shop.api'). If the address names no service, the deploy fails before it creates, changes or deletes any resource. One consequence: an app that usesserviceOrigin()can't be deployed under another name withprisma deploy --name shop2. Under that name the service's address isshop2.api, so'shop.api'names nothing.prisma dev urltakes the full address.-and_. Composer rejects any other name before deploying, because the name now starts every address and every environment variable name.Nothing else in an app's code changes.
How existing apps move over
An app deployed by an earlier release has its resources recorded under the old IDs, such as
catalog-db. If this release simply used the new IDs, Alchemy would see resources it has never created, plus old ones that are no longer declared. It would create an empty database and delete the old one with its data.So Composer also tells Alchemy each resource's old ID. Users write nothing for this. Inside Composer's Prisma Cloud code, every resource Composer declares for an app carries Alchemy's rename declaration (
renamedFrom), naming the ID earlier releases gave that resource. On the first deploy with this release, Alchemy moves each resource's record to its new ID and updates the resource, instead of recreating it. The deploy log is the only place a user sees this:The old IDs are built in
legacy-resource-ids.ts. Review checked each one against the v0.34.0 source, and every release since v0.16.0 builds them the same way. On a stage already deployed with this release, or a new stage, the rename declarations do nothing.That first deploy does the following to each kind of resource. The full table, with the upstream code each line relies on, is in
upgrade-effects.md.Each recreated resource is created first. The old one is deleted only after the whole deploy has succeeded, by the id Composer recorded for it.
Local
prisma devkeeps its instances, ports and data. Composer records which local instance backs each node in.prisma-composer/dev/emulator-instances.json, and rewrites that file to full addresses on the first run.One rare app shape can't move automatically. Take an app
shopwith a servicexdirectly under the root, and also a module namedshopthat contains another servicex. The second service's old variable names (COMPOSER_SHOP_X_…) are the first service's new ones. A check finds this before any resource is created, changed or deleted, and names both services. Its fix loses nothing: delete each old variable it names, then deploy again.What happens when this is released
Releasing changes nothing by itself. Each stage moves over on its first deploy with this release, as described above.
.envor a reporting tool. Composer's own services keep working.How we know it's safe
On the real platform (
qa.md), QA did the following:serviceOrigin.Afterwards, the platform ids, rows, objects, generated secret, service-to-service keys and URLs were all unchanged. So was everything added by hand, and the hand-made connection and access key still read the data. Every display name and
logicalIdwas the full address, and no old ID or variable was left.QA also deployed the same app to a brand-new stage. The first attempt failed, as it also does with v0.34.0: a bucket that Composer did not create appeared on the new stage, and Composer refused to deploy over it (the first known issue below). After QA deleted that bucket by hand, the deploy to the new stage worked. Local dev kept its data across the upgrade, and
prisma project deleteremoved the app while its services ran.Typecheck, lint and unit tests pass.
Known issues not fixed here
prisma emulator listshows local instances created before the upgrade under their old short addresses, untilprisma dev --freshre-creates them.Alternatives considered
Agent: victoria-52
🤖 Generated with Claude Code