operate: a session of a pool is of its template's agent, not of its instance #96
Loading…
Reference in a new issue
No description provided.
Delete branch "pool-agent"
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?
Found in the first foreman-to-worker run on 0.9.0: the worker's pod (
roomcity-worker-sa-wisp-sbd2z-…) mounts only thedoltSecret; the foreman's mountsclaudetoo. The per-session Secret hasGC_AGENTandGC_TEMPLATEamong its keys;[agents.worker]is looked up by the first, which for a pool's session is the instance (sa-wisp-sbd2z), so it matched nothing, and goose had noOPENAI_API_KEY. The same name is what the registry, the rooms and the journal call the agent.GC_TEMPLATEis the agent's name whatever the instance (andGC_AGENT's own for a named session, so the foreman is unchanged).operatetakes it for[agents.*], the process check,always_on,tools, the Job's agent and the registry.Test: a start with
GC_AGENT=sa-wisp-sbd2z,GC_TEMPLATE=workeris the agentworkerin the registry and the Job, and gets its tools.Not seen on the cluster, only read: the values of
GC_AGENTandGC_TEMPLATE(Secret values are not read here); that the Job is named for the agent follows from the mounts.Read at
bb9de62. Green here under-race, the new test five times withGOMAXPROCS=1.The cluster agrees with the reading, without a Secret's value: gc's own log of that start says
session=worker-sa-wisp-sbd2z template=worker, and the foreman's Job is recorded for the agentforeman, so a named session is unchanged.One name everywhere:
agentOffeeds the process check,always_on, the tools put in the pod, the Job's agent (its Secrets, and #95's annotations) and the registry; from the registry'sAgentcome the server's check of a tool at each call, the Matrix user, the room's title and the journal's lines. Nothing else readsGC_AGENTto decide anything; it stays among the marks gc is given back, as the instance, which is what gc needs.Before it merges:
Agent.Process's doc ininternal/config/config.gostill says the table's name is matched against "the agent's name as gc gives it in GC_AGENT". It isGC_TEMPLATEnow, withGC_AGENTwhen gc sets none.### Added.Not proved anywhere yet: what
GC_TEMPLATEis for a service of an imported pack (core.*,bd.dog), which the city keeps at none. If it differs fromGC_AGENTthere, aprocess = truepattern would have to follow it; say so in the README when a city first runs one.bb9de6290864a0751cf5