fix(personas): add description + expectedUpdatedAt fields missing after main merge

After merging origin/main (cb3144999, #7126 public descriptions), two
struct initializers need updating for the new description field introduced
by that PR:

- concurrent_edit_tests.rs: add description: None to AgentDefinition,
  UpdatePersonaRequest (×2), and ManagedAgentRecord initializers
- personaTypes.ts: add expectedUpdatedAt to UpdatePersonaInput (moved
  from types.ts by #7126 but the field was not carried across)

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
Duncan
2026-09-01 10:47:09 -04:00
parent 25f4a5514a
commit 9d23c191dc
2 changed files with 11 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ fn persona(id: &str, display_name: &str, updated_at: &str) -> AgentDefinition {
id: id.to_string(),
display_name: display_name.to_string(),
avatar_url: None,
description: None,
system_prompt: "Do the work.".to_string(),
runtime: None,
model: None,
@@ -151,6 +152,7 @@ fn update_request(id: &str, display_name: &str, expected: Option<&str>) -> Updat
id: id.to_string(),
display_name: display_name.to_string(),
avatar_url: None,
description: None,
system_prompt: "Do the work.".to_string(),
runtime: None,
model: None,
@@ -459,6 +461,7 @@ async fn linked_instance_rename_completes_before_retain_error_propagates() {
respond_to: Default::default(),
respond_to_allowlist: vec![],
display_name: Some("Alice".to_string()),
description: None,
slug: None,
runtime: None,
name_pool: vec![],
@@ -485,6 +488,7 @@ async fn linked_instance_rename_completes_before_retain_error_propagates() {
id: "p1".to_string(),
display_name: "Alice Renamed".to_string(),
avatar_url: None,
description: None,
system_prompt: "Do the work.".to_string(),
runtime: None,
model: None,

View File

@@ -95,4 +95,11 @@ export type UpdatePersonaInput = {
namePool?: string[];
envVars?: Record<string, string>;
behavior?: PersonaBehaviorInput;
/**
* Seed-time definition revision for the backend's lock-held compare-and-swap.
* When present the backend rejects the write if the persisted `updated_at`
* has advanced since the editor was seeded — preventing a stale full-replacement
* from clobbering a concurrent writer. Omit (undefined) to skip the check.
*/
expectedUpdatedAt?: string;
};