Rename the owner agent host to worker.bstein.dev (supersedes #41) #42
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/hermes-domain-rename-agent-worker-v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Renames the owner-only Hermes coordinator host from
agent.hermes.bstein.devtoworker.bstein.dev.Supersedes #41. That PR was cut before #38 landed and no longer merges: #38
touched the same five files. This branch is rebuilt on current main, and it now
reuses the legacy-origin mechanism #38 added instead of introducing a second one.
Read the rollout section before merging. This hostname is the coordinator's own
public access point, so the rollout — not the repo edit — changes how you reach the
running coordinator.
Deliberate design: the old host is not retired here
agent.hermes.bstein.devkeeps working through the transition. It stays in theCoreDNS hosts entry, in BOTH agent Ingress rules, and on the
hermes-sites-tlscertificate SANs. Retiring it is a separate, separately scheduled change.
No redirect middleware is added. A redirect from the old host to the new one could
be proposed later; it is deliberately not implemented here, so nothing silently
changes where a request lands.
This is the same additive shape #38 applied to chat and triage, applied to the agent
surface — and it is why this PR does not repeat #34's mistake.
The one thing that does move is where a fresh login happens. The oauth2-proxy
session and CSRF cookies use the
__Host-prefix, which binds them to exactly oneorigin, so
--redirect-urlcan only name one host. It now namesworker.bstein.dev.Consequence, stated plainly:
agent.hermes.bstein.devkeep working.validation, because the CSRF cookie was set on the old origin. Start fresh logins
on
worker.bstein.dev.--redirect-urlinagent-deployment.yaml. It doesNOT require re-running the Keycloak job, because both callback URLs stay
registered.
Re-login required
oauth2-proxy cookies are host-bound (
__Host-hermes_agent). Existing coordinatorsessions and cookies do NOT carry over to the new origin. Expect to log in again on
worker.bstein.devafter rollout, including any in-flight coordinator session.Keycloak
services/keycloak/scripts/hermes_access_oidc_ensure.shmust run for the newredirect URI. Login on
worker.bstein.devfails until it completes.The agent client now passes a legacy origin through the optional fourth argument #38
added to
ensure_proxy_client, so no new mechanism is introduced. The resultingpayload was replayed locally and registers both callbacks, both web origins, a
##-joined post-logout pair, androotUrlon the canonical host.The immutable ensure Job is bumped
-11->-12. -11 was #38's bump and hasalready run (verified live: chat and triage now accept their renamed callbacks),
so a further bump is required or this change would silently never be applied.
Ordered rollout
infrastructure/core,services/hermes,services/keycloak,services/quality,services/comms.worker.bstein.dev.hermes-sites-tls; wait for Ready with theworker.bstein.devSAN present.-12ensure Job runs and updates the Keycloak agent proxy client.https://worker.bstein.dev(re-login required, see above).agent.hermes.bstein.dev, as a SEPARATE scheduledchange. Do not retire it in this one.
Steps 3-5 are independent of each other but ALL must complete before step 6 succeeds.
If step 6 fails, the old host is still serving existing sessions and the one-line
rollback above applies.
Post-merge verification checklist
Each step marks whether this agent can run it. "Agent-executable" means the access
was demonstrated in this environment while preparing this PR, not assumed.
getent hosts worker.bstein.dev192.168.22.9 worker.bstein.devgetent hosts agent.hermes.bstein.dev192.168.22.9 ...curl -sS -o /dev/null -w '%{http_code}' https://worker.bstein.dev/ping200curl -sS -o /dev/null -w '%{http_code}' https://agent.hermes.bstein.dev/ping200echo | openssl s_client -connect 192.168.22.9:443 -servername worker.bstein.dev 2>/dev/null | openssl x509 -noout -ext subjectAltNameworker.bstein.devANDagent.hermes.bstein.devhttps://worker.bstein.dev/oauth2/callback302, not400 Invalid parameter: redirect_uri302kubectl -n hermes get certificate hermes-sites-tlsREADY=Truekubectl -n hermes get ingress hermes-agent-dashboard hermes-agent-terminalkubectl -n sso get job hermes-access-oidc-client-ensure-12COMPLETIONS=1/1flux get kustomizationshttps://worker.bstein.devSteps 8-11 are operator-required because this agent's Kubernetes identity
(
system:serviceaccount:hermes:hermes-agent) is observer-only. Every one ofget ingress -n hermes,get certificate -n hermes,get job -n sso,get configmap coredns-custom -n kube-systemandget kustomization -n flux-systemreturned
Forbiddenwhen tested. Do not expect the agent to confirm them.Live state re-verified before this PR
Checks 1-7 were run against the cluster as it stands today, so the pre-merge baseline
is recorded rather than assumed:
worker.bstein.dev-> NXDOMAIN;agent.hermes.bstein.dev-> resolves.hermes-sites-tlsSAN list does not yet containworker.bstein.dev.302) and rejectshttps://worker.bstein.dev/oauth2/callback(400). Expected: this PR is whatregisters it.
302). Thebreakage reported on #41 was real and #38 has since fixed it — no action needed
here, and the "merge this last" advice is back to being purely about sequencing.
Scope and collisions
Does not touch
chat.bstein.dev,triage.bstein.devor their legacy names beyondthe shared certificate/Ingress files, where changes are strictly additive and #38's
entries are preserved verbatim.
Collision check before editing:
worker.bstein.devwas unused — absent fromgit grepover tracked content, from every knowledge catalog and Ingress, andgetent hostsreturned NXDOMAIN.Two commits, deliberately split:
chore(knowledge): regenerate stale Atlas catalogs— puremake knowledgerunagainst unmodified main. The committed catalogs had drifted: #38's restored legacy
hosts were missing from the HTTP catalogs and diagrams, along with Flux
kustomizations and Grafana panels added since the last regeneration. Isolated so
the rename reviews as a rename.
refactor(hermes): rename the owner agent host to worker.bstein.dev.Intentionally left on the old hostname
mermaid/ServiceAccessArchitecture.mmdand.svg. These two files cannot bepushed through the SCM broker at all: its content scanner has a forge-token rule
matching a
gitea-style prefix followed by a 20-plus character identifier suffix,and one pre-existing mermaid node id in these diagrams (the Cassandra OIDC access
node) matches it, so the whole push is rejected with an opaque HTTP 400. That id is
already on main, so any PR touching these two files hits the same wall regardless
of what it changes. Diagnosed by replaying the broker's own scan over the outgoing
objects locally. Fixing it is a scanner-tuning or diagram-regeneration concern, not
a rename concern.
testing/tests/data/hermes_kanban_card_corpus.jsonl. Its own test documents it as"a verbatim snapshot of every card on the board"; rewriting a historical record to
match a later rename would falsify it.
Validation
kustomize buildclean for every touched service:services/hermes,services/keycloak,services/quality,services/comms,infrastructure/core.certificate lists 6 SANs, the ensure Job renders as
-12, and the agent--redirect-urland dashboard URL both point at the new host while chat and triageare untouched.
sh -nclean on the ensure script;ruffclean on all touched Python.web origins,
##-joined post-logout,rootUrlcanonical.API_SERVER_CORS_ORIGINScomma-splitting confirmed against the running Hermesbuild, so the paired value is valid.
make test(full quality gate): 2641 passed, 4 failed, 4 skipped. All 4 failuresreproduce identically on unmodified current main (
5f9c600f) and are unrelated tothis change: two node-capacity assertions in
test_hermes_agent_layout.py, onetest_hermes_gitea_pr_integration.pytest that reaches the live network instead ofits monkeypatch, and
test_hermes_kanban_supervisor.py::test_auto_supervise_flag_defaults_false_in_configmap.No new failures.
pins the agent transition contract (CoreDNS, both Ingresses and the certificate must
carry BOTH hosts); and #38's continuity test now covers the agent proxy's dual
origins instead of asserting the agent surface was untouched. Retiring the old host
will deliberately fail these until the retirement change updates them.
New commits pushed, approval review dismissed automatically according to repository settings
WIP: Rename the owner agent host to worker.bstein.dev (supersedes #41)to Rename the owner agent host to worker.bstein.dev (supersedes #41)