You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 37caad9
Browse filesBrowse the repository at this point in the historyBrowse files
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>
- Workflow models, RFC phase 3a ([#17620](https://github.com/hivecommons/hive/issues/17620)): an ingested repository now yields a model that compiles. `ingest.Lifecycle` composes the hive-default lifecycle (states, columns, builtin derivation, roles, gates, events) with the repository's pipelines — PR-verify pipelines bound to the CI / Review states with file citations, the post-merge chain (main CI, release, per-environment deploys, done) as new columns after Merged — every ingested element marked inferred and the model's provenance `ingested-unreviewed`. New fact `pipeline.status` names the post-merge run the chain waits on (the engine reports `unknown` until it observes post-merge runs, so nothing moves on it yet). New owner-gated `POST /api/workflows/ingest` takes `{repo}` (default branch fetched read-only through the hive's GitHub client, CI files selected by `ingest.ReadTree`) or pasted `{files}`, returns the model, compile result and diagnostics, and with `save: true` stores it at the next integer version. `cmd/workflow-survey` compiles every repository's lifecycle model and reports pass/refusal counts by code; over the 317-repository CNCF corpus 317/317 compile with 1,117 inferred-element warnings and no refusals.
Copy file name to clipboardExpand all lines: dashboard/openapi.json
+105Lines changed: 105 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39356,6 +39356,79 @@
39356
39356
}
39357
39357
}
39358
39358
}
39359
+
},
39360
+
"/api/workflows/ingest": {
39361
+
"post": {
39362
+
"tags": [
39363
+
"Workflows"
39364
+
],
39365
+
"summary": "Ingest a repository's CI definitions into a lifecycle workflow model",
39366
+
"description": "Reads the repository's default-branch GitHub Actions workflows and Tekton resources (or pasted files) and returns the hive-default lifecycle with the repository's pipelines bound: PR-verify pipelines on the CI / Review states, the post-merge chain as new columns. Provenance ingested-unreviewed. With save=true the model is stored as the next integer version under name. Owner role required.",
39367
+
"requestBody": {
39368
+
"required": true,
39369
+
"content": {
39370
+
"application/json": {
39371
+
"schema": {
39372
+
"type": "object",
39373
+
"properties": {
39374
+
"repo": {
39375
+
"type": "string",
39376
+
"description": "owner/name to fetch through the forge client; exactly one of repo or files"
39377
+
},
39378
+
"files": {
39379
+
"type": "object",
39380
+
"additionalProperties": {
39381
+
"type": "string"
39382
+
},
39383
+
"description": "repo-relative path to file contents, for pasted or uploaded definitions"
39384
+
},
39385
+
"save": {
39386
+
"type": "boolean"
39387
+
},
39388
+
"name": {
39389
+
"type": "string",
39390
+
"description": "store name (default: slug of the repository)"
"description": "No forge client or no workflow store"
39429
+
}
39430
+
}
39431
+
}
39359
39432
}
39360
39433
},
39361
39434
"components": {
@@ -39759,6 +39832,38 @@
39759
39832
"type": "object",
39760
39833
"description": "Compiled, derivation-ready form of a model (hash, states, columns, ordered rules). Never trusted from the wire: the spoke recompiles on save and on bind.",
0 commit comments