Structurer migration#16
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the block to the block-tools structure layout, upgrades the SDK dependencies to their latest versions, and standardizes configurations across packages (such as tsconfig, oxlint, and turbo). Additionally, the model's block export is renamed from model to platforma to align with the canonical facade contract, and test imports are updated accordingly. The feedback recommends removing the unused eslint dependency from test/package.json as linting has transitioned to oxlint via ts-builder check.
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.
| "@platforma-sdk/test": "catalog:", | ||
| "eslint": "catalog:", | ||
| "typescript": "catalog:", | ||
| "vitest": "catalog:" |
| }, | ||
| "scripts": { | ||
| "build": "ts-builder build --target block-facade && block-tools pack", | ||
| "prepublishOnly": "block-tools publish -r s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1 --registry-serve-url https://blocks.pl-open.science", |
There was a problem hiding this comment.
The S3 URL passed to
block-tools publish contains an unquoted ? character. When pnpm runs this script through sh -c "…", a bare ? is treated as a single-character glob wildcard. In the default shell, the glob will not expand (no matching files), but with nullglob or failglob enabled it can silently drop or error on the query-string parameter, causing the publish to use a malformed registry URL. Quoting the URL avoids this entirely.
| "prepublishOnly": "block-tools publish -r s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1 --registry-serve-url https://blocks.pl-open.science", | |
| "prepublishOnly": "block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1' --registry-serve-url https://blocks.pl-open.science", |
Prompt To Fix With AI
This is a comment left during a code review.
Path: block/package.json
Line: 21
Comment:
The S3 URL passed to `block-tools publish` contains an unquoted `?` character. When `pnpm` runs this script through `sh -c "…"`, a bare `?` is treated as a single-character glob wildcard. In the default shell, the glob will not expand (no matching files), but with `nullglob` or `failglob` enabled it can silently drop or error on the query-string parameter, causing the publish to use a malformed registry URL. Quoting the URL avoids this entirely.
```suggestion
"prepublishOnly": "block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1' --registry-serve-url https://blocks.pl-open.science",
```
How can I resolve this? If you propose a fix, please make it concise.
Greptile Summary
This PR migrates the entire block repository onto the
block-tools structurev2 layout, which transfers ownership of tsconfig, oxlint/oxfmt, turbo config, and the block index facade to the tool. It also upgrades the SDK stack (model/ui-vue 1.79.x, workflow-tengo 6.x, tengo-builder 4.0.x, block-tools 2.12.4) and renames the model's exported constant frommodel→platformato match the canonical facade contract.export const model→export const platformainmodel/src/index.ts, with all consumers (ui/src/app.ts,block/src/index.ts,test/src/wf.test.ts) updated accordingly.block/index.js+block/index.d.tsare removed; the newblock/src/index.ts(TypeScript ESM) usesimport.meta.urlto compute a URL-basedBlockPointer(type: "from-pack-v2", withpackUrlandrootUrl) replacing the oldtype: "dev-v2"filesystem-path pointer.hz-ubuntu-dind, removed legacymilaboratory-repo guards, split build intobuild:dev-local/build:releasescripts, added Turbo S3 cache secrets, and dropped the GitHub Packages registry entry.Confidence Score: 4/5
The migration is mechanical and consistent — every consumer of the renamed model export was updated to platforma, the new facade correctly derives all contract types from the same source of truth, and the URL-based BlockPointer math is sound for both dev and prod entrypoints.
The rename and structurer migration are applied uniformly across all packages. No functional logic was altered. The unquoted S3 URL in prepublishOnly is the only actionable finding.
block/package.json — the prepublishOnly script has an unquoted URL with ? that should be single-quoted.
Important Files Changed
modelexport toplatformaand updates theBlockOutputstype alias accordingly; no logic changes.from-pack-v2BlockPointerfromimport.meta.url, re-exportsplatforma, and exposesBlockContract,BlockOutputs,BlockData, and block-named aliases.dependenciestodevDependencies(facade is bundled); adds TypeScript ESM exports andts-builderbuild target;prepublishOnlyURL is unquoted.hz-ubuntu-dind, removes legacy repo-guardif:conditions, splits build into dev-local/release scripts, adds Turbo/cache HZ secrets, drops GitHub Packages registry.TiteseqAnalysisBlockPointer(from-pack-v2) fromthis-blockandplatformatype from the model; comprehensive end-to-end tests with bin-mode and sort-fraction fixtures.build/build:devscripts with a set of channel-aware scripts;upgrade-sdknow callsblock-tools structure refresh; removes barebuildentry.private: true; addsdist/index.cjsCJS entry alongside ESMdist/index.js; switches tsconfig to structurer-managed preset.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD subgraph model["model package (private)"] M[model/src/index.ts\nexport const platforma] end subgraph block["block package (published)"] BI[block/src/index.ts] BP["BlockPointer\n{type: from-pack-v2}"] BC["BlockContract\n{outputs, data, href}"] BA[AGENTS.ts] end subgraph consumers TW[test/src/wf.test.ts] UA[ui/src/app.ts] end M -->|import platforma| BI M -->|import type platforma| TW BI --> BP BI --> BC BI --> BA BP -->|TiteseqAnalysisBlockPointer| TW BC -->|BlockData, BlockOutputs| TW M -->|import platforma| UA%%{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 subgraph model["model package (private)"] M[model/src/index.ts\nexport const platforma] end subgraph block["block package (published)"] BI[block/src/index.ts] BP["BlockPointer\n{type: from-pack-v2}"] BC["BlockContract\n{outputs, data, href}"] BA[AGENTS.ts] end subgraph consumers TW[test/src/wf.test.ts] UA[ui/src/app.ts] end M -->|import platforma| BI M -->|import type platforma| TW BI --> BP BI --> BC BI --> BA BP -->|TiteseqAnalysisBlockPointer| TW BC -->|BlockData, BlockOutputs| TW M -->|import platforma| UAPrompt To Fix All With AI
Reviews (1): Last reviewed commit: "Structurer migration" | Re-trigger Greptile