fix: reconcile the agent's persona during the deploy (#16) - #19
EthanThatOneKid wants to merge 1 commit into
Conversation
agent/instructions.md is Data's prompt, but the agent answers from the copy its memory holds at system/persona.md, and only `npm run sync-persona` reconciles the two. Nothing ran it: the deploy path filter did not watch agent/**, and the deploy script fast-forwarded and restarted without touching the persona. After #7 merged, the live agent was still answering from the pre-cutover text until the sync was run by hand. Watch agent/** and give the deploy script a --run flag that executes a command in the deployed checkout after the fast-forward and before the restart, so the data-http step runs npm run sync-persona on the host. A failing --run aborts with the service untouched. Closes #16.
|
This pull request addresses issue #16 by ensuring that the agent's persona is correctly synchronized during deployment. Previously, changes to
Reviewers should start by examining |
|
This pull request addresses issue #16 by ensuring that the agent's persona is correctly synchronized during deployment. Previously, changes to
Reviewers should start by examining |
Closes #16.
The gap
agent/instructions.mdis Data's prompt, but the agent answers from the copy its memory holds atsystem/persona.md, and onlynpm run sync-personareconciles the two. Nothing ran it:.github/workflows/deploy.ymldid not watchagent/**, so a prompt-only merge triggered no deploy at all.scripts/zo-deploy.tsfast-forwarded the live checkout and restarted each service, but never touched the persona.After #7 merged (
eb59a21) the live agent was still answering from the pre-cutover text; it only caught up when the sync was run by hand (memory checkout0a2928a).The change
deploy.ymlwatchesagent/**and thedata-httpstep passes--run "npm run sync-persona".scripts/zo-deploy.tsgains--run <command>: a command executed on the host in the deployed checkout, after the fast-forward and before the restart. A non-zero exit aborts the deploy with the running service untouched — the same guarantee the fast-forward already had. The dry run does not execute it.Sequencing is the point: the sync has to run after the fast-forward that brings the new
agent/instructions.mdonto the host, and before the services restart.Verification
npm run typecheckclean;npm test29/29, including three new cases against the fake Zo MCP endpoint: the run happens after the fast-forward and before the restart, a failing run leaves the service untouched, and a dry run does not run it.cd <checkout> && npm run sync-persona→system/persona.md already matches agent/instructions.md. It is idempotent, so a deploy with nothing to reconcile is a no-op.deploy.ymlparses, and its path list is nowagent/**,channels/http/**,channels/discord/**,lib/**,scripts/**,package.json,package-lock.json,.github/workflows/deploy.yml.Not in this PR
The retry for rate-limited turns is #18. A prompt-only merge still restarts
data-http; harmless, since the service spawns a freshlettachild per turn and reads the memory at that point.