mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 08:24:46 +00:00
docs(server): the handle-less recreate gap spans the agent.create.before hook
This commit is contained in:
@@ -134,8 +134,10 @@ export async function ensureAgentLoaded(
|
||||
}
|
||||
// Known gap: `record` was read before this create, and createAgent deletes the stored
|
||||
// state outside the agent's lifecycle lane. A setMetadata that saves between the read and
|
||||
// the delete is overwritten by this stale metadata. The fix is to read and delete the
|
||||
// stored record inside the lane (createAgentInternal), which is a lifecycle change.
|
||||
// the delete is overwritten by this stale metadata. That window spans everything from the
|
||||
// read to the delete, including the agent.create.before hook, which a plugin can hold
|
||||
// open. The fix is to read and delete the stored record inside the lane
|
||||
// (createAgentInternal), which is a lifecycle change.
|
||||
snapshot = await deps.agentManager.createAgent(config, agentId, {
|
||||
labels: record.labels,
|
||||
metadata: record.metadata,
|
||||
|
||||
Reference in New Issue
Block a user