Skip to content

feat(wes): show run outputs with I/O Schema hints - #615

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

uniqueg merged 33 commits into
feat/io-schemafrom
feat/io-run-output-proposal

Conversation

@uniqueg

@uniqueg uniqueg commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Part of #571
Part of #617

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 and #614 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 #571 for that reason. Of #617 it fixes only the run element's run-id attribute (and makes the run output element safe to define twice, and the run element drop run logs of superseded requests); the other components of #617 stay open.

What it does

Run views show the outputs of a run by the workflow's I/O Schema instead of raw RunLog.outputs.

  • Output normaliser (src/io-schema/outputs.ts): normaliseOutputs(schema, runLog, options) ports the normaliser of profile 0.3.0 (ga4gh_io_schema.outputs) to TypeScript. It finds outputs by name (property name or x-ga4gh-parameter.name, qualified with the WDL entry point), else by x-ga4gh-output-glob among the listed files (Sapporo lists, WESkit filesystem, or options.files); turns CWL File/Directory objects, paths under localDir and relative paths into URIs under outputDir (segments percent-encoded as the profile says); checks every listed entry (absolute paths, ./../empty segments, backslashes, control characters, colon in the first segment, URIs outside outputDir, with query/fragment or encoded /) and reports skipped ones without user information, query and fragment; drops WESkit's presigned S3 URLs; matches globs in polynomial time; handles secondary files and directory outputs; validates the result against outputs (completed runs: kept, non-conformant with errors) or output by output (other final states: invalid outputs removed, partial); reports ambiguous, unconverted, undeclared, unmatchedFiles. Whole-input faults raise NormalisationError; values nested more than 64 levels deep are unconverted. Exported from @elixir-cloud/wes/utils (with FINAL_STATES).
  • Validator: IoSchemaCheck gets an optional validateOutputs(value, output?) (OutputsValidator). The outputs schema is compiled once, through the anchor-aware location URIs of feat(wes): build run requests from I/O Schemas #614, so outputs whose names contain # work too; one output is validated as the only member of the outputs object.
  • ecc-client-ga4gh-wes-run: new properties ioSchema, outputOptions (object, or a function of the run log, also async), outputProvider and allowedSchemes. With a schema and a run in a final state, the Outputs tab shows each output through ecc-client-ga4gh-wes-run-output (titles, descriptions, table viewer, sandboxed HTML viewer, downloads, scheme allow-list), in the schema's order, with local $refs and single branches besides null resolved for display; warnings for partial and non-conformant outputs (with the errors); notices for removed, ambiguous, unconverted and skipped entries; undeclared outputs and unmatched files ("Other files") without descriptions and never as links of their own; outputs not produced are named. A running run says outputs come when it has ended; if normalisation fails, the reason is shown with the raw outputs. Without a schema, the current raw view stays. The normaliser and run-output are loaded on demand, so pages without a schema don't load the validator.
  • run-id attribute (fix: camelCase properties ignore their kebab-case attributes #617): runId now reads the run-id attribute that the docs show (Lit mapped it to runid).
  • Stale run logs dropped: ecc-client-ga4gh-wes-run numbers its getRunLog() requests and ignores the answer (or error) of one that a newer run ID or provider superseded, or whose run ID, provider or base URL was cleared (also a new provider without a run ID); before, a slow answer for the previous run replaced the selected run and its outputs (found by Sourcery on this PR).
  • Run output element defined once: ecc-client-ga4gh-wes-run-output is defined only if no element of that name exists yet (defineRunOutput()), so loading it on demand next to a host that imported it already doesn't throw.
  • Test vectors: scripts/sync-io-schema.mjs also copies the profile's wes-outputs vectors (same pin, 2c3dc49).
  • Docs: "Run outputs" on the I/O Schemas page; "Outputs with an IO schema" and the new properties on the Run page; a note on the define-once behaviour on the Run Output page; on the Run page, which of its settings are properties only, the allowedSchemes default, why the preview adds s3, and that run-id replaces runid; a docs-app demo of the profile's demo workflow (WDL, miniwdl-style local paths) as a completed and as a failed run; changesets.

Open questions of #444 it depends on

  • Q2 (validator): output validation is part of the validator interface (validateOutputs); a replacement validator would have to provide it, else normaliseOutputs() raises a NormalisationError.
  • Q3 (place and name): the normaliser sits in @elixir-cloud/wes next to the checks of feat(wes): add the I/O Schema form (proposal) #613; it would move with them to a shared package. The run view stays in the WES package.
  • Q4 (Markdown): output descriptions follow setDescriptionFormat(), as run-output already does.
  • Defaults of its own, for @anuragxxd: D. ioSchema and outputOptions on ecc-client-ga4gh-wes-run (the host knows where the run's files are; a new options object or function normalises again, so hosts pass a stable one); alternative: a separate outputs element for the existing outputs slot. E. undeclared outputs and unmatched files are shown without descriptions; ambiguous, unconverted and skipped entries only as notices. F. no event with the normalised outputs; a host can call normaliseOutputs() itself.

How it was verified

  • WES package (npm test in packages/ecc-client-ga4gh-wes): 664 tests pass in Chromium and Firefox (19 test files) at b692f05, including all 18 wes-outputs vectors, the normaliser's own cases, validateOutputs (pointers for names with /, #, %, ~; a union under a # name after the merge with feat(wes): build run requests from I/O Schemas #614; undeclared names; schemas without outputs), the run view (raw view kept without a schema, schema order, partial, non-conformant, undeclared and unmatched outputs, notices, running run, fallback to the raw view, stale normalisations dropped, run logs of an earlier or cleared run ID dropped, the run-id attribute) and defineRunOutput() called twice. 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).
  • Merge with feat/io-schema after feat(wes): build run requests from I/O Schemas #614 landed squashed (2254142): the tree is feat/io-schema plus exactly this branch's own files (22 at b692f05); the two validator conflicts were resolved by keeping feat(wes): build run requests from I/O Schemas #614's annotation-schema locations and compiling outputs through its anchor-aware URIs.
  • Reviews: two earlier rounds (adversarial and quality) on the output view; a round of adversarial, quality and contract reviewers on origin/feat/io-schema...HEAD at 3467ff4 (fixed: run logs of a cleared run ID, docs of property-only settings, the s3 opt-in and the run-id rename; declined: below), and a second adversarial round on the fixes (fixed: a new provider with an empty run ID, b692f05).
  • Sourcery's 12 threads of 4 Dec: one fixed (stale run logs, 3467ff4), eleven answered and resolved (reasons in the threads; five follow the reference normaliser and are candidates for changes there first).
  • Root npm run lint (pre-commit hook) passes at b692f05.
  • CI: see the checks of the head commit.

Declined review findings

From the earlier rounds:

  • A new outputOptions object or function normalises again (quality, medium): kept and documented (pass a stable object or function); comparing functions by value isn't possible; a refresh() method belongs to question D.
  • Split outputs.ts into smaller modules (quality, low): left for the split into reviewable PRs, once Q3 is answered.
  • One shared $ref resolver (quality, medium): outputs.ts keeps its own, following the reference implementation (an unresolvable reference keeps the value for validation to report), unlike fields.ts and bindings.ts.
  • References into embedded $id resources aren't followed (adversarial, low): documented on the I/O Schemas page as a difference from the Python reference.
  • Two depth-bounded walkers, MAX_DEPTH in two modules (quality, low): to merge when the module is split.
  • Root-level constraints of outputs aren't checked when one output is validated (quality, low): by design; completed runs validate the whole object.

From the round at 3467ff4:

  • changed.has("run" as keyof …) cast (quality, low): needed because run is a private @state, which PropertyValues<this> doesn't list; a rename fails the tests that watch outputs.
  • Hand-written demo WesProvider in the docs preview (quality, low): no shared demo provider exists to reuse; it is docs-only.
  • run-id changeset is patch (quality and contract): the package is in prerelease, so patch and minor both give the next alpha; the changeset and the Run page name the rename.
  • allowedSchemes without an attribute on the run element (contract, medium): kept property only, like ioSchema, outputOptions and outputProvider (objects and functions), now documented on the Run page; an attribute would move the converter out of run-output, which is on dev already.
  • Raw-output fallback shows WESkit's presigned S3 URLs (adversarial, low): the same raw view as without a schema (not a regression), shown to the user who may read the run log anyway.

The earlier finding that # in names breaks checkIoSchema is fixed by #614's anchors, which this branch now uses for outputs.

🤖 Generated with Claude Code

https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk

uniqueg and others added 22 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>
Port the output normaliser of profile 0.3.0 (ga4gh_io_schema.outputs)
to TypeScript: normaliseOutputs() finds outputs by name, then by
x-ga4gh-output-glob in the run's listing (cwltool, Toil, Cromwell,
miniwdl, Conquest, Sapporo, WESkit shapes), turns reported paths into
URIs of the output directory, checks listed entries, validates the
result (whole object for COMPLETE, per output otherwise) and reports
removed, ambiguous, unconverted, undeclared, unmatched and skipped
entries.

The validator gets an optional validateOutputs(). The sync script
copies the wes-outputs vectors (same pin, 2c3dc49); all pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ecc-client-ga4gh-wes-run gains ioSchema, outputOptions, outputProvider
and allowedSchemes. With a schema and a run that has ended, the Outputs
tab shows the normalised outputs through
ecc-client-ga4gh-wes-run-output, warns about partial and non-conformant
outputs, names what the normaliser reports, and shows undeclared
outputs and unmatched files without descriptions. Without a schema the
raw view stays. The normaliser and run-output load on demand.

Docs: Run outputs on the I/O Schemas page, the run page's new section
and properties, a docs-app demo of the profile's demo workflow, and a
changeset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- validateOutputs validates one output as the only member of the
  outputs object, so names with '#' no longer break checkIoSchema, and
  no extra subschemas are compiled
- the run view passes the default allowed schemes when none are set,
  and resolves $ref and single branches of output schemas for display
- values nested more than 64 levels are refused (unconverted) instead
  of overflowing the validator's stack; strings() is iterative
- reuse encodeSegment from trs.ts; export outputProperties and
  displaySchema; FINAL_STATES from states.ts only
- tests for validateOutputs, deep values, display schemas; docs on
  memoising outputOptions, running runs, embedded $id, the validator
  contract in the changeset

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

Add the normalised-output result, options, reporting types and final-state constants that the normaliser and run view depend on.

  • packages/ecc-client-ga4gh-wes/src/io-schema/outputs.ts L1-132
  • packages/ecc-client-ga4gh-wes/src/io-schema/states.ts L1-13

Extend the IO Schema validator contract with output validation and make the checked schema expose a validator for whole outputs or an individual output.

  • packages/ecc-client-ga4gh-wes/src/io-schema/validator.ts L64-81, L340-346, L644-680 (+5 small edits)

API

Expose the output normaliser, its public result and option types, final states, and the validator interface through the package utilities entry point.

  • packages/ecc-client-ga4gh-wes/src/utils/index.ts L5-6, L17, L56-65

Add run-output configuration properties and correct the public run ID attribute mapping, while preserving the existing raw-output API when no schema is supplied.

  • packages/ecc-client-ga4gh-wes/src/components/run/run.ts L37-51, L68-77

Provide an idempotent, browser-only defineRunOutput() entry point and keep automatic element registration.

  • packages/ecc-client-ga4gh-wes/src/components/run-output/index.ts L6-24

Uses of the API

Make the output element definition safe to invoke repeatedly and verify it does not re-register an existing element.

  • packages/ecc-client-ga4gh-wes/src/components/run-output/tests/run-output.test.ts L5, L89-104

Use checked schema outputs to normalise completed run logs, render output hints and reports, and discard stale normalisation or run-log responses.

  • packages/ecc-client-ga4gh-wes/src/components/run/run.ts L78-89, L116-169, L813-1008 (+12 small edits)

Implementation

Implement output discovery, safe path conversion, glob matching, conformance validation, and structured reports for WES run outputs.

  • packages/ecc-client-ga4gh-wes/src/io-schema/outputs.ts L133-1039

Reuse and export the profile-compatible URI segment encoder needed to build normalised output URIs.

  • packages/ecc-client-ga4gh-wes/src/io-schema/trs.ts L81

UI

Add a docs-app preview that switches between completed and failed sample runs and supplies schema, output-location options and a provider.

  • apps/documentation/components/packages/wes/RunSchemaOutputsPreview.tsx L1-122

Expose the demo run URI for reuse by the schema-aware run preview.

  • apps/documentation/components/packages/wes/runOutputExample.ts L14

Configuration

Extend the IO Schema sync script to generate fixtures for the pinned WES output test vectors.

  • packages/ecc-client-ga4gh-wes/scripts/sync-io-schema.mjs L10-12, L177-229

Documentation

Document output normalisation, safety and conformance behavior, plus the validator requirement and its known limitations.

  • apps/documentation/pages/docs/wes/io-schema.mdx L78-100

Explain schema-aware run outputs, show a live preview and integration example, and document the run properties and run-id attribute change.

  • apps/documentation/pages/docs/wes/components/run.mdx L4, L81-150

Describe the run-output element's browser-only, define-once registration behavior.

  • apps/documentation/pages/docs/wes/components/run-output.mdx L37-38

Tests

Exercise output-vector conformance, path conversion, validation, limits, schema display, glob matching and secondary-file naming.

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

Verify output schema validation, including pointer escaping, whole-object and per-output validation, and permissive undeclared outputs.

  • packages/ecc-client-ga4gh-wes/src/io-schema/tests/validator.test.ts L500-512, L612-677

Test raw and schema-aware run output rendering, notices, fallback behavior, stale normalisations, the run-id attribute and stale run-log invalidation.

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

Add generated fixtures for the pinned profile's WES output vectors.

  • packages/ecc-client-ga4gh-wes/src/io-schema/tests/fixtures/wes-outputs.ts L1-2388

Lock files and vendored code

Record the run-id attribute fix, duplicate-definition protection, schema-aware run outputs and stale run-log fixes in package changesets.

  • .changeset/wes-run-id-attribute.md L1-5
  • .changeset/wes-run-output-define-once.md L1-5
  • .changeset/wes-run-outputs.md L1-5
  • .changeset/wes-run-stale-run-log.md L1-5

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

Values nested too deeply land in unconverted too, so the notice no
longer says their files can't be located.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@uniqueg
uniqueg marked this pull request as ready for review December 4, 2026 12:22
@uniqueg
uniqueg requested a review from anuragxxd as a code owner December 4, 2026 12:22

@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 12 issues

Sourcery assessment

Needs a human reviewer. 12 findings to address first, and with a schema and output provider configured, the new Outputs path passes normalised run-log file URIs to viewers and downloads. If a hostile or unintended URI gets past the output component’s deployment allow-list, it could trigger a fetch or expose a run file; reverting cannot undo a request already made.

Blocking findings: packages/ecc-client-ga4gh-wes/src/components/run/run.ts:819, packages/ecc-client-ga4gh-wes/src/components/run/run.ts:115, packages/ecc-client-ga4gh-wes/src/io-schema/outputs.ts:738, packages/ecc-client-ga4gh-wes/src/io-schema/outputs.ts:517, packages/ecc-client-ga4gh-wes/src/components/run/run.ts:146, and 7 more


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

uniqueg and others added 3 commits December 5, 2026 13:15
Lit maps the runId property to the attribute "runid", so the documented
run-id attribute had no effect. It now maps to run-id, which the docs'
HTML example already uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A second copy of the module (e.g. from a second bundle) made
customElements.define throw. defineRunOutput() defines the element only
in browsers and only if it isn't defined yet, as the service registry's
services element does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from feat/io-run-request-proposal to feat/io-schema December 5, 2026 13:24
uniqueg and others added 2 commits December 5, 2026 14:36
#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>
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 uniqueg changed the title feat(wes): show run outputs with I/O Schema hints (proposal) feat(wes): show run outputs with I/O Schema hints Dec 5, 2026
@codecov

codecov Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.59995% with 54 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.47%. Comparing base (2254142) to head (b692f05).

Files with missing lines Patch % Lines
...ages/ecc-client-ga4gh-wes/src/io-schema/outputs.ts 95.86% 40 Missing and 3 partials ⚠️
...ges/ecc-client-ga4gh-wes/src/components/run/run.ts 96.88% 10 Missing ⚠️
...es/ecc-client-ga4gh-wes/src/io-schema/validator.ts 98.68% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           feat/io-schema     #615      +/-   ##
==================================================
+ Coverage           87.12%   89.47%   +2.34%     
==================================================
  Files                 103      106       +3     
  Lines               34926    38759    +3833     
  Branches             2808     3186     +378     
==================================================
+ Hits                30431    34681    +4250     
+ Misses               4446     4032     -414     
+ Partials               49       46       -3     

☔ 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 5 commits December 5, 2026 14:49
- Split the run-id attribute into its own changeset and say that
  markup using the old runid attribute must switch to run-id.
- Test defineRunOutput() with a spy on customElements.define.
- Say in OutputsValidator what "declared" means (direct properties
  of outputs, as the profile requires) and which rules apply only to
  the whole object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the run ID or provider changed while a getRunLog() request was
pending and that request answered last, the run view showed the
earlier run (and normalised its outputs). Each request now gets a
number, and only the answer to the latest one is used.

Found by Sourcery on #615.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
Clearing the run ID, or the provider and base URL, returned early
without invalidating a pending getRunLog() request, so its answer
still replaced the cleared view. These paths now invalidate it too.

Found by the adversarial and quality reviews of #615.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
The Run page says that ioSchema, outputOptions, outputProvider and
allowedSchemes have no attributes, what allowedSchemes defaults to,
why the preview adds s3, and that run-id replaces runid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
A new provider with an empty run ID returned without invalidating a
pending request of the old provider, and without the "no run ID"
error. Found by the second adversarial review of #615.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
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
@uniqueg
uniqueg merged commit 996177e into feat/io-schema Dec 5, 2026
22 checks passed
@uniqueg
uniqueg deleted the feat/io-run-output-proposal branch December 5, 2026 22:42
uniqueg added a commit that referenced this pull request Dec 5, 2026
#615 landed on feat/io-schema as squash 996177e, whose tree equals
b692f05, the head merged into this branch before. The conflicts come
from the squash only; the resolution keeps this branch's files, so the
tree is unchanged and the PR's diff narrows to its own changes.

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