Repository navigation
Workflows are Harbor's: the records, the engine, the builder and the pages (0.24.0) - #28
Merged
Merged
Conversation
…pages, built from registered step types Harbor::Workflow, WorkflowVersion, WorkflowRun, WorkflowStepRun and WorkflowWait are records on the tables of those names (a migration creates them where they are missing). Harbor::Workflows holds the definition and its validation, conditions, the run context and its templates, the engine that replays a definition against recorded step runs, the control actions, and AdvanceJob, the only thing that moves a run forward. Harbor::WorkflowsController and Harbor::WorkflowRunsController serve /factory/workflows (the list, a workflow's page, the builder, the reference) and /factory/workflow_runs (recent runs and a run's page); the builder is the harbor--workflow-builder Stimulus controller with its styles in workflows.css. The menu's Workflows entry is the engine's own route. What a workflow is built from is one registered list (Harbor::Workflows): register_step gives a step type its form, its outputs, its checks and the object that runs it; register_trigger, register_data, register_setting, register_validator and register_claim do the same for triggers, the data a step reads, a workflow's settings, rules that span steps and the flows a live workflow takes over. Validation, the engine, the builder's palette and forms and the reference page all read it. Harbor registers what needs no host: an agent and a verifier that run as agent sessions (AgentStep, AgentStepJob), a note, filter, choice, loop, approval and call, and the manual trigger. A host registers its own beside them and may replace, change or remove Harbor's. Harbor::Workflows.start! starts a workflow from host code, with what the run is about and one active run per workflow per subject. A Run that is a workflow step hands its result back when it finishes (Harbor::Run), whoever ran it. What is a host's arrives as config (workflow_class, workflow_run_class, user_class, workflow_params, workflow_starter, workflow_subject, workflow_manual_start, workflow_event_data, workflow_run_url, workflow_run_finished, workflow_step_retry, workflow_run_cancel) and as partials in its app/views/harbor/workflows/. 0.23.0.
adamfortuna
force-pushed
the
workflows
branch
from
November 14, 2026 23:47
57dcc68 to
08d0419
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Workflows move into Harbor (0.23.0): the records, the definition, the engine, the builder and every page, with what a workflow is built from held in one registered list.
What is here
Harbor::Workflow,WorkflowVersion,WorkflowRun,WorkflowStepRun,WorkflowWait, on the tables of those names. The migration creates what is missing and leaves a host's existing tables alone.Harbor::Workflows::Definition(parse, validate, walk),Condition,Context.Harbor::Workflows::Enginereplays a definition against recorded step runs;AdvanceJobis the only thing that moves a run;Controlcancels, answers an approval and runs again;Starter(Harbor::Workflows.start!) starts a run from host code.Harbor::Workflows):register_step,register_trigger,register_data,register_setting,register_validator,register_claim, plusupdate_*andremove_*. Validation, the engine, the builder's palette and forms and the reference page all read it.agentandverifier(run as agent sessions throughAgentStepJob), thenoteaction,filter,choice,loop,approval,call; themanualtrigger./factory/workflows(list, a workflow's page, builder, reference) and/factory/workflow_runs(recent runs, a run's page). The builder isharbor--workflow-builder, drawn from the catalog and knowing no host's step by name; its styles areworkflows.css.workflow_class…workflow_run_cancel) and eight partials inapp/views/harbor/workflows/. README "Workflows" documents all of it; CHANGELOG has the upgrade notes.Not here
Harbor::WorkflowWaitandHarbor::Workflows.sweep_waits!are here for a host's waiting step.start!.Checked
bin/test: 687 runs, 5857 assertions, 0 failures.bundle exec rubocop: no offenses.Rebasing
Based on 0.21.0. Against current
main(0.22.0) the conflicts are the expected shared files:CHANGELOG.md,README.md,Gemfile.lock,lib/harbor/version.rb,lib/harbor.rb,lib/harbor/nav.rb,app/models/harbor/run.rbandtest/dummy/db/schema.rb(regenerate withrake app:db:migrate). The dummy app onmainhas a host route namedworkflows; with this branch that entry is the engine's own, so the dummy needs another host page for the menu tests.