Move agent server.toml demo-key drift gate into the release build pipeline
Author: windcbfCreated Jul 26, 2026Updated Jul 26, 2026
Background
PR #1677 ships endpoints/agent/main/etc/server.toml defaulting to the public demo (server.opennhp.org). To keep the committed demo keys in sync with the live opennhp/demo secret, an advisory drift check exists in .github/workflows/deploy-demo-v2.yml (step "Check server.toml demo-key drift").
Problem
That guard sits in the wrong pipeline:
deploy-demo-v2.ymlisworkflow_dispatch-only and gated oninputs.confirm == 'deploy', so it never runs on a PR.- That pipeline does not build
nhp-agentd— the drifted file is shipped bybuild-binaries.yml(Makefile:138copiesendpoints/agent/main/etc/*.tomlverbatim into the release archive).
So the file that actually reaches users is never checked against the live secret at the point it's packaged.
Proposed fix
- Add a drift check to
build-binaries.ymlon thecreate_release == 'yes'path — readopennhp/demoand assert the committedPubKeyBase64values match before archiving. - Optionally add a cheap PR-time job that verifies the layout is internally consistent (active Curve block + commented SM2 block both named
default) without needing secret access.
Notes / non-blocking cleanups (spotted alongside)
- The advisory guard hardcodes the "Curve active / SM2 commented" orientation; a layout swap would false-trip it.
note()writes literal::warning::markers into$GITHUB_STEP_SUMMARY.--regenerateruns leave operator homework (peer tables must be redeployed in lockstep).registermenu option[2] GMSMfails silently when the resolved cluster key length doesn't match the scheme — consider a fail-fast length check.
Split out of #1677 review so the demo-config PR isn't blocked on release-pipeline plumbing.
Source: OpenNHP/opennhp