Skip to content

feat(wes): build run requests from I/O Schemas - #614

Merged
uniqueg merged 30 commits into
feat/io-schemafrom
feat/io-run-request-proposal
Dec 5, 2026
Merged

uniqueg merged 30 commits into
feat/io-schemafrom
feat/io-run-request-proposal

Conversation

@uniqueg

@uniqueg uniqueg commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Part of #570

This merges into the integration branch feat/io-schema, a branch off dev that won't be released, so that the full I/O Schema integration can run in ELIXIR On-Cloud (as #613 did). It was built before the open design questions of #444 are answered; they stay listed below and still steer the work: anything @anuragxxd decides differently gets changed or rolled back on feat/io-schema. The split into reviewable PRs applies to the later step from feat/io-schema into dev, which needs his review. It doesn't close #570 for that reason.

What it does

Krini users can submit a workflow without choosing a workflow type or writing workflow_params: given a TRS tool version, its I/O Schema and the values from the form, the request is built by the profile's engine bindings.

  • Request builder (src/io-schema/bindings.ts): toWorkflowParams() and buildRunRequest() port the engine bindings of profile 0.3.0 for NFL, SMK, WDL and CWL from the profile's reference implementation. They check the schema, validate the values, check every file reference value (also in union branches, if/then/else, contains, unevaluated*), rename inputs by x-ga4gh-parameter (schemas that name different parameters for one input are refused), qualify WDL names with the entry point, turn CWL file values into File/Directory objects, and refuse what Nextflow or the CWL loader would change. Defaults are never inserted. Errors are TranslationErrors with the location of the value. It fails closed on references that don't resolve within the document, on references and branches inside embedded $id resources, and on $dynamicRef. unsupportedBy() checks a service's service-info for the type and version.
  • TRS helpers (src/io-schema/trs.ts): trsDescriptorUrl(), findPrimaryDescriptorPath() and findSchemaFile() (the IO schema among a tool version's files, for krini#47).
  • Engine profiles (src/io-schema/engine-profiles.ts), kept out of the generic builder: conquestEngineProfile sets the GitHub repository as workflow_url and adds revision (full commit SHA) and main_script / snakefile / main_workflow_path from the URL of the TRS primary descriptor. It refuses CWL, branches and tags, as Conquest does.
  • Schema mode of ecc-client-ga4gh-wes-run-create: with ioSchema and trsToolVersion (plus optional engineProfile and allowedSchemes), the form shows the I/O form and the workflow that will run (type, version, URL) instead of the raw fields, says when the service doesn't run the type or version, and submits only valid values. It drops the values of a replaced form, shows a note while service-info loads and doesn't submit when it can't be loaded, and checks duplicate tag keys and that engine parameters are strings. allowedSchemes also comes from an allowed-schemes attribute, as on the I/O form. The I/O form element is loaded on demand (a static import broke the docs app's prerendering). Without ioSchema, raw mode keeps its fields and API; both modes now submit once per click and ignore the service-info answer of a replaced provider (keeping the earlier answer while a new one loads).
  • Validator: IoSchemaCheck gets an optional validateAt(pointer, value) (SubschemaValidator) for the subschemas that decide which schemas apply (anyOf/oneOf branches, if, contains), also under names with #.
  • Test vectors: scripts/sync-io-schema.mjs also copies the profile's wes-params, workflow-urls and trs-files vectors (same pin, 2c3dc49).
  • Docs: "Run requests" on the I/O Schemas page; "Schema mode", "Engine profiles" and corrected event detail types on the Run Create page; a docs-app demo with a dry-run provider; a changeset; exports (with TrsToolVersionRef) in @elixir-cloud/wes/utils.

Open questions of #444 it depends on

  • Q2 (validator): the builder needs subschema checks, so validateAt() is part of the validator interface; a replacement validator would have to provide it, else buildRunRequest() refuses to run.
  • Q3 (place and name): the builder, TRS helpers and engine profiles sit in @elixir-cloud/wes next to feat(wes): add the I/O Schema form (proposal) #613's checks; they would move with them to a shared package.
  • Q6 (event payload): run-create uses values and valid of ecc-io-form-changed.
  • Defaults of its own, for @anuragxxd: A. one trsToolVersion object, with the host fetching schema and TRS data (krini#47); B. a small EngineProfile interface with one built-in profile for Conquest; C. without descriptor_type_version in the schema, the first version of the TRS tool version that the service runs is used.

How it was verified

  • WES package (npm test in packages/ecc-client-ga4gh-wes): 588 tests pass in Chromium and Firefox, including all wes-params, workflow-urls and trs-files vectors and 26 run-create tests (new: double click, a context change while preparing, a replaced form after an earlier submission, a service-info timeout, replaced schema, duplicate tags, non-string engine parameters, loading, missing and stale service-info, the allowed-schemes attribute, version choice, declared descriptor path, engine parameter merge and engine profile refusal). The tests of the double click, the replaced schema and the stale service-info were checked to fail without their fix. WebKit can't launch on the agent host, so it runs in CI only.
  • Root npm run lint (pre-commit hook: builds all packages and the docs app, ESLint errors 0).
  • Reviews on origin/feat/io-schema...HEAD: adversarial, quality and contract, then a second adversarial and quality round on the fixes (no high or medium findings left). The adversarial review probed the file reference check with bundled Node probes and found no bypass.
  • CI: green at cad6fa1 (run 47522129149: PR title, conflict markers, lint, tests on Node 22 and 24, CI passed); Read the Docs preview built.

Review findings fixed

  • Sourcery: re-entry guard on submit; stale form values after a schema change; service-info race and failure; duplicate tags and non-string engine parameters in schema mode; the contains and forbidden-scheme tests could pass without the check; the schema-mode tests raced the form's on-demand load.
  • Quality: tests for the version choice, the declared descriptor path, the engine parameter merge and engine profile refusals; TrsToolVersionRef exported from the utils; changeset names the public types; event detail types in the docs; the allow-list check throws a TranslationError.
  • Adversarial: conflicting x-ga4gh-parameter names for one input were resolved by order (now refused); a false "couldn't be loaded" alert before the first service-info request, and a new provider object clearing service-info (now a note while loading, the earlier answer kept).
  • Contract: PR title within 50 characters; the allowed-schemes attribute; unsupportedBy listed apart from the TRS helpers and raw-mode changes named in the changeset; an HTML example of schema mode.
  • Sourcery re-review on ca3b63e (fix iteration 1): a submission is not sent when its context (schema, TRS tool version, engine profile, allowed schemes, provider) changes while it is prepared, and a run submitted meanwhile doesn't reset the replaced form; service-info gives up after serviceInfoTimeout (30 s); a new request forgets an earlier failure; values nested more than 64 levels deep are a TranslationError before any recursive walk; the Conquest profile refuses a request whose workflow_type isn't the context's descriptor type.
  • Second quality round: TrsToolVersionRef moved to io-schema/trs.ts (the utils no longer import the component), @fires lines name the detail types, sharper tests.
  • The validator location logic for names with # (from a local fix branch) was already in feat(wes): add the I/O Schema form (proposal) #613; its remaining test case (validateAt at deciding locations under such names) is added here.

Declined review findings

  • findPrimaryDescriptorPath() should refuse several primary descriptors (Sourcery): declined, the profile's trs-files vector primary-descriptors-in-one-directory requires the first one. Hosts that know the path pass primaryDescriptorPath.
  • An empty workflow_type_version list should count as unsupported (Sourcery): declined, it is deliberately read as "any version" (tested); the WES service still checks the request.
  • ReDoS by schema patterns (Sourcery): declined here, the same patterns already run in the I/O form's validation (feat(wes): add the I/O Schema form (proposal) #613); bounding regex evaluation is a validator-level question (Q2).
  • Engine parameters must be strings in raw mode too: left as it is on dev; schema mode checks it.
  • Compute schemaRun() once per update (low, quality) and a shared isObject helper (low): deferred to the split into dev.
  • A test for the failed on-demand import of the I/O form (quality): not testable without module mocking in WTR; the behaviour is documented.

Merge gate

CI green and bot threads resolved; merged (squash) into feat/io-schema by the main session (allowed without the co-owner's review for this branch).

🤖 Generated with Claude Code

uniqueg and others added 19 commits December 3, 2026 07:20
Bundle the GA4GH IO Schema Profile 0.3.0 (meta-schema and vocabularies,
pinned at ga4gh-io-schema 2c3dc49, the pin of #609) and check IO schemas
offline: $schema names the profile, the meta-schema passes with format
assertion, and every $ref resolves within the document. A valid schema
comes with a validator of its input values, whose errors carry JSON
Pointers, the failed keyword and a message.

The validator is @hyperjump/json-schema (no 'unsafe-eval' needed),
behind the internal IoSchemaValidator interface, so that the component
owner can swap it (open question 2 of #444).

scripts/sync-io-schema.mjs copies the profile, its conformance suite,
file-value vectors and example schemas from a checkout at the pin. The
tests run the whole conformance suite and the examples offline.

The test runner now takes the browser builds of dependencies and serves
the CommonJS dependencies of hyperjump (content-type, idn-hostname,
punycode) as modules with their named exports.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the URI check of run-output into a shared module
(src/io-schema/files.ts) and add the input rules of the profile: paths
only where the file reference has no `schemes`, no `..` segments (also
percent-encoded), no leading `~` or two slashes, absolute paths only
where allowed, and `schemes` narrowing the deployment's allow-list.
run-output keeps its behaviour and re-exports the shared helpers.

The tests run the profile's file-value vectors (33 cases).

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add one renderer for the profile's Markdown subset, on markdown-it:
raw HTML as escaped text, images as their alt text, links only with an
allowed scheme (else their text; they open in a new window without
referrer), and of GFM only tables, strikethrough and autolinks (www.
and bare URLs, not bare host names). It produces the profile's example
HTML exactly. Its output is the only HTML that goes through unsafeHTML.

Descriptions stay plain text by default, as the proposal's default for
open question 4 of #444: setDescriptionFormat("markdown") switches the
components to Markdown. run-output takes its descriptions from the same
template, unchanged by default.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add ecc-client-ga4gh-wes-io-form. It checks the IO schema offline,
describes its inputs as field descriptors (schema -> descriptors ->
controls) and renders them with the design components by type, format
and enum: text, number, checkbox, select, date, time, date-time,
groups for objects and JSON for the rest. Defaults are prefilled,
unset inputs are left out, and every change emits
ecc-io-form-changed with {values, valid, errors}.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review findings on the schema checks:

- An embedded $id that collides with a schema in use (e.g. the
  profile) is refused without unregistering that schema; the profile
  is registered again if something removed it; checks never reject.
- Documents are registered under their own absolute $id, so
  references by it resolve; embedded $ids are resolved against their
  resource, so error locations point into embedded resources.
- References in outputs and top-level $defs must resolve, too.
- Checks run one after the other (hyperjump's registry is global).

Also export the checks, the validator switch and the description
format from @elixir-cloud/wes/utils, and document them.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Choose controls by x-ga4gh-ui-widget where the widget fits the schema
that carries it (UI widgets, Rules): textarea, slider with bounds and
step, multiple choice for arrays with items.enum, tags one per line,
typeahead with examples as suggestions, colour picker. Radio and
switch render as dropdown and checkbox, as the profile allows. Misfit,
custom and viewer widgets fall back to the type. Nullable inputs get a
null toggle.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review findings on the form:

- A schema that refers to itself twice per level expanded to 2^33
  fields and froze the tab: references already on the path become JSON
  inputs, and groups stop expanding at 1000 fields.
- References inside embedded resources ($id) aren't followed, as they
  resolve elsewhere; such inputs are edited as JSON.
- Inputs named constructor or prototype can be set; only __proto__
  is ignored. Missing required inputs with such names show at the input.
- Control ids are unique per pointer.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
File references (x-ga4gh-file, also as a branch of anyOf/oneOf such as
CWL's [File, string]) get a text field for a URI or relative path.
Values are checked by the profile's file rules against allowedSchemes,
narrowed by the reference's schemes, and make the form invalid when
refused; refused defaults aren't prefilled. Changing allowedSchemes
re-validates.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
x-ga4gh-error-message replaces the validator's messages of the
failures at the value its schema applies to, once per location; the
outermost message wins (the input's own over its $ref target's).
Hidden inputs go under a collapsed Advanced section, except inputs
that must be set and inputs whose values fail.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Arrays with items get a list editor: a field per item (objects, file
references and widgets included), Add and Remove within minItems and
maxItems; a cleared item stays in the list, empty. Unions (anyOf or
oneOf without a type) get a branch chooser, by title or type, that
renders the chosen branch; the branch is guessed from the value's type
at first. Other arrays (prefixItems) stay JSON.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Branches of allOf with properties (after a local $ref), such as
nf-core's parameter groups, become sections of their object with the
branch's title and description; their required lists apply to their
fields, and their defaults are prefilled. The docs demo gets the
profile's nf-core/fetchngs schema.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quality review: aria-labels on selects, multi-selects, checkboxes and
the null toggle; list buttons name their list; suggestions form a
labelled group; the slider value is announced. Tests for the
allowed-schemes attribute and for new values. Docs: slider steps,
null toggle, required marker, attribute format.

Part of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adversarial review of S5-S9:
- File reference values are checked by walking the values along the
  inputs schema, not the controls: union branches the form doesn't
  show, tags, prefixItems, patternProperties and additionalProperties
  are covered too (high).
- allOf sections stop at the field cap (exponential nesting by $ref).
- Removing a list item moves the pointer-keyed state of later items.
- Live fields are computed once per state; errors find their field by
  pointer instead of a scan.
- A required list stays when its last item is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Second review round of the schema walk of file values:
- In a union, a string that a branch without a file reference takes
  (type, const, enum, pattern) isn't checked as a file reference, so
  presets and free text next to a file branch stay valid.
- The walk keeps the schema nodes seen per value location: linear in
  the schema size instead of exponential in branching references, with
  a node budget that fails closed.
- Refused list defaults are removed last first, so later items don't
  shift into their place.
- then/else, dependentSchemas, unevaluatedProperties/Items and contains
  are walked too.
- Values nested deeper than 64 levels are refused instead of skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the engine bindings of the GA4GH IO Schema Profile 0.3.0 (NFL,
SMK, WDL, CWL) from the profile's reference implementation:
toWorkflowParams() and buildRunRequest() check the schema, validate the
values, check file references and translate the values; trs.ts builds
the TRS workflow URL and finds the schema among a tool version's files.

The sync script now also copies the wes-params, workflow-urls and
trs-files test vectors, which the tests run. The validator gains an
optional validateAt() for the subschemas whose validity decides which
schemas apply (anyOf/oneOf branches, if, contains).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Engine profiles turn the generic run request into one for a particular
WES server, kept out of the builder. conquestEngineProfile sets the
GitHub repository as workflow_url and adds revision and the main
workflow path (main_script, snakefile or main_workflow_path) from the
URL of the primary descriptor at a full commit SHA.

Also declare SubschemaValidator and the optional validateAt() on
IoSchemaCheck, which the previous commit used without the type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With ioSchema and trsToolVersion, ecc-client-ga4gh-wes-run-create shows
the workflow's I/O form instead of the raw fields, says when the WES
service doesn't run the workflow's type or version, and submits the
request built by the engine bindings, adapted by an optional engine
profile. The raw mode stays. The I/O form is loaded on demand: a static
import broke the docs app's prerendering of the I/O form page.

Export the builder, TRS helpers and engine profile from
@elixir-cloud/wes/utils; document them; add a docs-app demo with a
dry-run provider; add a changeset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Fail closed on $ref targets in or under embedded $id resources: they
  resolve their own references against their $id, so following the
  document could skip file reference checks.
- Build workflow_params from entries, so a member named __proto__ stays
  a key.
- Tighten the Conquest URL parser: no '.' or '..' owner or repository
  names, control characters, backslashes or segments starting with '-'.
- Require engine parameters to be a JSON object in schema mode; load
  the I/O form with an error message if its chunk fails; build tags and
  attachments once.
- Test decidingLocations() and validateAt(); export fewer internals;
  document the version fallback and the error text of schema mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wrap validateAt() failures for conditional subschemas behind a $ref
into a non-schema location in a TranslationError, and refuse Unicode
format and separator characters and whitespace-padded segments in
Conquest descriptor paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Data structures

Define the public request-building, translation, engine-profile, TRS-reference and subschema-validator types that the implementation and callers depend on.

  • packages/ecc-client-ga4gh-wes/src/io-schema/bindings.ts L44-91
  • packages/ecc-client-ga4gh-wes/src/io-schema/engine-profiles.ts L1-32
  • packages/ecc-client-ga4gh-wes/src/io-schema/trs.ts L1-41, L189-209
  • packages/ecc-client-ga4gh-wes/src/io-schema/validator.ts L55-76

API

Expose the run-request builders, compatibility check, TRS helpers, engine profile and validator extensions through the package utilities and the run-create component's schema-mode properties and events.

  • packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts L45-59
  • packages/ecc-client-ga4gh-wes/src/utils/index.ts L3-5, L17, L31-53

Provide the public builder and TRS helper functions, including their validation and workflow-URL contracts.

  • packages/ecc-client-ga4gh-wes/src/io-schema/bindings.ts L187-198, L696-787
  • packages/ecc-client-ga4gh-wes/src/io-schema/trs.ts L42-188

Implementation

Implement schema validation, conditional subschema traversal, engine-binding translation, file-value checks, and WES request compatibility decisions.

  • packages/ecc-client-ga4gh-wes/src/io-schema/bindings.ts L1-43, L92-186, L199-695 (+1 small edits)

Implement Conquest request adaptation and strict parsing of supported GitHub descriptor URLs.

  • packages/ecc-client-ga4gh-wes/src/io-schema/engine-profiles.ts L33-143

Add subschema-location discovery and compiled validateAt support to the IO schema validator.

  • packages/ecc-client-ga4gh-wes/src/io-schema/validator.ts L315-357, L559-563, L601-608 (+1 small edits)

Make schema-mode run creation resolve workflow metadata, validate form and engine parameters, build and adapt one request per submission, and guard against stale providers or replaced inputs.

  • packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts L149-175, L301-378, L543-606 (+17 small edits)

UI

Render the schema-derived workflow summary and I/O form in schema mode while retaining the raw-mode form and adapting submit-button availability to schema validity and service support.

  • packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts L720-761, L1068-1071, L1104-1108

Add an interactive documentation preview that uses a dry-run WES provider to display the built request without submitting a real workflow.

  • apps/documentation/components/packages/wes/RunCreateSchemaPreview.tsx L1-102

Configuration

Extend the IO Schema synchronization script to generate fixtures for engine-binding, workflow-URL and TRS-file vectors.

  • packages/ecc-client-ga4gh-wes/scripts/sync-io-schema.mjs L10-11, L128-209

Record the WES package minor release and summarize the new schema-based run-request capability.

  • .changeset/wes-run-requests.md L1-5

Documentation

Document schema-mode usage, its properties and events, engine profiles, and the request-builder and TRS helper behavior and limits.

  • apps/documentation/pages/docs/wes/components/run-create.mdx L16-19, L78-164 (+2 small edits)
  • apps/documentation/pages/docs/wes/io-schema.mdx L9, L54-77

Tests

Cover builder translations and errors, binding extraction, WES service compatibility, run-request construction, and Conquest engine-profile behavior.

  • packages/ecc-client-ga4gh-wes/src/io-schema/tests/bindings.test.ts L1-505
  • packages/ecc-client-ga4gh-wes/src/io-schema/tests/engine-profiles.test.ts L1-100

Test schema-mode rendering and submission, validation failures, provider and form replacement races, timeout behavior, and version and descriptor-path selection.

  • packages/ecc-client-ga4gh-wes/src/components/run-create/tests/run-create.test.ts L1-532

Test deciding subschema locations and validateAt behavior, including schema paths containing hash characters.

  • packages/ecc-client-ga4gh-wes/src/io-schema/tests/validator.test.ts L5, L362-412, L480-499

Verify TRS descriptor URL construction, schema-file discovery, primary descriptor lookup, and path normalization against the profile vectors.

  • packages/ecc-client-ga4gh-wes/src/io-schema/tests/trs.test.ts L1-84

Lock files and vendored code

Add generated profile test-vector fixtures for WES parameter translation and TRS workflow URLs and files.

  • packages/ecc-client-ga4gh-wes/src/io-schema/tests/fixtures/trs.ts L1-688
  • packages/ecc-client-ga4gh-wes/src/io-schema/tests/fixtures/wes-params.ts L1-1685

Other changes

Files not grouped.

  • apps/documentation/pages/docs/wes/components/run-create.mdx L171

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

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.

Hey - I've found 13 issues

Sourcery assessment

Needs a human reviewer. 13 findings to address first, and a faulty input binding or engine-profile adaptation can submit a workflow with unintended parameters or source to the WES service. Reverting prevents future submissions but cannot stop a job already launched or undo effects and outputs it produced.

Blocking findings: packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts:565, packages/ecc-client-ga4gh-wes/src/io-schema/bindings.ts:460, packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts:173, packages/ecc-client-ga4gh-wes/src/io-schema/trs.ts:66, packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts:295, and 8 more


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Base automatically changed from feat/io-form-proposal to feat/io-schema December 4, 2026 15:54
#613 was squash-merged (eb80e24); conflicts resolved as a 3-way
merge against the old base 8f06592. deciding locations now compile
through the location logic (uriFor). WIP: tests not yet run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.19797% with 71 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.20%. Comparing base (eb80e24) to head (cad6fa1).

Files with missing lines Patch % Lines
...ges/ecc-client-ga4gh-wes/src/io-schema/bindings.ts 95.29% 36 Missing and 1 partial ⚠️
...-ga4gh-wes/src/components/run-create/run-create.ts 90.25% 33 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           feat/io-schema     #614      +/-   ##
==================================================
+ Coverage           85.11%   87.20%   +2.09%     
==================================================
  Files                  98      103       +5     
  Lines               31011    34926    +3915     
  Branches             2439     2811     +372     
==================================================
+ Hits                26394    30457    +4063     
+ Misses               4572     4425     -147     
+ Partials               45       44       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

uniqueg and others added 8 commits December 4, 2026 17:56
The validator already reaches subschemas under names with '#' (anchor
logic from #613). Port the remaining case of c35be77: validateAt at the
deciding subschemas (anyOf, oneOf, if, contains) under such names, in
inputs and outputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema mode of run-create submits once per click (re-entry guard),
drops the values of a replaced form, ignores service-info answers of
a replaced provider, refuses to submit without service-info, and
checks duplicate tag keys and string engine parameters as raw mode
does. Tests cover the version choice, the declared descriptor path
and engine profiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schemas that apply to one input and name different engine parameters
were resolved by expansion order; they are now a TranslationError at
the input. A forbidden scheme on the allow-list is a TranslationError
too, and the contains and allow-list tests can no longer pass on a
fulfilled promise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the new submission checks, correct the detail types of
ecc-run-submitted and ecc-run-create-failed, export TrsToolVersionRef
from the utils and name the public types in the changeset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Say that references by $anchor or to the bare $id are refused, and
that conflicting parameter names for one input are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The utils entry point no longer imports from the component module; the
component re-exports the type. The @fires lines name the detail types,
and the replaced-schema, descriptor-path and profile-refusal tests
assert what the component does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema mode showed a "couldn't be loaded" alert before the first
service-info request started, and cleared the service-info whenever the
provider was replaced. It now shows a neutral note until a request
fails, keeps the earlier answer while a new one loads (submission stays
off while loading), and run-create takes allowedSchemes from an
allowed-schemes attribute, as the I/O form does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also say to keep the provider stable, document the allowed-schemes
attribute, list unsupportedBy apart from the TRS helpers and say what
changes for raw mode in the changeset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@uniqueg
uniqueg marked this pull request as draft December 5, 2026 02:24
@uniqueg uniqueg changed the title feat(wes): build run requests from I/O Schemas (proposal) feat(wes): build run requests from I/O Schemas Dec 5, 2026
@uniqueg
uniqueg marked this pull request as ready for review December 5, 2026 02:36
@uniqueg

uniqueg commented Dec 5, 2026

Copy link
Copy Markdown
Member Author

@sourcery-ai review

@sourcery-ai sourcery-ai Bot left a comment

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.

Hey - I've found 6 issues

Sourcery assessment

Needs a human reviewer. 6 findings to address first, and if the schema translation or engine profile builds the wrong request, the WES service can receive unintended parameters or file references and start a workflow with them. Reverting stops future submissions through this mode, but cannot retract a run that has already started or undo effects it produced.

Blocking findings: packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts:596, packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts:223, packages/ecc-client-ga4gh-wes/src/io-schema/bindings.ts:524, packages/ecc-client-ga4gh-wes/src/io-schema/bindings.ts:142, packages/ecc-client-ga4gh-wes/src/io-schema/engine-profiles.ts:12, and 1 more


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

uniqueg and others added 2 commits December 5, 2026 13:51
A submission takes the provider and engine profile when it starts, and
isn't sent if the schema, TRS tool version, engine profile, allowed
schemes or provider change while it is prepared; a run submitted
meanwhile doesn't reset the replaced form. service-info gives up after
serviceInfoTimeout (default 30 s) and a new request forgets an earlier
failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Values nested more than 64 levels deep are a TranslationError before
any recursive walk, so deep inputs can't overflow the stack. The
Conquest engine profile refuses a request whose workflow_type isn't the
context's descriptor type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@uniqueg
uniqueg merged commit 2254142 into feat/io-schema Dec 5, 2026
22 checks passed
@uniqueg
uniqueg deleted the feat/io-run-request-proposal branch December 5, 2026 13:24
uniqueg added a commit that referenced this pull request Dec 5, 2026
#614 landed squashed (2254142); this branch carried its pre-squash
commits. The tree is feat/io-schema plus this branch's own changes.
Validator: the outputs schema is compiled once, as validateOutputs,
through the anchor-aware location URIs of #614 (names with '#'),
and the annotation-schema locations of #614 stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uniqueg added a commit that referenced this pull request Dec 5, 2026
Guards the merge with #614: the outputs schema is compiled through the
anchor-aware location URIs, so outputs whose names contain '#' and use
a union validate as a whole and one by one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uniqueg added a commit that referenced this pull request Dec 5, 2026
Brings this branch onto #615's head (b692f05), which already holds
the squashed #613 and #614, so that the PR into feat/io-schema shows
only the task list once #615 has merged. invalidateRunLog() of #615
now also resets the task list and cached logs, so a cleared run ID
doesn't keep the tasks of the previous run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
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