MILAB-6810: migrate onto the structurer + add block kind - #3
Merged
Conversation
Full SDK upgrade via the canonical upgrade-sdk flow (block-tools 2.14.3, tengo-builder 4.0.23, model 1.83.0, ui-vue 1.83.3) plus the structure refresh output. Scaffolds the kind/ package the structurer now requires -- its contract lands in the next commit.
BlockParams is the dataset pick plus the species -- the two fields .args() requires, and the only ones a user sets by hand. datasetLabel is derived by the UI from the picked option, and the table / distribution-chart state is view state; neither is configuration a template carries. init now consumes params (each field keeping its default fallback) and .templateParams projects the same two fields back, so export and apply stay inverses. SPECIES_OPTIONS moves into the kind and is re-exported from the model, so the contract and the UI dropdown cannot name different sets.
…g via the model SPECIES_OPTIONS lives in the kind; the model was re-exporting it purely so MainPage.vue could reach it. The UI can depend on the kind package itself, so the pass-through goes away and each consumer imports from the definition. BlockData.species now names the kind's Species type directly rather than deriving it from typeof SPECIES_OPTIONS.
A project template seeds inputAnchor alone -- datasetLabel is derived from the picked option, so the kind's contract leaves it out and a seeded block rendered its subtitle with the species but no dataset name. A watcher now fills it once the options resolve, from the same lookup the picker uses. Cosmetic only: unlike clonotype-convergence, args does not read the label, so a seeded block was always runnable.
Five things, all found by re-reading docs/column-access-api.md and the 2026-05-20 column-access migration. Exact matchers instead of bare strings. A bare string in a selector normalises to a REGEX -- unanchored, with '.' as a wildcard -- and PGEN_NAME was used as the include for primaryColumns and the exclude for the rest, so a future column carrying it as a prefix would land in both. No collision today (minlog10GenerationProbability does not match), so this is latent. ColumnsCollection instead of AccessorColumnsProvider. Providers are plumbing; pgenTable in the same file already used the collection. Name filtering moved host-side in pgenGraphPf and pgenGraphPfCols. Both read getSpec (and getData) for every column in the pframe and then dropped the non-Pgen ones in JS. Now only the survivors pay a round trip. isDataColumn guards both PColumn bridges. PColumn.id and PColumnIdAndSpec.columnId are PObjectId slots, which only a bare leaf carries -- true here by source, now true by construction. inputOptions labels survivors only. deriveColumnOptions reads the spec of every entry handed to it, so passing the unfiltered collection re-read the columns the scorability check had just discarded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the block onto the structurer and takes the full SDK upgrade that the
require-latestCI gate forces.What changed
SDK upgrade + structure refresh (
fd1da35) — the canonicalupgrade-sdkflow: block-tools 2.12.9 → 2.14.3, tengo-builder 4.0.20 → 4.0.23, model 1.83.0, ui-vue 1.83.3. The refresh reported 8 structural changes (kind configs, plus managedpackage.jsonacross block/model/kind/workflow/software).structure checkis now a fixpoint.Block kind (
4f49236) — the structurer hard-fails a kind-less block (declares no kind — every block must have a sibling kind/ package), so this addskind/.The init-params contract is
inputAnchor+species: the two fields.args()requires, and the only ones a user sets by hand. Left out deliberately:datasetLabel— derived by the UI from the picked option's label, not user input.tableState/distributionGraphState— view state.initnow consumesparams(every field keeping its default fallback, since a block may init without a template) and.templateParamsprojects the same two fields back, so export and apply stay inverses.SPECIES_OPTIONSmoves into the kind and is re-exported from the model — the kind cannot import from the model, and duplicating the list would let the contract and the UI dropdown drift apart.Notes
BlockParams.inputAnchoris declaredstringto match the model'sBlockData, but the parser checks it with the SDK'sisColumnUniversalId. Every value the picker can produce is aderiveColumnOptionsid, so the stricter runtime check matches reachable states without pulling the UI'sselectDatasetinto a retype.kind/is private and never npm-published; its content reaches consumers through thekinds/registry tree.model.jsonrecords…generation-probability.kind@1.0.0.Verification
pnpm build:dev-no-software— 12/12 green (model, ui, workflow, kind, block; type + lint + format checks included).block-tools structure check— up to date, 0 changes.Greptile Summary
The PR upgrades the Platforma SDK and workspace structure, introduces the mandatory block-kind package, and adds a template initialization contract for dataset and species settings. It also refreshes package metadata and enables CI enforcement that changesets bump the published block package.
inputAnchorandspecies.BlockParams) — settings that templates can supply when creating a block; introduced with optional dataset-anchor and species fields.inputAnchorandspeciesconsumed during initialization.isColumnUniversalId.humanormouse); its options move into the kind package and are re-exported by the model.Confidence Score: 5/5
The PR appears safe to merge because no concrete blocking or independently actionable non-blocking defect was established.
The kind, model initialization, template projection, package graph, and release-gate changes are internally aligned, and the investigated packaging and identifier-validation concerns lacked a demonstrated reachable failure.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR T[Project template] -->|inputAnchor and species| K[Block kind parser] K -->|validated BlockParams| M[Block model initialization] M --> A[Workflow arguments] M -->|templateParams| T M --> P[Generated model manifest] P --> B[Packaged block] B --> R[Platforma registry and runtime]Reviews (1): Last reviewed commit: "MILAB-6810: changeset" | Re-trigger Greptile
Context used (4)