Skip to content

✨ workflow models P2: store, /api/workflows, repo bindings, engine wiring, tracker columns (#17620) - #17649

Merged
hivecommons-hive[bot] merged 3 commits into
workflowmodel/p1-compilerfrom
workflowmodel/p2-store-binding
Nov 11, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
workflowmodel/p1-compilerfrom
workflowmodel/p2-store-binding

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Stacked on #17648 (P1). Phase 2 of RFC #17620: models get a home on disk, an API, a per-repo binding, and a path into the stage engine and the Activity Monitor. Nothing changes for unbound repositories or while workflow.enabled is false.

What's here

  • Store — pkg/workflowmodel/store: <data>/workflows/<name>/<version>.json + index.json. hive-default virtual/read-only; drafts save but Profile() → ErrNotCompiled; name/version regex guards; atomic writes; Rebuild. Entries reserve adoption / ratings / benchmarks (raw JSON, carried verbatim) for the P7 marketplace and future rate/vote/benchmark work.
  • Binding — project.workflow_bindings: [{repo, name, version}] (mirrors repo_policies), WorkflowBindingFor / SetWorkflowBinding, validated in ValidateWithOptions. Bind requires a compiling model; deleting a bound model is 409. data.workflows_dir override.
  • API — GET/POST /api/workflows, POST /api/workflows/compile, GET/PUT /api/workflows/bindings, GET/PUT/DELETE /api/workflows/{name}/{version}. Owner-gated writes, audited, 503 without a store. OpenAPI updated.
  • Engine — stageengine.Options.WorkflowFor(owner, repo) + DeriveForRepo (hash-cached per-profile deriver). Bound repos derive via DeriveFromModel; unbound/flag-off take the builtin path unchanged. Unusable binding warns once and falls back.
  • Tracker — response gains workflows: {default, repos: {<repo>: {name, version, columns, numbers, error}}} (nil when nothing is bound). JS: model badge, model column header, per-row column strip by stage number, amber Not covered chevron on abstention.
  • Settings → Repos — per-repo Workflow <select>, immediate PUT to bindings.

Tests / gates

  • store 92.4%, api_workflows_test.go, stage_engine_workflow_test.go (live rebind, fallback, warn-once), node-harness stage_tracker_workflows_ui_test.go.
  • OpenAPI route coverage, import ratchet (67→68), settings-parity allowlist, agent-runtime golden regenerated, tracker CSS token check — all green. golangci-lint clean.
  • Pre-existing macOS-only /var-symlink failures (TestKnowledgeDrainLegacyMemory, memory-drainer tests) are unrelated.

Not in this PR

P3 (ingest → lifecycle draft models), P4 (visual editor), P5 (monitor CI sub-stages), P6 (marketplace on hive.hivecommons.dev), P7 (benchmark/ratings). Tracked on #17620.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…#17620 P2b)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Per-repo Workflow select on Settings → Repos, tracker workflows block
rendering (model column header, per-row strip, Not covered chevron),
openapi routes/schemas, import ratchet and settings-parity allowlist,
regenerated agent-runtime golden, phase-2 design notes and fragment.

Refs #17620

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 11, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: workflowmodel/p1-compiler

Conflicts are checked with every PR merged onto the current tip of workflowmodel/p1-compiler, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive
hivecommons-hive Bot merged commit 0dca60c into workflowmodel/p1-compiler Nov 11, 2026
32 of 37 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the workflowmodel/p2-store-binding branch November 11, 2026 05:17
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#176497370eb6` sha256:0ee6ff7e5886fca1a23d104dcfce2524656c2c53f49707662e26ab85c305f40b — download from the dashboard or `hivectl review evidence #17649`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 7370eb6.

clubanderson added a commit that referenced this pull request Nov 11, 2026
…ring, tracker columns (#17620) (#17649)

* ✨ workflowmodel: store, /api/workflows, repo bindings (RFC #17620 P2a)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* ✨ stageengine: per-repo workflow binding, tracker workflows block (RFC #17620 P2b)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* workflow models P2: Settings/tracker UI, openapi, gates, docs (P2c)

Per-repo Workflow select on Settings → Repos, tracker workflows block
rendering (model column header, per-row strip, Not covered chevron),
openapi routes/schemas, import ratchet and settings-parity allowlist,
regenerated agent-runtime golden, phase-2 design notes and fragment.

Refs #17620

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

---------

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
clubanderson added a commit that referenced this pull request Nov 11, 2026
…rkflows API, repo bindings, tracker columns (#17648)

* ✨ workflowmodel: lifecycle schema, compiler, hive-default generator, DeriveFromModel (#17620 P1)

Extends the v1alpha1 schema with columns, derivation, events, gates,
roles, agents, checks, bookkeeping, labels and meta; adds Compile with
coded refusals; generates hive-default from the stage table and the
engine's expected edges; adds stageengine.DeriveFromModel (builtin
delegation + rules evaluator) and Options.Workflow; adds the
workflow.enabled flag (default false, no wiring effect yet).

The PR stage-golden corpus derives identically under hive-default.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
(cherry picked from commit 43eb8b2)

* ✨ workflow models P2: store, /api/workflows, repo bindings, engine wiring, tracker columns (#17620) (#17649)

* ✨ workflowmodel: store, /api/workflows, repo bindings (RFC #17620 P2a)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* ✨ stageengine: per-repo workflow binding, tracker workflows block (RFC #17620 P2b)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* workflow models P2: Settings/tracker UI, openapi, gates, docs (P2c)

Per-repo Workflow select on Settings → Repos, tracker workflows block
rendering (model column header, per-row strip, Not covered chevron),
openapi routes/schemas, import ratchet and settings-parity allowlist,
regenerated agent-runtime golden, phase-2 design notes and fragment.

Refs #17620

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

---------

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* workflowmodel P2: refresh api-reference citations, tokenize badge padding, lower style ratchet baselines

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* testutil: allow pkg/dashboard → pkg/workflowmodel in import ratchet (RFC #17620 P2)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* ✨ workflowmodel: ingest → lifecycle models, /api/workflows/ingest, survey compile stats (RFC #17620 P3a) (#17652)

ingest.Lifecycle composes hive-default's compiled lifecycle with a
repository's pipelines: PR-verify pipelines on the CI / Review states with
citations, the post-merge chain as inferred columns after Merged,
provenance ingested-unreviewed. New pipeline.status fact (engine reports
unknown until post-merge runs are observed). ingest.ReadTree selects CI
files from a checkout. POST /api/workflows/ingest fetches a repo's default
branch read-only (or takes pasted files), compiles, optionally saves at the
next integer version. workflow-survey compiles every corpus repo's
lifecycle model: 317/317 compile, 0 refusals.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

---------

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
hivecommons-hive Bot added a commit that referenced this pull request Nov 11, 2026
…tore, workflows API, repo bindings, tracker columns (#17679)

* ✨ workflowmodel: phase-1 ingest (GitHub Actions, Tekton), renderers and survey harness (#17620) (#17630)

* ✨ workflowmodel: phase-1 ingest (GitHub Actions, Tekton), renderers and survey harness (#17620)

Deterministic ingest of a repository's GitHub Actions workflows and Tekton /
OpenShift Pipelines resources into one content-hashed workflow model bound
onto the hive default lifecycle; Mermaid and Activity Monitor column
renderers; cmd/workflow-survey proving harness; golden fixtures from six
real repositories. Nothing wires into the stage engine yet.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* workflow-survey: make main testable, drop unused const

golangci-lint flagged maxFileBytes as unused and the coverage gate
hard-fails any new cmd package without tests. Split main into
realMain(args, stdout, stderr) and run over the curated fixture corpus
in-process (96.6% statement coverage).

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

---------

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
(cherry picked from commit a59684c)

* ✨ workflow models P1+P2: schema, compiler, DeriveFromModel, store, workflows API, repo bindings, tracker columns (#17648)

* ✨ workflowmodel: lifecycle schema, compiler, hive-default generator, DeriveFromModel (#17620 P1)

Extends the v1alpha1 schema with columns, derivation, events, gates,
roles, agents, checks, bookkeeping, labels and meta; adds Compile with
coded refusals; generates hive-default from the stage table and the
engine's expected edges; adds stageengine.DeriveFromModel (builtin
delegation + rules evaluator) and Options.Workflow; adds the
workflow.enabled flag (default false, no wiring effect yet).

The PR stage-golden corpus derives identically under hive-default.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
(cherry picked from commit 43eb8b2)

* ✨ workflow models P2: store, /api/workflows, repo bindings, engine wiring, tracker columns (#17620) (#17649)

* ✨ workflowmodel: store, /api/workflows, repo bindings (RFC #17620 P2a)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* ✨ stageengine: per-repo workflow binding, tracker workflows block (RFC #17620 P2b)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* workflow models P2: Settings/tracker UI, openapi, gates, docs (P2c)

Per-repo Workflow select on Settings → Repos, tracker workflows block
rendering (model column header, per-row strip, Not covered chevron),
openapi routes/schemas, import ratchet and settings-parity allowlist,
regenerated agent-runtime golden, phase-2 design notes and fragment.

Refs #17620

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

---------

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* workflowmodel P2: refresh api-reference citations, tokenize badge padding, lower style ratchet baselines

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* testutil: allow pkg/dashboard → pkg/workflowmodel in import ratchet (RFC #17620 P2)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

* ✨ workflowmodel: ingest → lifecycle models, /api/workflows/ingest, survey compile stats (RFC #17620 P3a) (#17652)

ingest.Lifecycle composes hive-default's compiled lifecycle with a
repository's pipelines: PR-verify pipelines on the CI / Review states with
citations, the post-merge chain as inferred columns after Merged,
provenance ingested-unreviewed. New pipeline.status fact (engine reports
unknown until post-merge runs are observed). ingest.ReadTree selects CI
files from a checkout. POST /api/workflows/ingest fetches a repo's default
branch read-only (or takes pasted files), compiles, optionally saves at the
next integer version. workflow-survey compiles every corpus repo's
lifecycle model: 317/317 compile, 0 refusals.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

---------

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
(cherry picked from commit 1217d64)

---------

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant