Skip to content

chore: upgrade SDK catalog + block structure, fix build errors - #5

Merged
blackcat merged 3 commits into
mainfrom
chore/sdk-structure-upgrade-fixes
Jul 27, 2026
Merged

chore: upgrade SDK catalog + block structure, fix build errors#5
blackcat merged 3 commits into
mainfrom
chore/sdk-structure-upgrade-fixes

Conversation

@blackcat

@blackcat blackcat commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades the SDK catalog and applies the block-tools structure upgrade, then fixes the build/type/runtime errors the upgrade surfaced.

Upgrade

  • Bump catalog: @platforma-sdk/model & ui-vue1.80.10, workflow-tengo6.8.2, package-builder3.14.2, block-tools2.12.9, ts-builder1.6.1, plus related tooling.
  • Regenerated block structure: new block/src/ facade, removed legacy block/index.{js,d.ts} and workflow/{tsconfig.json,vitest.config.mts}, added mark-stable workflow.

Fixes

  • Workflow resources API — migrated the exec resource request from the deprecated .cpu()/.mem()/.gpuMemory() setters to .resources({ onCPU, onGPU }) (adaptive: GPU allocation when the backend has one, CPU fallback otherwise), matching clonotype-space. Also fixes a pre-existing syntax error in the old code.
  • vue version — pinned to exact 3.5.24 (was ^3.5.24), so ui and ui-vue resolve a single copy. Fixes TS2345: SdkPluginV2 ... not assignable to Vue Plugin.
  • ui-vue/styles — removed the import "@platforma-sdk/ui-vue/styles"; the new ui-vue dropped that export.
  • Model export — renamed modelplatforma and updated the UI consumer, matching the convention the regenerated block facade expects. Fixes TS2305: has no exported member 'platforma'.

Verification

pnpm run check passes all 8 tasks (type-check, lint, format, build across model/ui/workflow/block/software).

Greptile Summary

Upgrades the Platforma SDK/toolchain and regenerates the block facade while adapting workflow resource allocation and package structure.

  • Block facade — the generated ESM facade exports the model contract, inferred data/output types, and packaged-block pointers.
  • Platforma model — the block model definition, renamed from model to platforma, describes arguments, UI state, outputs, sections, and GPU report types; consumers now use the new export.
  • Resource allocation — the workflow’s execution-resource type changes from separate CPU, memory, and GPU-memory setters to adaptive onCPU and onGPU resource variants.
  • GPU software package — the Python artifact definition remains the executable GPU-inspection package, while its post-build NVIDIA environment injection is removed.
  • SDK catalog — centralized exact versions for model, UI, workflow, packaging, facade, and TypeScript build tooling are upgraded; Vue is pinned to one exact version.
  • CI workflows — pull-request builds now enable tests, and a manually dispatched stable-release workflow is added.
  • Private workspace packages — model, UI, workflow, and GPU software packages are marked private because the block package is the publication boundary.

Confidence Score: 3/5

The CI test failure should be fixed before merging; pinning the new release workflow dependencies is also recommended.

Testing is newly enabled, but the model and UI test scripts invoke an executable those workspaces no longer declare, so pull-request and release builds can fail before completion.

Files Needing Attention: .github/workflows/build.yaml, model/package.json, ui/package.json, .github/workflows/mark-stable.yaml

Security Review

The new stable-release workflow references mutable v4 action tags while passing npm and AWS credentials. Pin both references to reviewed commit SHAs. How this was verified: the workflow’s uses entries are tag-based and its secrets block passes publishing credentials to the referenced workflow.

Important Files Changed

Filename Overview
workflow/src/main.tpl.tengo Replaces deprecated resource setters with adaptive CPU/GPU allocation and preserves execution outputs.
block/src/index.ts Adds the generated facade types, model export, and URL-based packaged-block pointer.
software/gpu-info/package.json Upgrades package tooling and removes the custom NVIDIA-environment post-build hook.
.github/workflows/build.yaml Enables a test phase that reaches undeclared Vitest commands in the model and UI workspaces.
.github/workflows/mark-stable.yaml Adds manual stable-release automation, but its privileged dependencies use mutable tags.
pnpm-workspace.yaml Updates the SDK catalog and pins Vue to an exact shared version.
model/src/index.ts Renames the exported block-model value to platforma without changing its model contract.
ui/src/app.ts Updates the UI integration to consume the renamed platforma model export.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Model[Platforma model] --> Facade[Generated block facade]
  Model --> UI[Vue UI]
  UI --> Args[Block arguments]
  Args --> Workflow[Tengo workflow]
  Workflow --> Resources{GPU requested?}
  Resources -->|Yes| Adaptive[onCPU / onGPU allocation]
  Resources -->|No| CPU[onCPU allocation]
  Adaptive --> Software[GPU-info Python package]
  CPU --> Software
  Software --> Report[GPU report and logs]
  Facade --> Pack[Published block pack]
Loading

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
.github/workflows/build.yaml:30
**Workspace test executables are missing**

When CI runs the newly enabled test phase, the root script delegates to `turbo run test`, which executes the retained `test: vitest` scripts in the model and UI workspaces even though this change removes their Vitest dependencies, causing the build workflow to terminate with `vitest: command not found`.

### Issue 2 of 2
.github/workflows/mark-stable.yaml:8
**Release actions use mutable tags**

The new stable-release workflow loads both its initialization action and publishing workflow through mutable `v4` tags while passing npm and AWS credentials, allowing a moved upstream tag to run unreviewed code with release credentials. Pin both references to reviewed commit SHAs. **How this was verified:** the workflow uses tag-based `uses` references and passes publishing credentials to the referenced workflow.

Reviews (1): Last reviewed commit: "chore: upgrade SDK catalog + block struc..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Context used:

  • Context used - Terms is a types in codebase. Provide the list of ... (source)

Bump SDK catalog to model/ui-vue 1.80.10 (and related tooling) and apply
the block-tools structure upgrade. Fix the errors surfaced by the upgrade:

- workflow: migrate exec resource request from deprecated .cpu()/.mem()/
  .gpuMemory() setters to the .resources({ onCPU, onGPU }) API (adaptive
  GPU/CPU); also fixes a pre-existing syntax error
- pin vue to exact 3.5.24 so ui and ui-vue share one copy (fixes the
  SdkPluginV2-vs-Vue-Plugin type mismatch)
- drop the removed "@platforma-sdk/ui-vue/styles" import
- rename model export model -> platforma and update the ui consumer,
  matching the new structure convention the regenerated block facade expects
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

node-version: '20.x'
build-script-name: 'build'
pnpm-recursive-build: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Workspace test executables are missing

When CI runs the newly enabled test phase, the root script delegates to turbo run test, which executes the retained test: vitest scripts in the model and UI workspaces even though this change removes their Vitest dependencies, causing the build workflow to terminate with vitest: command not found.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/build.yaml
Line: 30

Comment:
**Workspace test executables are missing**

When CI runs the newly enabled test phase, the root script delegates to `turbo run test`, which executes the retained `test: vitest` scripts in the model and UI workspaces even though this change removes their Vitest dependencies, causing the build workflow to terminate with `vitest: command not found`.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

init:
runs-on: ubuntu-latest
steps:
- uses: milaboratory/github-ci/actions/context/init@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 security Release actions use mutable tags

The new stable-release workflow loads both its initialization action and publishing workflow through mutable v4 tags while passing npm and AWS credentials, allowing a moved upstream tag to run unreviewed code with release credentials. Pin both references to reviewed commit SHAs. How this was verified: the workflow uses tag-based uses references and passes publishing credentials to the referenced workflow.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/mark-stable.yaml
Line: 8

Comment:
**Release actions use mutable tags**

The new stable-release workflow loads both its initialization action and publishing workflow through mutable `v4` tags while passing npm and AWS credentials, allowing a moved upstream tag to run unreviewed code with release credentials. Pin both references to reviewed commit SHAs. **How this was verified:** the workflow uses tag-based `uses` references and passes publishing credentials to the referenced workflow.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

The root package.json pinned @platforma-sdk/block-tools to a local file:
tarball (a dev override), which leaked into the commit and broke CI
(ENOENT on a path that only exists locally). Remove the pnpm.overrides
block and regenerate the lockfile against the catalog version (2.12.9).

Add a changeset for the SDK/structure upgrade and the accompanying fixes.
Both packages declared `test: vitest` but have no vitest dependency and
no test files (the workflow vitest setup was removed in the structure
upgrade). CI's `turbo run test` failed with `vitest: not found`. Drop the
scripts so turbo skips these packages, matching the clonotype-space block.
@blackcat
blackcat merged commit 65917c2 into main Jul 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants