-
Notifications
You must be signed in to change notification settings - Fork 2
Fail closed when agents render conflicting content into a shared workspace target #95
Copy link
Copy link
Closed
Labels
area:catalogCatalog structure, declarations, transactions, and admission · Set: manualCatalog structure, declarations, transactions, and admission · Set: manualarea:reconcileSupervisor run loop, lifecycle, restart, park, and teardown · Set: manualSupervisor run loop, lifecycle, restart, park, and teardown · Set: manualorigin:agentFiled or primarily produced by an AI agent · Set: manualFiled or primarily produced by an AI agent · Set: manualtype:bugSomething broken or a regression · Set: manualSomething broken or a regression · Set: manual
Description
Activity
Metadata
Metadata
Assignees
Labels
area:catalogCatalog structure, declarations, transactions, and admission · Set: manualCatalog structure, declarations, transactions, and admission · Set: manualarea:reconcileSupervisor run loop, lifecycle, restart, park, and teardown · Set: manualSupervisor run loop, lifecycle, restart, park, and teardown · Set: manualorigin:agentFiled or primarily produced by an AI agent · Set: manualFiled or primarily produced by an AI agent · Set: manualtype:bugSomething broken or a regression · Set: manualSomething broken or a regression · Set: manual
Problem
Two active agent declarations may name the same workspace and render different
content to the same workspace-relative destination.
st2currentlymaterializes each declaration independently in discovery order, so both
materializations succeed and the last writer silently wins.
This makes the effective workspace overlay depend on reconcile order. A
subsequent targeted materialization can flip the file again. Per-agent files
such as a persona/system-instruction overlay are especially hazardous because
one agent can boot from another agent's content.
Minimal reproduction
Create two local agent declarations with:
workspacecopy "_templates/worker.md" ".st2/PERSONA.md"in onecopy "_templates/orchestrator.md" ".st2/PERSONA.md"in the otherThen run:
st2 up --catalog "$CATALOG" --host h --materialize-onlyActual
The command succeeds. Both operations are reported as materialized and
.st2/PERSONA.mdcontains whichever declaration ran last.Expected
Workspace-relative render destinations have one coherent desired state.
Before the first workspace write, st2 should reject active local declarations
that claim the same resolved workspace destination with incompatible content.
All conflicting owners should be ineligible to launch.
Equivalent idempotent claims may be accepted. Additive operations such as
ensure-lineneed explicit composition semantics; they must not inheritlast-writer-wins behavior accidentally.
Acceptance
Environment
ce2c106Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile