Migrate block onto the structurer - #10
Conversation
There was a problem hiding this comment.
Code Review
This pull request performs a significant migration of the project structure to use a new 'structurer' tool, upgrades the SDK toolchain, and updates dependencies across the workspace. It also cleans up configuration files and reorganizes package scripts. I have identified two issues: the root package.json is missing a fmt script required by the new upgrade-sdk command, and the workflow package is missing vitest in its devDependencies despite using it in its test script.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| "update-sdk": "block-tools structure refresh --update-deps-only", | ||
| "do-pack": "turbo run do-pack", | ||
| "upgrade-sdk": "block-tools structure refresh --update-deps-only && pnpm i && block-tools structure refresh && pnpm i && pnpm fmt" |
There was a problem hiding this comment.
The upgrade-sdk script runs pnpm fmt at the end, but there is no fmt script defined in the root package.json. This will cause the command to fail with a Missing script: fmt error. Consider adding a root fmt script that delegates to turbo run fmt so that all workspace packages are formatted correctly.
"update-sdk": "block-tools structure refresh --update-deps-only",
"do-pack": "turbo run do-pack",
"fmt": "turbo run fmt",
"upgrade-sdk": "block-tools structure refresh --update-deps-only && pnpm i && block-tools structure refresh && pnpm i && pnpm fmt"| "@platforma-sdk/tengo-builder": "catalog:", | ||
| "@platforma-sdk/test": "catalog:" | ||
| "@platforma-sdk/test": "catalog:", |
There was a problem hiding this comment.
The test script in this package runs vitest, but vitest has been removed from peerDependencies and is not declared in devDependencies or dependencies. This will cause pnpm test to fail in this workspace. Please add vitest to devDependencies using the catalog.
| "@platforma-sdk/tengo-builder": "catalog:", | |
| "@platforma-sdk/test": "catalog:" | |
| "@platforma-sdk/test": "catalog:", | |
| "@platforma-sdk/test": "catalog:", | |
| "shx": "catalog:", | |
| "vitest": "catalog:" |
| "scripts": { | ||
| "build": "shx rm -rf dist && pl-tengo check && pl-tengo build", | ||
| "build": "shx rm -rf dist && pl-tengo build", | ||
| "test": "vitest", |
There was a problem hiding this comment.
vitest removed but test script retained
vitest was previously declared as a peerDependency ("vitest": "*") and vitest.config.mts was deleted, but the "test": "vitest" script was not updated. With no vitest in dependencies, devDependencies, or peerDependencies, the CI test step for this package will fail unless @platforma-sdk/test exposes a usable vitest binary as a hoisted transitive dependency — which pnpm's strict isolation does not guarantee.
The sibling test package avoids this by explicitly adding vitest: "catalog:" to devDependencies and using vitest run --passWithNoTests. Either add vitest: "catalog:" to this package's devDependencies, or remove the stale test script.
Prompt To Fix With AI
This is a comment left during a code review.
Path: workflow/package.json
Line: 8
Comment:
**`vitest` removed but test script retained**
`vitest` was previously declared as a `peerDependency` (`"vitest": "*"`) and `vitest.config.mts` was deleted, but the `"test": "vitest"` script was not updated. With no `vitest` in `dependencies`, `devDependencies`, or `peerDependencies`, the CI `test` step for this package will fail unless `@platforma-sdk/test` exposes a usable `vitest` binary as a hoisted transitive dependency — which pnpm's strict isolation does not guarantee.
The sibling `test` package avoids this by explicitly adding `vitest: "catalog:"` to `devDependencies` and using `vitest run --passWithNoTests`. Either add `vitest: "catalog:"` to this package's `devDependencies`, or remove the stale `test` script.
How can I resolve this? If you propose a fix, please make it concise.| create-tag: true | ||
| create-tag: 'true' | ||
|
|
||
| npmrc-config: | |
There was a problem hiding this comment.
App name case change may break tracking integrations
'Block: 3D Structure-Based Liabilities' was changed to 'Block: 3d Structure-Based Liabilities' (lowercase d). The same inconsistency appears in mark-stable.yaml, where the name also loses its hyphens: 'Block: 3d Structure Based Liabilities - Mark Stable'. If this app-name is used to key dashboards, Slack notifications, or release tracking in the CI system, both workflows should use the same casing, and any existing references to the original name will no longer match.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/build.yaml
Line: 40
Comment:
**App name case change may break tracking integrations**
`'Block: 3D Structure-Based Liabilities'` was changed to `'Block: 3d Structure-Based Liabilities'` (lowercase `d`). The same inconsistency appears in `mark-stable.yaml`, where the name also loses its hyphens: `'Block: 3d Structure Based Liabilities - Mark Stable'`. If this `app-name` is used to key dashboards, Slack notifications, or release tracking in the CI system, both workflows should use the same casing, and any existing references to the original name will no longer match.
How can I resolve this? If you propose a fix, please make it concise.| @@ -8,13 +8,15 @@ | |||
| "check": "turbo run check", | |||
| "build": "turbo run build", | |||
| "build:dev": "env PL_PKG_DEV=local turbo run build", | |||
There was a problem hiding this comment.
--env-mode=loose removal may silently hide env vars from tests
Removing --env-mode=loose from the test script means Turbo now runs in its default (strict) mode where only env vars listed in passThroughEnv are forwarded. The turbo.json test task currently declares ["PL_ADDRESS", "PL_TEST_PASSWORD", "PL_TEST_USER", "PL_TEST_PROXY", "DEBUG"]. Any test that consumes an env var not in this list will silently receive undefined rather than a CI failure, which can produce misleading test results.
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 10
Comment:
**`--env-mode=loose` removal may silently hide env vars from tests**
Removing `--env-mode=loose` from the `test` script means Turbo now runs in its default (strict) mode where only env vars listed in `passThroughEnv` are forwarded. The `turbo.json` `test` task currently declares `["PL_ADDRESS", "PL_TEST_PASSWORD", "PL_TEST_USER", "PL_TEST_PROXY", "DEBUG"]`. Any test that consumes an env var not in this list will silently receive `undefined` rather than a CI failure, which can produce misleading test results.
How can I resolve this? If you propose a fix, please make it concise.
Greptile Summary
This PR migrates the block onto the block-tools
structurerpattern (adding.structure, centralizingtsconfig/oxfmt/oxlint configs via@milaboratories/ts-builderpresets, and generatingblock/index.js+index.d.ts) while simultaneously bumping the whole SDK toolchain: block-tools 2.10.12→2.11.0, workflow-tengo 6.5.0→6.6.3, model/ui-vue/test 1.79.0→1.79.14, tengo-builder 4.0.7→4.0.8, ts-builder 1.5.0→1.5.2.Touched terms:
.structure/ structurer — New sentinel file{\"version\":1}that marks the block as layout-managed byblock-tools structure refresh. Futureupgrade-sdkruns will use this file to keep tooling config in sync automatically.blockSpec— New exported constant inblock/index.js(type: \"dev-v2\",folder: __dirname) that replaces the old workflow-levelTemplatesexport as the canonical handle a host app uses to locate the block's compiled artifacts.catalog— pnpm workspace shared version registry inpnpm-workspace.yaml.vitest(~4.0.18) was added here; all SDK packages bumped to their latest patch.block-tools(@platforma-sdk/block-tools) — Upgraded to 2.11.0; gains thestructure refreshsubcommand used by the newupdate-sdk/upgrade-sdkroot scripts.workflow-tengo(@platforma-sdk/workflow-tengo) — Upgraded from 6.5.0 to 6.6.3; drives the Tengo workflow compiler.ts-builder(@milaboratories/ts-builder) — Upgraded to 1.5.2; now owns the shared oxfmt/oxlint JSON presets that all package-level.oxfmtrc.json/.oxlintrc.jsonfiles extend.modeldual CJS/ESM —model/package.jsongains\"module\": \"dist/index.js\"and changes\"main\"todist/index.cjs, completing the standard dual-output layout introduced by the new ts-builder target.Confidence Score: 4/5
Safe to merge with one item to verify: the workflow test script calls vitest but vitest is no longer declared as a direct dependency of that package.
The bulk of the change is mechanical tool-managed scaffolding and SDK version bumps consistent throughout all packages. The one real concern is workflow/package.json where vitest was removed from peerDependencies and vitest.config.mts was deleted, but the test script was kept. Whether this fails in CI depends on whether pnpm hoists the vitest binary from @platforma-sdk/test. The test package correctly added vitest explicitly; the workflow package did not follow the same pattern.
workflow/package.json — verify the test script is still runnable after vitest was removed from peerDependencies and vitest.config.mts was deleted.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[block-tools structure refresh] -->|generates| B[.structure sentinel] A -->|generates| C[block/index.js + index.d.ts] A -->|generates| D[per-pkg tsconfig.json] A -->|generates| E[per-pkg oxfmtrc / oxlintrc] subgraph block_package [block package] C -->|exports| F["blockSpec: type=dev-v2, folder=__dirname"] end subgraph workflow_package [workflow package] G["test script: vitest"] -->|vitest removed from deps| H{vitest accessible?} H -->|"via @platforma-sdk/test hoist"| I[tests pass] H -->|pnpm strict isolation| J[CI failure] end subgraph sdk_bump [SDK Bumps] L[block-tools 2.10.12 to 2.11.0] M[workflow-tengo 6.5.0 to 6.6.3] N[model + ui-vue + test 1.79.0 to 1.79.14] O[ts-builder 1.5.0 to 1.5.2] end%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A[block-tools structure refresh] -->|generates| B[.structure sentinel] A -->|generates| C[block/index.js + index.d.ts] A -->|generates| D[per-pkg tsconfig.json] A -->|generates| E[per-pkg oxfmtrc / oxlintrc] subgraph block_package [block package] C -->|exports| F["blockSpec: type=dev-v2, folder=__dirname"] end subgraph workflow_package [workflow package] G["test script: vitest"] -->|vitest removed from deps| H{vitest accessible?} H -->|"via @platforma-sdk/test hoist"| I[tests pass] H -->|pnpm strict isolation| J[CI failure] end subgraph sdk_bump [SDK Bumps] L[block-tools 2.10.12 to 2.11.0] M[workflow-tengo 6.5.0 to 6.6.3] N[model + ui-vue + test 1.79.0 to 1.79.14] O[ts-builder 1.5.0 to 1.5.2] endPrompt To Fix All With AI
Reviews (1): Last reviewed commit: "Migrate block onto the structurer" | Re-trigger Greptile
Context used: