-
Notifications
You must be signed in to change notification settings - Fork 0
Operations Ci Cd
This repository runs a large automation stack under .github/workflows/. Most workflows authenticate as the chronova-agent GitHub App via actions/create-github-app-token@v3 (secrets: APP_CLIENT_ID, APP_PRIVATE_KEY) rather than the default GITHUB_TOKEN, because the agent needs to act on issues, PRs, releases, and the wiki repo with consistent identity.
| Workflow | Trigger | Purpose |
|---|---|---|
test.yml |
push/PR to main, develop, feat/*, fix/*
|
Parallel jobs: type-check, lint, build, test |
release.yml |
push to main
|
Pre-release quality gates + semantic-release
|
update-wiki.yml |
push to main, daily cron, manual |
Regenerates .wiki/, opens a staging PR, publishes to the wiki repo |
auto-manage.yml |
new/reopened issues, new PRs | Tags needs-triage, assigns to niklasschaeffer
|
omp.yml |
/omp or /oc comment |
Runs the OMP agent from a comment trigger |
omp-ci.yml |
new issues/PRs, PR closed, manual | Triage, label, and PR review automation via OMP; closed events cancel in-flight review/label runs for merged PRs |
omp-fix-issue.yml |
repository dispatch, manual | Attempts an automated fix for a triaged issue |
vouch-pr.yml |
pull_request_target |
PR gate: auto-closes PRs from unvouched users |
vouch-manage.yml |
discussion_comment created |
Lets maintainers vouch/denounce/unvouch users via discussions |
Four parallel jobs run on every push or PR to main, develop, feat/*, and fix/*:
-
Type Check —
npm ci→npm run type-check(5 min timeout) -
Lint —
npm ci→npm run lint(5 min timeout) -
Build —
npm ci→npm run build(5 min timeout) -
Test —
npm ci→npm test(Vitest, 10 min timeout)
All four use Node 25 and actions/setup-node@v7 with npm cache. Concurrency group ${{ github.workflow }}-${{ github.ref }} with cancel-in-progress: true so a new push on the same branch supersedes a previous in-flight run.
Runs only on push to main. Quality gates (type-check + lint) precede semantic-release. The release step:
- Runs
semantic-release(configured by.releaserc.json), which:- Determines the next version from conventional commits.
- Updates
CHANGELOG.md(@semantic-release/changelog). - Updates
package.json+package-lock.jsonand commits them withchore(release): ${nextRelease.version} [skip ci](@semantic-release/git). - Publishes to npm as
@chronova/mcp-server(@semantic-release/npm). - Creates a GitHub release (
@semantic-release/github), truncating the body at 120 kB with a pointer toCHANGELOG.mdif exceeded.
The app token is used so the release PR/branch and the GitHub release are authored by the same identity as the agent's other workflows.
The wiki is regenerated daily (cron 0 8 * * *), on every push to main, and on manual dispatch. The pipeline:
-
Token — mints a GitHub App token (
continue-on-error: trueso the run still proceeds withGITHUB_TOKENif the app isn't available). - Checkout — full clone with the app token.
- Toolchain — installs Bun (for the wiki agent) and Node 25.
-
Wiki agent — installs
@chronova/wiki-agentglobally and runswiki --update --print --verbose --wiki. Model and provider are env-configurable:WIKI_OLLAMA_MODE=cloud,WIKI_OLLAMA_API_KEY,WIKI_MODEL(defaultkimi-k3). -
Diff detection — collects
git status --porcelain .wikiminus run metadata files (.last-update-report.md,.last-updated.json). If non-empty, setshas_changes=trueand stashes the report as the PR body. -
Wiki repo init check —
git ls-remoteagainsthttps://github.com/<owner>/<repo>.wiki.git. If HEAD does not exist yet (the wiki has never been initialized in the GitHub UI), the publish step is skipped with a warning — the staging PR is still opened. -
Publish to wiki repo —
wiki-flattenconverts the nested.wiki/tree to the flatHome.md/_Sidebar.mdlayout GitHub Wikis require, thenrsync --delete(with--exclude='.git') syncs it into a fresh clone of the wiki repo. Adocs: update wikicommit is pushed tomasterif and only if there are net content changes. -
Staging snapshot PR — uses
peter-evans/create-pull-request@v8to open a PR on awiki/staging-<unix-seconds>branch listing only.wiki/paths, with the report as the body. This is the PR that this very wiki-update run is invoked from.
The dual PR + wiki-repo publish is intentional: the PR gives reviewers a diff on the source-of-truth .wiki/ directory in the main repo, while the wiki-repo push makes the rendered pages visible to readers immediately. Staging PRs older than the latest commit are closed automatically by the wiki update run.
A small triage workflow. On any new or reopened issue it adds the needs-triage label; on new PRs and issues it assigns the author to niklasschaeffer. Uses the app token so labels and assigns are stable.
The repository uses the OMP agent for several automated tasks. The agent is installed in each OMP workflow via the native bash installer curl -fsSL https://omp.sh/install | sh, and is authenticated against the ollama-cloud provider by inserting the API key into the local SQLite store at ~/.omp/agent/agent.db. The model used by the default role is ollama-cloud/glm-5.3-flash; planning/design tasks use ollama-cloud/kimi-k2.6; larger reasoning/vision tasks use ollama-cloud/qwen3.5:397b. OMP JSONL output is piped through .omp/stream-log.py to produce readable CI log lines.
Runs on any issue_comment or pull_request_review_comment containing /omp or /oc (case-insensitive prefix or " /omp" substring). The if guard also excludes any user whose login ends in [bot].
The workflow extracts the prompt from the comment body:
- Strips the leading
/ompor/oc. - Tries to match a known command file under
.omp/commands/(e.g./omp triage-issue 42→.omp/commands/triage-issue.md). If the file exists,$ARGUMENTSis substituted with the rest of the prompt and the file's contents are used. - Otherwise the rest of the comment is treated as a freeform prompt. For PR comments only,
.omp/commands/_pr-commit-push.mdis appended so the agent knows to commit and push its changes back to the PR branch (this fix landed in PR #80 / commit9d7a606to address issue #637). The appended prompt forbids pushing tomainordevelop, merging the PR, or starting a dev server.
The expanded prompt is passed to omp -p --model ollama-cloud/glm-5.3-flash --mode json <file> | python3 .omp/stream-log.py.
Three jobs run on new issues/PRs (and manually). The pull_request trigger includes closed (added in commit a6e7210) so that dedicated cancel-*-on-close jobs can cancel any still-running review or label jobs for a merged PR via their concurrency groups:
-
triage-issue — runs
.omp/commands/triage-issue.mdagainst the issue body to set type/priority fields and labels. -
label-pr — runs
.omp/commands/label-pr.mdto apply type and priority labels. Skipped when the PR action isclosed. -
review-pr — runs
.omp/commands/review-pr.mdto post inline comments and submit a review verdict. Skipped when the PR action isclosed(github.event.action != 'closed'). -
cancel-review-on-close / cancel-label-on-close — no-op jobs that run only on
pull_requestclosed. They share theomp-review-<n>andomp-label-<n>concurrency groups withcancel-in-progress: true, cancelling in-flight review/label runs for the merged PR.
Triggered by repository dispatch (typically from a triaged issue) or manually. Reads a triaged issue, runs .omp/commands/fix-issue.md, implements the fix on a new branch, runs the quality gates, and opens a draft PR.
OMP-specific guardrails live under .omp/rules/. Two notable rules:
-
gh-label-idempotent.md— always append|| truetogh label create, so re-runs don't fail on existing labels. -
tool-paths-must-be-arrays.md—find/searchpathsarguments must be arrays (e.g.paths: ["./src"], not"./src").
Both OMP workflows install the agynio/gh-pr-review CLI extension and pin it to v1.6.2 (gh extension install agynio/gh-pr-review --pin v1.6.2 --force), so the PR review surface is stable and immutable across CI runs. Git evidence: commit 7c2ff66.
.github/VOUCHED.td stores the vouched and denounced user list. Only vouched users can open pull requests; bots and collaborators with write access are automatically allowed.
Runs on pull_request_target (opened, reopened, ready_for_review) so the token can act on fork PRs. Uses mitchellh/vouch/action/check-pr@v1 with auto-close: true and require-vouch: true. PRs that pass the gate are labelled vouched via a follow-up step (label is created with --force so the workflow is idempotent). Concurrency group vouch-pr-<n> with cancel-in-progress: true.
Runs on discussion_comment created. When a maintainer comments !vouch (optionally !vouch @user [reason]) on a discussion, this workflow invokes mitchellh/vouch/action/manage-by-discussion@v1 to update .github/VOUCHED.td. !denounce @user blocks a user; !unvouch @user removes them.
See CONTRIBUTING.md for the full user-facing vouch flow.