Skip to content

Julenmendieta/milab 6505 user error - #61

Merged
julenmendieta merged 7 commits into
mainfrom
julenmendieta/MILAB-6505_userError
Aug 31, 2026
Merged

julenmendieta merged 7 commits into
mainfrom
julenmendieta/MILAB-6505_userError

Conversation

@julenmendieta

@julenmendieta julenmendieta commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces a versioned block-kind contract and template parameter round-trip, adds the selected target column to generated labels and output traces, and upgrades the supporting Platforma SDK toolchain.

  • BlockParams — Optional initialization parameters accepted from block templates; newly defined and runtime-validated in the kind package.
  • Settings — Matching mode plus identity and coverage thresholds; moved to the kind-level contract and reused by the model.
  • Modality — The antibody_tcr or peptide dataset classification; moved to the shared kind contract and retained in templates to preserve modality-aware defaults.
  • BlockData — Persisted editable state for the block; extended with targetColumnLabel and initialized from template parameters.
  • targetColumnLabel — Display label for the selected target sequence column; newly persisted, included in templates, and added to default block labels.
  • templateParams — Portable projection of persisted block state; newly exports configuration while omitting machine-local upload handles and their dependent file fields.
  • Block kind — Versioned runtime identity and initialization contract for the block; added as a new workspace package and wired into the model.
  • Trace label — User-facing provenance label attached to exported results; now consistently uses the custom block label or model-derived default label.

Confidence Score: 4/5

The template settings guard should enforce supported threshold bounds before this PR is merged, because invalid template values currently reach the alignment workflow.

The new runtime initialization contract checks threshold types but not the same 0.1–1.0 bounds enforced by the UI, allowing template-created configurations to pass unsupported values into alignment processing.

Files Needing Attention: kind/src/index.ts

Important Files Changed

Filename Overview
kind/src/index.ts Adds the versioned initialization contract, but its settings guard permits threshold values outside the range supported by the UI and workflow.
model/src/index.ts Wires the block kind into the model, initializes and exports template parameters, and derives labels containing the target-column label.
model/src/types.ts Reuses kind-owned Settings and Modality types and extends persisted state with the target-column label.
ui/src/pages/MainPage.vue Uses the shared label derivation and mirrors the selected target option's display label into persisted state.
workflow/src/build-outputs.tpl.tengo Simplifies trace labeling to use the custom label or the model-derived default.
workflow/src/main.tpl.tengo Removes the now-unused matching settings from output-template inputs.
pnpm-workspace.yaml Registers the kind workspace and upgrades the SDK and builder catalog versions needed for block-kind support.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  T[Template parameters] --> K[Block kind parser]
  K --> D[Initialized BlockData]
  UI[Vue configuration UI] --> D
  D --> A[Validated workflow arguments]
  D --> L[Derived block label]
  A --> W[Assay workflow]
  L --> W
  W --> O[Tables, linker, and traced export]
  D --> P[Portable templateParams]
  P --> T
Loading

Fix all with Greploop Fix All in Claude Code

Reviews (1): Last reviewed commit: "Changeset" | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Context used (5)

Comment thread kind/src/index.ts
Comment on lines +95 to +99
const isSettings: Guard<Settings> = (v): v is Settings =>
isPlainObject(v) &&
isNumber(v.coverageThreshold) &&
isNumber(v.identity) &&
SIMILARITY_TYPES.includes(v.similarityType as Settings["similarityType"]);

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 Threshold bounds are unenforced

When a hand-written or externally generated template supplies identity or coverageThreshold outside 0.1–1.0, isSettings accepts it and the model forwards it unchanged to alignment processing, causing invalid matching behavior or a failed run.

Suggested change
const isSettings: Guard<Settings> = (v): v is Settings =>
isPlainObject(v) &&
isNumber(v.coverageThreshold) &&
isNumber(v.identity) &&
SIMILARITY_TYPES.includes(v.similarityType as Settings["similarityType"]);
const isSettings: Guard<Settings> = (v): v is Settings =>
isPlainObject(v) &&
isNumber(v.coverageThreshold) &&
v.coverageThreshold >= 0.1 &&
v.coverageThreshold <= 1 &&
isNumber(v.identity) &&
v.identity >= 0.1 &&
v.identity <= 1 &&
SIMILARITY_TYPES.includes(v.similarityType as Settings["similarityType"]);

Knowledge Base Used: Assay domain model

Fix in Claude Code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

agree

@julenmendieta
julenmendieta merged commit 828228e into main Aug 31, 2026
10 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