Repository navigation
✨ workflow models P2: store, /api/workflows, repo bindings, engine wiring, tracker columns (#17620) - #17649
Conversation
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>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
0dca60c
into
workflowmodel/p1-compiler
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 7370eb6. |
…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>
…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>
…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>
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.enabledis false.What's here
pkg/workflowmodel/store:<data>/workflows/<name>/<version>.json+index.json.hive-defaultvirtual/read-only; drafts save butProfile()→ErrNotCompiled; name/version regex guards; atomic writes;Rebuild. Entries reserveadoption/ratings/benchmarks(raw JSON, carried verbatim) for the P7 marketplace and future rate/vote/benchmark work.project.workflow_bindings: [{repo, name, version}](mirrorsrepo_policies),WorkflowBindingFor/SetWorkflowBinding, validated inValidateWithOptions. Bind requires a compiling model; deleting a bound model is 409.data.workflows_diroverride.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.stageengine.Options.WorkflowFor(owner, repo)+DeriveForRepo(hash-cached per-profile deriver). Bound repos derive viaDeriveFromModel; unbound/flag-off take the builtin path unchanged. Unusable binding warns once and falls back.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.<select>, immediate PUT to bindings.Tests / gates
store92.4%,api_workflows_test.go,stage_engine_workflow_test.go(live rebind, fallback, warn-once), node-harnessstage_tracker_workflows_ui_test.go./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.