Repository navigation
feat(core, blocks, hosting, create-blocks-app, admin-ui, bb-database)!: rename the hidden .blocks folder to .cdk-blocks and consolidate local data under it - #1607
Merged
Conversation
🦋 Changeset detectedLatest commit: 263c25c The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
had a problem deploying
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Failure
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:43 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 03:46 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 03:51 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 10:45 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
agent-bench
November 18, 2026 10:48 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 10:51 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 11:05 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 11:05 — with
GitHub Actions
Inactive
VarshithaPamisetty
temporarily deployed
to
e2e
November 18, 2026 11:05 — with
GitHub Actions
Inactive
This was referenced Nov 18, 2026
cadivus
reviewed
Nov 18, 2026
This was referenced Nov 19, 2026
cadivus
reviewed
Nov 19, 2026
soberm
reviewed
Nov 19, 2026
soberm
left a comment
Contributor
There was a problem hiding this comment.
Comments on lines outside the diff
native/dart/packages/blocks_runtime/CHANGELOG.md:333-334
[minor] This entry is in ## Unreleased, not published history, so it should name the path this PR ships: ~/.cdk-blocks/<applicationId>/dart/. The guard misses it because CHANGELOG.md is allowlisted by basename as "published release history".
soberm
requested changes
Nov 19, 2026
soberm
left a comment
Contributor
There was a problem hiding this comment.
Requesting changes for the open items in the threads above, chiefly the stackId fallback in stack-id.ts.
…olidate local data The hidden project folder is renamed from `.blocks/` to `.cdk-blocks/`, and the local Building Block data moves from `.bb-data/` into `.cdk-blocks/local/data/`, so an app keeps one hidden folder instead of two. `local/` hides itself: `getMockDataDir` writes a nested `.gitignore` containing `*` on first use, so runtime data cannot be staged while the committed `.cdk-blocks/config.json` stays tracked. Data is carried over per unit, copied rather than moved, and the renamed location wins when both exist. A pre-rename `.blocks/config.json` is still read for `stackId`, because `secret-naming.ts` answers an unresolved id with the unscoped `/blocks/secrets` namespace rather than failing. Adds `check:rename-traps`, which asserts the four mistakes this rename made repeatedly: a multi-segment path compared against single path segments, a `LEGACY*` constant holding the new name, a comment reflow merging two commands onto one line, and a doc naming a Dart generated-client import that disagrees with `builder.dart`. Decision: D-032. Layout per Bunsho UcDOcEZOfEpsD; see also #1139.
soberm
approved these changes
Nov 19, 2026
3 tasks done
This branch had an error being deployed
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.
Problem
Legal will not allow "blocks" on its own, so
.blocksbecomes.cdk-blocks. That folder holds the committedstackId, the telemetryprojectIdand opt-out, the installation id, the deploy history and Hosting's generated value types, reached by separatejoin(...)calls across five packages, three CI steps and the scaffolded templates' tsconfig includes. Nothing links them, so a partial rename still builds, lints and passes its unit tests, then fails at a path that does not exist — or silently reads a different file.Local Building Block data moves in the same change because it is the other hidden per-project directory. It cannot simply be renamed:
.bb-data/holds the customer's local state, including everyAppSettingandSecretvalue and the local PostgreSQL database.Issue #, if available: none. Last of the rename series to land: #1602 (
CDK_BLOCKS_*environment variables), #1644, #1606 (CDK telemetry opt-out), #1630 (the visibleaws-blocks/→cdk-blocks/directory) and #1655 have all merged. This one renames the hidden folder only.Changes
.cdk-blocksin 1014 references on 962 added lines across 370 files, plus the 16 committed test-app config directories moved withgit mvas 17 pure renames, so the pinned e2eprojectIds survive. An existing app renames its own folder, with one deliberate exception:getStackIdstill reads a pre-rename.blocks/config.json, becausesecret-naming.tsanswers an unresolved id with the unscoped/blocks/secretsand/blocks/confignamespaces instead of failing, so without that fallbacknpm run secretandnpm run configwould silently touch another app's namespace. When neither file exists, deploy and destroy still refuse and name the path to create rather than guessing astackIdand creating a second production stack..cdk-blocks/local/data/{fullId}/, recorded as D-032, which supersedes D-001's rejection of that nesting. An existing project keeps its data: the first use of each block's store, and of the sharedsettings.json, copies that unit across and never overwrites the new location, and.bb-data/is left in place so an older CLI in the same checkout still reads it. The carry-over is recorded per unit in.cdk-blocks/local/.carried-overand runs once for each, so data deleted after the upgrade stays deleted; the record is written only after a unit's copy finishes, so an interrupted copy is retried.getMockDataDir. A copy that did not finish is refused, naming both paths, where an incomplete data directory would otherwise be replaced with an empty one — an empty database is indistinguishable from a fresh project, so the next write would start a second copy of the customer's rows.npm run db -- statusand-- typesalso read the old directory, being read-only.check:dot-folder(22 unit tests) fails when any tracked file still names the old folder, in its content or in its path.check:data-ignoredasserts the data stays ignored in a scaffolded app fixture, since this monorepo ignores.cdk-blocks/wholesale and a root rule would answer first and make the check vacuous —local/hides itself, becausegetMockDataDirwrites a nested.gitignorecontaining*on first use, so one self-ignoring folder replaces three breakable root rules while the committedconfig.jsonstays tracked.check:rename-trapsasserts the four mistakes this rename made repeatedly: a multi-segment path compared against single path segments, aLEGACY*constant holding the new name, a comment reflow merging two commands onto one line, and a doc naming a Dart generated-client import that disagrees withbuilder.dart..blocks-sandbox/(Hosting serves it as a public URL path; renamed separately in fix(core)!: serve the runtime config at its original path again #1655), the native clients' own~/.blocks/<applicationId>session storage — Dart's as well as Kotlin's, both on the guard allowlist, since that is a per-user directory rather than the CLI's project folder and renaming it would sign every app out for a rename it is not part of — the published changelogs,.gitignore's legacy.bb-data/rules, themigratewrapper snapshots keyed by SHA-256, and the Dart codegen output extension.blocks.dart, which names a generated file, not the folder.Validation
Build,
npm test,test:e2e:local, lint, lint:deps, everycheck:*and the four changeset guards pass locally.npm testis 13105 pass with 1 failure,create-blocks-appsubtest 36, which fails identically on the unchanged base;test:e2e:localis 555 pass, 0 fail.Two new suites check real contents rather than that a path exists, which would pass against an empty store:
core/src/common/mock-data.test.tsfor the JSON carry-over, including the shared root file after a per-block call ran first, andbb-database/src/local-data-carry-over.test.tsagainst a real PGlite, for rows identical after the move and a half-copied directory refused.Not run: the sandbox, production, native and telemetry e2e legs, which need AWS credentials.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.