Skip to content

CI / continuous validation

This repo has six GitHub Actions workflows that validate changes, publish the documentation site, track upstream images, and release signed chart artifacts.

Workflow Trigger Role
validate-chart.yaml Pull requests that change the chart, tests, validation scripts, or this workflow Lint, generated-docs drift checks, and isolated kind install/test scenarios before merge.
deploy-docs.yaml Pull requests and main pushes touching anything the site renders (docs/, the READMEs, charts/, examples/, mkdocs.yml, ...), manual runs, and release refreshes Build the site with strict link checks and deploy it to GitHub Pages outside pull requests.
cron-fetch-image.yaml Every 6 hours or manually Detect a newer upstream image, open an appVersion update PR, and create upstream-review issues.
propose-release.yaml Manual Consume pending Changesets into one reviewable release PR without publishing.
release-chart.yaml Push to main that changes charts/hermes-agent/Chart.yaml Tag vX.Y.Z, publish OCI and Helm Repository artifacts, cosign-sign OCI, and refresh Pages.
verify-release.yaml After a successful release-chart run, or manual dispatch for a published version Re-verifies the published, signed artifact end to end.

How the workflows connect

flowchart LR
    C["cron-fetch-image<br/>every 6 hours"] --> U["appVersion update PR"]
    C --> I["upstream-review issues"]
    P["Chart-related PR"] --> V["validate-chart"]
    P --> B["deploy-docs<br/>build only"]
    S["Site-only PR"] --> SB["deploy-docs<br/>build only"]
    U --> V
    U --> B
    V --> M["Merge chart change"]
    B --> M
    SB --> SM["Merge site change"]
    M --> R["propose-release<br/>manual"]
    R --> RP["Release PR"]
    RP --> RV["Review and validation"]
    RV --> RM["Merge release PR"]
    RM --> RC["release-chart"]
    RC --> VR["verify-release"]
    RC --> D["deploy-docs<br/>publish"]
    M --> D
    SM --> D

The scheduled path stops at a normal pull request and review issues. It never publishes a chart directly. Publishing starts only after a maintainer prepares, reviews, and merges the Changesets release PR.

validate-chart

Two jobs run on every functional change, and a third runs when the Vertex provider contract applies:

lint

helm lint, helm template, render-only assertions for the dashboard block (.github/scripts/assert-dashboard-render.sh), and a helm-docs drift check - if charts/hermes-agent/README.md is out of date relative to README.md.gotmpl, or the copy of its ## Values table in a translated chart README differs, the job fails. Always run make docs after editing values.yaml and commit the result.

test

Eight scenarios run as a matrix, each on its own ephemeral kind cluster (a separate runner) - fully isolated, with native per-job status, timeout, and failure diagnostics instead of one bundled log. The PR checks list shows them separately: test (message), test (existing-claim), test (team), test (security-hardened), test (bootstrap-overwrite), test (config-migration), test (dashboard-ingress), and test (image-contract). Scenario logic lives in .github/scripts (lib.sh + one script per scenario) rather than inline in the workflow.

A changes job skips test entirely for version-bump-only commits (where the chart behavior is unchanged).

message scenario: scenario-message.sh

  1. Install with chart-managed storage.
  2. Run the chart's hermes doctor test hook (the same Job as helm test, but invoked directly so it can't stall on the hook watch).
  3. Only on trusted chart/image/live-harness changes (an NVIDIA_API_KEY secret is present): inject a skills/ci-ping/SKILL.md onto the PVC, confirm it is discoverable, then do one hermes chat round-trip through NVIDIA NIM with an explicit skill request.

Documentation and release-tooling changes keep any structural chart installs selected by the functional matrix, but skip the external model and Discord delivery checks. requires-live-chat.py makes that narrower decision from the actual diff. Chart inputs, image changes and live-test harness changes retain the external checks; missing base history keeps them enabled.

The CI_MODELS pool is failover only - the round-trip passes on the first model returning exactly CI_PONG, not every model. The PR and post-release checks share the fixture and discovery gate. They preload --skills ci-ping and use --quiet so only the final reply is checked; a zero exit with an empty or unrelated answer does not pass. Each attempt remains bounded and fails over.

The live Discord notification step (workflow-level, after the scenario script) only runs for this scenario, since it's the only one with Discord enabled.

existingClaim scenario: scenario-existing-claim.sh

Exercises persistence.existingClaim (the ability to mount a pre-existing PVC instead of one the chart creates - PR #37):

  1. Create a ci-shared-pvc PVC outside the chart.
  2. Install with --set persistence.existingClaim=ci-shared-pvc.
  3. Confirm the hermes doctor test hook passes.
  4. Exec into the pod and write then read ${HERMES_HOME}/ci-claim-probe.txt.
  5. Re-run hermes doctor.

This is a smoke test: it proves the chart binds to a pre-created PVC and starts cleanly. Persistence across restarts/upgrades remains a follow-up.

The separate team scenario provisions hermes-team-knowledge as RWX, mounts it read-write on the leader and read-only on a member, writes a probe from the leader, cross-reads it from the member, and confirms that a member write is rejected. It therefore covers the multi-instance shared-knowledge boundary without treating the volume as a task handoff path.

The security-hardened scenario installs values-hardened.yaml in a namespace enforcing Pod Security Standards restricted. It verifies the rendered security contexts and runs hermes doctor in the admitted read-only-root-filesystem pod.

The bootstrap-overwrite scenario validates the durable config contract. It installs with bootstrap.overwrite=false, writes a marker into the running pod's config.yaml, and then upgrades with a harmless Pod annotation to force the seed init container to run again. The marker must still exist in the new pod, proving that runtime edits survive an upgrade.

The config-migration scenario uses Hermes v2026.9.21 and a persistent PVC. It checks first boot, replacement with bootstrap.overwrite=true, preservation and migration with false, a safe refusal for an explicitly unsupported version, and the documented operator migration-floor step. It verifies the resulting schema version and the pre-migration backup.

The dashboard-ingress scenario installs a pinned ingress-nginx controller in its own kind cluster and reaches the dashboard through a TLS Ingress. The pod must turn Ready only once the dashboard listens (the readiness probe), so the Ingress answers right after helm --wait; the auth gate must reject unauthenticated and wrong-password requests; and sign-in must set Secure, HttpOnly __Host- session cookies because the controller pod is listed in dashboard.trustedProxies. A control upgrade without a trusted proxy checks that the cookies are not Secure, which is the documented reason to set it. The host is a reserved .test name resolved with curl --resolve and the certificate is self-signed, so no DNS or public certificate is involved; never use a *.localhost host here, because upstream treats loopback hosts as a development setup and does not set Secure for them. Real DNS and Let's Encrypt issuance are verified by hand on a real cluster.

The image-contract scenario guards two chart paths that run code inside the Hermes image and are off by default, so no other scenario touches them: the OpenAI Codex device login imports its helpers from hermes_cli.auth, and the ready message is a gateway:startup hook that Hermes loads in-process. It installs the chart with both enabled (without --wait, because the main Pod waits for a person to approve a login code), runs the Helm test Job, and requires both of its checks to report OK. The helper check is an import; the hook check sets an unknown channel so the handler logs and returns, and it requires that handler log line, because the registry swallows handler errors. No secret and no provider call is needed, so it also runs on fork PRs. An image bump that renames or moves either dependency fails here with the missing name instead of breaking a user's login or ready message silently.

Doctor memory headroom

The scenarios that run hermes doctor again in the workload pod (existing-claim, security-hardened and bootstrap-overwrite) also measure how much memory it needs. run_doctor starts the doctor through doctor-memory.py, which leaves its output and exit status alone and samples the container's cgroup while it runs. It first waits for the container to stop growing, so a gateway that is still starting is not counted as the doctor. The figure is the peak growth in memory the kernel cannot reclaim (page cache is left out), reported next to the largest single process.

The log then shows a doctor memory: line that compares the peak with the release's tests.resources.limits.memory, and the job raises a warning annotation when the limit is less than 1.5 times the peak. The check never fails a scenario. The Helm test Job was once OOMKilled at a limit it had passed under before, with no earlier sign. This warning shows shrinking headroom, for example on an image bump, while the Job still passes. When it appears, raise the default limit in values.yaml.

provider-contract

An offline check that the chart-pinned Hermes image still honors the Vertex example. It runs when a PR touches values-google-vertex.yaml, the harness in .github/scripts/provider-contract/, the workflow, or the appVersion. If the base commit is unknown, it runs rather than being skipped. There is no kind cluster: the job renders the overlay, then runs the image with no network and no credentials against a local aimock (@copilotkit/aimock, version pinned in vertex.sh).

The check asserts:

  • The render has the expected image, Secret name, read-only mount, and a credential path under that mount.
  • Hermes resolves provider: vertex to the exact .../projects/<project>/locations/<region>/endpoints/openapi base URL, and takes its token from a synthetic service-account key.
  • One google/gemini-3.8-flash request reaches the mock on the exact route, and the reply equals a fixed marker. The mock journal holds exactly one matching entry.
  • A wrong route and a wrong model both fail (negative controls).

Run it locally with helm, yq, openssl, npm and docker:

.github/scripts/provider-contract/vertex.sh

A failure prints ::error::[vertex-contract] ... with the failed assertion.

What it does not prove: the credential file is bind-mounted, not mounted from a Secret volume in a Pod; success against a mock says nothing about IAM, quota, or live Vertex inference. Those need a separate, authorized live smoke test.

Fork PRs

Fork PRs don't receive repository secrets, so the chat round-trip (and any live Discord check) is skipped and the run falls back to doctor-only, which is safe and still meaningful.

deploy-docs

Its path filter covers every repository source rendered by the site, which is broader than docs/: the root README, SECURITY, and CONTRIBUTING files in both supported languages; charts/; examples/; mkdocs.yml; main.py; hooks.py; and requirements.txt are all included. A chart-only pull request therefore runs this workflow too, because the chart README is part of the site.

Pull requests run mkdocs build --strict and upload the site artifact but do not deploy it. A matching change on main, a manual run, or a refresh requested by release-chart deploys the built site through the GitHub Pages Actions API.

The workflow merges index.yaml and packaged chart archives from the gh-pages branch into the site output. The branch is a Helm Repository data store; deploy-docs is the only workflow that publishes the Pages site.

cron-fetch-image

The schedule 0 */6 * * * runs at 00:00, 06:00, 12:00, and 18:00 UTC. A manual dispatch runs the same process.

  1. Fetch nousresearch/hermes-agent release tags (vX.Y.Z) from Docker Hub, ignoring rc.*, -desktop, per-arch, stable, and latest tags.
  2. Compare the newest tag with the chart's current appVersion. A date-based appVersion (vYYYY.M.D, the scheme upstream used until v2026.9.24) counts as older than every semver tag.
  3. If a newer image exists, open an appVersion bump PR with a minor Changeset.
  4. Independently inventory formal stable GitHub releases, including those without a matching Docker tag. Fetch original notes, run small Helm lint/Deployment/StatefulSet render checks per release, and review chart impact with NVIDIA NIM. Create one labeled issue per chart-relevant follow-up.

The version bump and upstream-review jobs are independent. Maintainers can merge the image update after its normal checks without waiting for every follow-up issue to be implemented.

Formal review runs even when appVersion is current, an image PR/branch already exists, or the image check cannot proceed. Use workflow inputs review_only=true to avoid proposing an image update, review_from=v0.21.6 for the inclusive SemVer baseline, and force_review=true for explicit backfill of already-recorded notes. Review-only dispatch can still file issues and use the NIM secret.

The committed manual baseline records the five migration-era releases reviewed on 2026-10-17. Later completed original-note digests are cached between runs; cache eviction causes re-review rather than a false clean result. A failed tag does not prevent other tags from being checked, and only completed reviews enter the ledger. Changed note bodies are reviewed again. The chart snapshot, original notes, per-release checks, omitted sections and ledger are retained in the run artifact for 90 days. These are static checks, not image support or live PVC/authentication evidence.

The upstream review reports every outcome explicitly:

  • Unreviewed. Without an NVIDIA_API_KEY secret, the job records that the release remains unreviewed and retries it later. It does not advance the ledger.
  • Failed. If NIM returns an error or an unusable response on every attempt, the job files one upstream-review issue titled "Automated upstream review failed - review manually" and then fails. A failed review is never reported as "nothing to file". Missing or empty original notes, failed static checks, and omitted critical upgrade/security/revert sections also require a manual review issue and fail the run.
  • Condensed input. Release notes over a character budget (NIM_MAX_NOTES_CHARS, default 60000) are condensed before the call: highlights, upgrade, breaking, security, gateway, infrastructure and revert sections go first, contributor lists and test changelogs are dropped, and the omitted sections are named in the prompt and in each filed issue. A failed attempt retries with half the budget, and the log shows the HTTP status and a short excerpt of the response.

propose-release

A maintainer starts this workflow when pending Changesets are ready. It combines them into one release PR and synchronizes the release manifest, Chart.yaml, Artifact Hub annotations, generated chart docs, and versioned examples. It does not publish a chart.

release-chart

Merging the release PR changes the chart version on main and starts this workflow. If the version tag does not already exist, it:

  1. creates the vX.Y.Z tag and GitHub Release;
  2. packages and publishes the chart to OCI;
  3. signs the OCI artifact with keyless cosign;
  4. updates the Helm Repository data on gh-pages; and
  5. triggers deploy-docs so the documentation site and Helm Repository index are served together.

verify-release

After a release is published, this workflow proves the whole supply chain against the artifact users actually pull (namespace verify-hermes-chart):

  1. cosign verify the OCI artifact against this repo's Actions OIDC identity.
  2. helm install from the OCI registry (not local source).
  3. Run the same hermes doctor + chat round-trip as validate-chart.

The release tag determines the chart version and immutable release SHA. The workflow's own commit determines the test harness, and logs record both. To check an existing artifact after correcting a harness, without publishing again:

gh workflow run verify-release.yaml --ref main -f version=1.21.0

The manual version must be plain X.Y.Z and its existing tag must agree with the chart metadata. Automatic no-op releases still skip artifact verification. Classify failures from evidence: signature/installation, harness, and external model/network failures are distinct; a failed model request alone does not prove the published chart is broken.

Running the equivalents locally

make lint        # helm lint
make template    # render manifests
make docs        # regenerate the chart README (helm-docs) - commit the result
make test        # install + helm test (needs a cluster/kind)

See Local development guide for setting up a local kind cluster and a Discord + NVIDIA dev loop.