Skip to content

Julenmendieta/MILAB-6469_migrateToStructurer#2

Merged
julenmendieta merged 4 commits into
mainfrom
julenmendieta/MILAB-6469_migrateToStructurer
Jun 22, 2026
Merged

Julenmendieta/MILAB-6469_migrateToStructurer#2
julenmendieta merged 4 commits into
mainfrom
julenmendieta/MILAB-6469_migrateToStructurer

Conversation

@julenmendieta

@julenmendieta julenmendieta commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Greptile Summary

This PR migrates the block onto the structurer toolchain — the canonical layout manager introduced in @platforma-sdk/block-tools 2.11.0. It upgrades all platform SDK packages to their latest aligned versions (model/ui-vue/test 1.79.14, workflow-tengo 6.6.3) and adopts the tool-managed configurations for tsconfig, oxlint/oxfmt, Turborepo, and CI.

  • blockSpec (new): The canonical block entry-point object exported from block/index.js/block/index.d.ts. Contains type: "dev-v2" and folder: __dirname, replacing the old Templates export pattern from workflow/index.js.
  • Templates (removed): The previous workflow template descriptor ({ type: "from-file", path }) exported by workflow/index.js. Removed entirely; the workflow template path is now referenced directly in block/package.json's components.workflow field.
  • structurer: The new tool surface (block-tools structure refresh) that manages the repo's canonical layout — tsconfig presets, linting configs, turbo task graph, and CI workflow files. Its presence is declared via the new .structure file.
  • WorkflowStats (unchanged): The model type imported in ReportTable.vue representing per-scope embedding counts (max_length, scopes[]). Not modified by this PR; included only because the model package version changed.
  • passThroughEnv (turbo.json): The Turborepo mechanism that forwards specific environment variables to task processes without affecting the cache hash. The test task now explicitly lists PL_ADDRESS, PL_TEST_*, and DEBUG, replacing the previous --env-mode=loose flag that passed all env vars.

Confidence Score: 4/5

Straightforward toolchain migration with no changes to application logic; safe to merge after verifying the pnpm version alignment and registry availability.

All application logic (model types, Vue components, Tengo workflow) is untouched. The changes are config, tooling, and dependency upgrades. Two observations worth resolving before merging: the root packageManager was downgraded to pnpm@9.12.0 while block/package.json remains at 9.14.4, which can cause Corepack enforcement conflicts; and the GitHub Packages registry entry was removed, so CI builds depend on every @milaboratories/* package being available on npmjs.org.

.github/workflows/build.yaml (registry change), package.json (pnpm version)

Important Files Changed

Filename Overview
.github/workflows/build.yaml CI workflow updated: tests enabled, repo guard conditions removed, GitHub Packages registry entry dropped, publish/tag params switched from booleans to strings
block/index.js New canonical block entry point exporting blockSpec with type "dev-v2" and __dirname as folder
block/package.json Dependencies reordered, shx added to devDependencies, packageManager kept at pnpm@9.14.4 (differs from root)
package.json packageManager downgraded from 9.14.4 to 9.12.0 (inconsistent with block/package.json), update-sdk script replaced with structurer command, upgrade-sdk and do-pack scripts added
model/package.json Added dist/index.cjs as main entry to support dual CJS/ESM consumption
workflow/index.js Deleted: old Templates entry-point pattern removed; workflow template now referenced directly via block/package.json components path
turbo.json Restructured task graph: test task now properly declares passThroughEnv for CI test credentials
pnpm-lock.yaml Lockfile reflects catalog updates: block-tools 2.11.0, model/ui-vue/test 1.79.14, workflow-tengo 6.6.3, vitest pinned to ~4.0.18 in catalog

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph root["Workspace root"]
        PJ["package.json\n(pnpm@9.12.0)"]
        TJ["turbo.json"]
        ST[".structure\n{version:1}"]
    end

    subgraph block["block/"]
        BI["index.js\nblockSpec { type:'dev-v2', folder:__dirname }"]
        BPJ["package.json\n(pnpm@9.14.4 ⚠)"]
    end

    subgraph model["model/"]
        MPKG["package.json\nmain: dist/index.cjs\nmodule: dist/index.js"]
        MTSC["tsconfig.json\nextends ts-configs/block/model"]
    end

    subgraph ui["ui/"]
        UPKG["package.json"]
        UTSC["tsconfig.json\nextends ts-configs/block/ui"]
    end

    subgraph workflow["workflow/"]
        WPKG["package.json"]
        WDIST["dist/tengo/tpl/main.plj.gz\n(built artifact)"]
    end

    subgraph test["test/"]
        TPKG["package.json\nvitest run --passWithNoTests"]
    end

    ST -->|"structurer manages configs"| model
    ST -->|"structurer manages configs"| ui
    ST -->|"structurer manages configs"| test

    BI -->|"folder = block dir"| BPJ
    BPJ -->|"components.workflow"| WDIST
    BPJ -->|"depends on"| MPKG
    BPJ -->|"depends on"| UPKG
    BPJ -->|"depends on"| WPKG

    WDIST -->|"built by"| WPKG
    TPKG -->|"this-block ref"| BPJ
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
    subgraph root["Workspace root"]
        PJ["package.json\n(pnpm@9.12.0)"]
        TJ["turbo.json"]
        ST[".structure\n{version:1}"]
    end

    subgraph block["block/"]
        BI["index.js\nblockSpec { type:'dev-v2', folder:__dirname }"]
        BPJ["package.json\n(pnpm@9.14.4 ⚠)"]
    end

    subgraph model["model/"]
        MPKG["package.json\nmain: dist/index.cjs\nmodule: dist/index.js"]
        MTSC["tsconfig.json\nextends ts-configs/block/model"]
    end

    subgraph ui["ui/"]
        UPKG["package.json"]
        UTSC["tsconfig.json\nextends ts-configs/block/ui"]
    end

    subgraph workflow["workflow/"]
        WPKG["package.json"]
        WDIST["dist/tengo/tpl/main.plj.gz\n(built artifact)"]
    end

    subgraph test["test/"]
        TPKG["package.json\nvitest run --passWithNoTests"]
    end

    ST -->|"structurer manages configs"| model
    ST -->|"structurer manages configs"| ui
    ST -->|"structurer manages configs"| test

    BI -->|"folder = block dir"| BPJ
    BPJ -->|"components.workflow"| WDIST
    BPJ -->|"depends on"| MPKG
    BPJ -->|"depends on"| UPKG
    BPJ -->|"depends on"| WPKG

    WDIST -->|"built by"| WPKG
    TPKG -->|"this-block ref"| BPJ
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
package.json:33
The root `packageManager` was downgraded to `pnpm@9.12.0`, but `block/package.json` still declares `pnpm@9.14.4`. When Corepack is active, running pnpm inside `block/` will try to enforce 9.14.4 while the workspace root enforces 9.12.0, producing a version-mismatch error. Both files should declare the same version.

```suggestion
  "packageManager": "pnpm@9.14.4"
```

### Issue 2 of 2
.github/workflows/build.yaml:60-68
**GitHub Packages registry removed**

The `https://npm.pkg.github.com/` entry (which served the `@milaboratory` scope) was removed from `npmrc-config`. All `@milaboratories/*` packages now resolve exclusively from npmjs.org. If any of those packages is published only to GitHub Packages and not to the public registry, the CI build will fail with a 404. Confirm that every `@milaboratories/` package in `pnpm-lock.yaml` is available on npmjs.org before merging.

Reviews (1): Last reviewed commit: "Rename QC column" | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Context used:

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

Full SDK upgrade via block-tools 2.11.0 structure refresh: model/ui-vue/test
1.79.14, workflow-tengo 6.6.3. Adopts the canonical tool-managed layout
(tsconfig, oxlint/oxfmt, turbo, block index, CI workflows, upgrade-sdk script);
removes legacy .prettierrc and the comment-only placeholder test. pnpm pinned
to canonical 9.12.0.

@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 block onto the structurer, performing a full SDK upgrade across multiple packages (block, model, software, test, ui, and workflow). It updates configurations for TypeScript, oxlint/oxfmt, and Turbo, and aligns dependency versions. Feedback on these changes highlights two main points: first, when updating the main entry point in model/package.json to support CommonJS, the exports field should also be updated to include the require key; second, the packageManager field should be removed from sub-packages like block/package.json to prevent version conflicts with the root configuration.

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 model/package.json
Comment thread block/package.json Outdated
Comment thread package.json
The structurer downgraded the root packageManager to its canonical pnpm@9.12.0
but leaves block/package.json untouched, so its stale pnpm@9.14.4 created a
root/sub-package mismatch (Corepack version-mismatch under strict mode). Align
to root, matching the samples-and-data canonical layout.
@julenmendieta julenmendieta merged commit a88a336 into main Jun 22, 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.

1 participant