Skip to content

fix(ui-react): load the thread execution pipeline from Hasura (#104) - #105

Merged
mosoriob merged 1 commit into
developfrom
fix/104-thread-execution-data
Aug 9, 2026
Merged

fix(ui-react): load the thread execution pipeline from Hasura (#104)#105
mosoriob merged 1 commit into
developfrom
fix/104-thread-execution-data

Conversation

@mosoriob

@mosoriob mosoriob commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Closes #104. Unblocks #92.

The fault

threadExecutionData started null in MintThread, no query ever loaded it, and both
setters bailed out on null. Parameters, Runs and Results were fed an empty object, so
the wizard dead-ended at Parameters with Please select model(s) first. and no Continue
button.

The Datasets step was a stub too — the issue did not name this. It sent
UpdateThreadData with data: [] and modelIO: [], and that mutation deletes every
binding for the thread before it inserts. Continue destroyed the bindings rather than
writing them.

What this does

  • GetThreadExecution loads models with their catalog I/O, data and parameter bindings,
    dataslices and execution summaries. threadExecutionFromGQL maps them, mirroring the
    Lit adapters in ui/src/util/graphql_adapter.ts.
  • DatasetsStep persists dataslices and thread_model_io, and seeds itself from what is
    already bound.
  • UpdateThreadParameters writes thread_model_parameter and the execution summaries, so
    the Runs step has something to submit. Byte-for-byte Lit's update-parameters.graphql.
  • handleFetchRuns queries executions for a thread model. The summary is polled while
    runs are in flight and the poll stops when they land.
  • The wizard rail and each step now share one completion predicate, so they cannot disagree.

buildThreadModels and the whole-catalog model-tree query are gone from MintThread
the per-thread query supplies the same inputs.

Three defects found while wiring it

Resource ids were a djb2 hash where Lit writes MD5 of the URL TACC's rows carry the MD5. This app would have stored a second row for a file the deployment already had. Now ts-md5, checked against a live TACC dataslice.
execution.run_progress is a fraction, not a percentage The progress bar drew a completed run as a 1%-wide sliver.
total_runs counted parameter values only A run is one combination of input resources and parameter values. A 6-file dataslice is 6 runs — which is what TACC's own summaries hold.

parametersComplete now also requires an execution summary: a model with no adjustable
parameters satisfied the binding test vacuously and read done before the step had written
anything.

Verification

852 tests green, lint clean, build clean.

Both new read documents were run live against TACC's Hasura: the whole thread_models
subtree, every thread_model_execution_summary column, and the executions query, which
returned a real run. thread.thread_data and dataslice.dataset are user-role-only, so
those two hops and every write are not yet verified live — that needs a signed-in walk.

Corrects docs/adr/0002, which listed parameters/runs/results as ported.

The Parameters, Runs and Results steps were stubs. threadExecutionData
started null in MintThread, no query ever loaded it, and both setters
bailed out on null, so the steps were fed an empty object. Parameters
showed "Please select model(s) first." with no Continue button, Runs and
Results never unlocked, and a satisfied Datasets step still read Pending
because datasetsComplete read the same dead field.

The Datasets step was a stub too, which the issue did not name: it sent
UpdateThreadData with empty `data` and `modelIO`, and that mutation
deletes every binding for the thread first. So Continue destroyed the
bindings instead of writing them, and the assignment did not survive a
reload.

- GetThreadExecution loads models, ensembles, bindings, dataslices and
  execution summaries; threadExecutionFromGQL maps them, mirroring the
  Lit adapters.
- DatasetsStep persists dataslices and thread_model_io, and seeds itself
  from what is already bound.
- UpdateThreadParameters writes thread_model_parameter and the execution
  summaries, so the Runs step has something to submit.
- handleFetchRuns queries executions for a thread model; the summary is
  polled while runs are in flight.

Three defects found while wiring it, each fixed here:

- Resource ids were a djb2 hash where Lit writes an MD5 of the URL, and
  TACC's rows carry the MD5. A dataslice written here would have stored
  a second row for a file the deployment already had. Verified against a
  live TACC dataslice.
- execution.run_progress is a fraction, not a percentage. The progress
  bar drew a completed run as a 1%-wide sliver.
- total_runs counted parameter values only. A run is one combination of
  input resources and parameter values, so a 6-file dataslice is 6 runs,
  not 1 — which is what TACC's own summaries hold.

parametersComplete now also requires an execution summary: a model with
no adjustable parameters satisfied the binding test vacuously, so the
step read done before it had written anything.

Corrects docs/adr/0002: parameters/runs/results were listed as ported.
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
monorepo Ready Ready Preview Aug 9, 2026 10:40pm

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