OpenFn / OpenFn/kit

Workflow: take `history` off of the inner workflow JSON

Open
#1,212 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DevX tech debt
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

The Workflow class currently maintains an internal JSON representation of the workflow. This is mostly for legacy reasons - when we introduced the Workflow class, we wanted easy compatibility in tests with the old workflow structure.

The history implementation writes directly to Workflow.workflow (or this.workflow). But I don't think it should - history should be a first-class Workflow field.

We may need to modify the toJSON call to ensure history gets written to the serialized workflow

We probably also want to remove that internal representation because it is confusing

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Workflow class, its internal workflow or this.workflow representation, the history implementation, and the toJSON call. Trace how history is stored and serialized, then confirm that history is a first-class Workflow field and that the confusing internal representation can be removed without losing serialized workflow data.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.