Skip to content

Migrate rarefaction onto the structurer + SDK upgrade#32

Open
vadimpiven wants to merge 3 commits into
mainfrom
chore/rarefaction-structurer
Open

Migrate rarefaction onto the structurer + SDK upgrade#32
vadimpiven wants to merge 3 commits into
mainfrom
chore/rarefaction-structurer

Conversation

@vadimpiven

@vadimpiven vadimpiven commented Jun 22, 2026

Copy link
Copy Markdown

Migrates rarefaction onto the block-tools structurer and bumps the SDK to latest.

Note: already on BlockModelV3 (BlockModelV3.create + DataModelBuilder + defineAppV3), so no model-V3 migration — structurer layout adoption + SDK-version bump only.

Commits

  1. chore: structurer refresh + SDK upgrade — tool-managed layout (oxlint/oxfmt, ts-builder, regenerated configs across model, ui, workflow, block, software, test). SDK → model/ui-vue 1.79.15, workflow-tengo 6.6.3, tengo-builder 3.0.04.0.9 (3→4), block-tools 2.11.1. Removes the empty placeholder test/src/wf.test.ts and orphaned model/ui vitest.config.mts.
  2. chore: changeset — patch on model, ui, workflow, software; root auto-patches. No block behavior change.

Graphs/table

Unchanged — keeps the hand-rolled <GraphMaker> (graph page) and createPlDataTableV2 table; no plugin.

Verification

pnpm build:dev + check + pnpm test all green (turbo 10/10). Changeset validated.

CI workflows left identical to main (unrelated structurer drift).

Greptile Summary

This PR migrates the rarefaction block onto the block-tools structurer (tool-managed layout) and bumps the SDK stack to latest. No block logic was changed — all functional code (BlockModelV3, DataModelBuilder, workflow, UI) is byte-for-byte equivalent after quote-style normalization by oxfmt.

  • Structurer layout: oxlint/oxfmt configs regenerated across all workspaces; eslint-config removed in favour of ts-builder check; vitest.config files regenerated; model/vitest.config.mts and the empty placeholder test/src/wf.test.ts deleted.
  • SDK bumps: @platforma-sdk/model/ui-vue/test 1.77→1.79.15, workflow-tengo 5.25→6.6.3, tengo-builder 3.0→4.0.9 (major version), block-tools 2.8→2.11.1; block/index.js now exports a real blockSpec object (replacing the empty stub).
  • Build pipeline: turbo.json gains fmt/check tasks; build now declares check as a dependency; --env-mode=loose removed from the root test script, tightening env-var passthrough to the explicit passThroughEnv list.

Confidence Score: 4/5

Safe to merge. All changes are mechanical structurer-layout adoption and SDK version bumps with no block logic altered.

The migration is faithful — every source file change is quote-style normalization or config regeneration, and the functional code paths in the model, UI, and workflow are unchanged. The only non-trivial delta is block/index.js now exporting a real blockSpec and the major-version SDK bumps (tengo-builder 3 to 4, workflow-tengo 5 to 6), which are intentional and confirmed green by CI. The one remaining rough edge is the workflow/package.json do-pack script still using bare rm/mv rather than shx, which is inconsistent with the rest of the migration but does not affect runtime behavior.

workflow/package.json — do-pack script uses bare rm/mv while shx is available.

Important Files Changed

Filename Overview
block/index.js Now exports a real blockSpec object (type: "dev-v2", folder: __dirname) as CJS instead of the empty ESM stub; matching .d.ts updated accordingly.
model/src/index.ts Quote-style normalization only (single → double quotes); no logic change to BlockModelV3 pipeline, outputs, or DataModelBuilder.
model/package.json Adds module field and CJS main for dual-build; broadens exports["./dist/*"] wildcard; removes eslint-config/vitest devDeps in favour of ts-builder; typescript/@types/node moved to peerDeps.
workflow/package.json Adds shx and @platforma-sdk/test devDeps; upgrades tengo-builder 3→4 and workflow-tengo 5→6 (both major). do-pack still uses bare rm/mv instead of shx.
turbo.json Adds fmt and check tasks; build now depends on check (linting gate before build); test loses --env-mode=loose, tightening env-var scope to the explicit passThroughEnv list.
test/src/wf.test.ts Deleted — was an empty placeholder; vitest is configured with --passWithNoTests so the test task still passes.
pnpm-lock.yaml Lockfile regenerated; major SDK bumps resolved correctly (tengo-builder 3→4, workflow-tengo 5→6, model/ui-vue/test 1.77→1.79.15); new packages (shx, oxfmt, oxlint, better-sqlite3, inquirer suite) pulled in transitively.
block/package.json rm replaced by shx rm in build/do-pack; shx added to devDeps; packageManager field moved; dependency order alphabetised.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[pnpm build:dev] --> B[turbo run build]
    B --> C{per workspace}
    C --> D[check\nts-builder check]
    D --> E[build\nts-builder build / pl-tengo build]
    E --> F[block-tools build-model\nmodel only]

    G[pnpm check] --> H[turbo run check]
    H --> D

    I[pnpm fmt] --> J[turbo run fmt\nts-builder format / oxfmt]

    K[pnpm test] --> L[turbo run test\n--concurrency 1]
    L --> M[dependsOn: build + check]
    M --> N[vitest run --passWithNoTests]

    style D fill:#f9c,stroke:#c99
    style E fill:#9cf,stroke:#99c
    style N fill:#cfc,stroke:#9c9
Loading
%%{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[pnpm build:dev] --> B[turbo run build]
    B --> C{per workspace}
    C --> D[check\nts-builder check]
    D --> E[build\nts-builder build / pl-tengo build]
    E --> F[block-tools build-model\nmodel only]

    G[pnpm check] --> H[turbo run check]
    H --> D

    I[pnpm fmt] --> J[turbo run fmt\nts-builder format / oxfmt]

    K[pnpm test] --> L[turbo run test\n--concurrency 1]
    L --> M[dependsOn: build + check]
    M --> N[vitest run --passWithNoTests]

    style D fill:#f9c,stroke:#c99
    style E fill:#9cf,stroke:#99c
    style N fill:#cfc,stroke:#9c9
Loading

Fix All in Claude Code

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

---

### Issue 1 of 1
workflow/package.json:9
The `do-pack` script uses bare `rm` and `mv` shell commands while the `build` script already uses `shx rm -rf dist`. On Windows, `rm` and `mv` are not available, so `do-pack` would fail where `build` succeeds. Apply `shx` consistently.

```suggestion
    "do-pack": "shx rm -f *.tgz && pnpm pack && shx mv *.tgz package.tgz",
```

Reviews (1): Last reviewed commit: "chore: add changeset for structurer migr..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Adopt the tool-managed block layout (oxlint/oxfmt, ts-builder, regenerated
configs across model, ui, workflow, block, software, test) and the full SDK
upgrade to latest (model/ui-vue, workflow-tengo, tengo-builder 3->4, block-tools).

The block is already on BlockModelV3, so no model migration was needed — this is
layout/tooling + SDK-version only.

Remove dead test scaffolding: the empty placeholder test/src/wf.test.ts
(oxlint no-empty-file) and the orphaned model/ui vitest.config.mts (tests live in
the test/ package).

CI workflows left unchanged from main (unrelated structurer drift).

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the repository to the block-tools structurer, which involves updating configurations for linting and formatting (oxlint/oxfmt), reorganizing package scripts to use ts-builder, and bumping the Platforma SDK packages to their latest versions. Feedback on these changes suggests updating the do-pack script in workflow/package.json to use shx instead of native rm and mv commands to ensure cross-platform compatibility.

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.

Comment thread workflow/package.json Outdated
Comment thread workflow/package.json Outdated
The structurer shx-ified the build script and added shx as a devDep but left
do-pack on bare rm/mv (fails on Windows). Match the build script and the
canonical do-pack (shx rm / shx mv).
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.

1 participant