fix: persist agent respond-to edits; quiet partition overlap errors - #2505
fix: persist agent respond-to edits; quiet partition overlap errors#2505Chessing234 wants to merge 3 commits into
Conversation
|
Thanks for the incredibly thorough writeup — this matches what I saw and adds Confirmed: the instance record is what matters. You nailed it. Patching only One wrinkle to add: it's not just the "Who can talk" control. Saving any On the child-process point — fully agree, and it bit me too: since every Net: with the env override (rightly) reserved and the UI path broken, manually |
|
thanks for confirming — yeah the instance record is the one that sticks; happy to have you poke a build once this lands |
Who-can-talk edits on a persona only wrote definition_respond_to; the harness reads instance respond_to, so linked agents stayed owner-only. Signed-off-by: Taksh <takshkothari09@gmail.com> Signed-off-by: Taksh <takshkothari09@gmail.com>
Match on the overlap message alone so missing SQLSTATE 42P17 no longer logs ERROR on every boot against *_p_future. Signed-off-by: Taksh <takshkothari09@gmail.com> Signed-off-by: Taksh <takshkothari09@gmail.com>
47be6e9 to
e456daa
Compare
|
Read through the diff — the instance-record half is right, and it matches what I confirmed by hand: writing respond_to (+ respond_to_allowlist) onto the records the harness actually reads is what makes the setting stick. Passing the gate explicitly in buildInstanceInputForDefinition rather than leaning on the mint-time lookup is a good call too. Two things I'd want addressed before I test a build, one of which is the "any UI save reverts it" wrinkle I raised — I think this PR makes that one worse rather than better.
In personaManagedAgentUpdate (UserProfilePanelUtils.ts): const personaRespondTo = persona.respondTo ?? "owner-only"; That helper runs on every persona save from the profile panel (submitProfilePersonaDialog calls it unconditionally on the edit path), and it already returns an update whenever any field differs — prompt, model, envVars, name. So for a persona that carries no explicit gate (respondTo undefined, i.e. "unset, harness default applies"), the ?? "owner-only" coercion turns an unrelated edit into an explicit downgrade written onto the instance record. Concretely: instance set to anyone on the agent's own settings, persona with no gate set, edit the persona's system prompt → instance silently goes back to owner-only. That's the failure mode I reported, except before this change the instance record kept its value and the agent kept working. Now the revert reaches the record the harness reads. The Rust side has the same coercion (None => RespondTo::default() in propagate_persona_respond_to) but it's gated behind behavior_present, so it's narrower — it fires on the explicit-clear path that submits {}. Suggested fix: don't coerce. If the definition carries no explicit gate, leave the instance alone — undefined on the definition means "unset", not "owner-only", and only an explicit definition-level choice should overwrite an instance-level one. Plus a test that a prompt-only save produces an update with no respondTo key.
behaviorForSubmit returns undefined when the draft equals its seed, and apply_persona_behavior is a no-op on None. So for anyone sitting on a broken instance today: open the dialog, see "Anyone" already selected (the definition was saved correctly — that half always worked), hit save → nothing submitted → nothing propagated. You have to toggle to a different mode, save, toggle back, save. Nothing reconciles at agent start either, so upgrading to this build doesn't fix existing instances, only future edits. Worth either reconciling definition → instance at start, or propagating on save even when the behavior group is unchanged.
Happy to run a build once (1) is sorted — that's the one that would bite me directly. |
Address review on block#2505: leave instance gates alone when the definition has no explicit respond-to, reconcile an explicit gate on any persona save so stale instances heal, drop the partition overlap hunk, and add regression coverage for the prompt-only path. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed your review:
Happy for another look when you have a moment. |
Address review on block#2505: leave instance gates alone when the definition has no explicit respond-to, reconcile an explicit gate on any persona save so stale instances heal, drop the partition overlap hunk, and add regression coverage for the prompt-only path. Signed-off-by: Taksh <takshkothari09@gmail.com>
Address review on block#2505: leave instance gates alone when the definition has no explicit respond-to, reconcile an explicit gate on any persona save so stale instances heal, drop the partition overlap hunk, and add regression coverage for the prompt-only path. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
c4ee7a3 to
7dc7922
Compare
|
Went through the new diff — all three are genuinely addressed, not just
One thing left, and it's the half of my original report that actually broke me
Could you enumerate the mint/regeneration paths and confirm each one carries the Related: the test plan here is unit-level. The check that would settle it from Separately, for your own bookkeeping: the "any UI save rewrites the definition |
|
Independent repro just landed on #2501 (MaxWynnDev, Desktop v0.5.2 / Windows 11 /
So this PR closes (2) and leaves (1) untouched. That's fine as scope, but the
And it's the repair path I asked for that makes it reachable: it fires on Given (1), it may be worth pulling that fix in here too, or at least confirming |
|
One more interaction, surfaced by a comment on #2501: the working way to set That's a deliberate per-instance choice made through the only path that The no-coerce fix covers "definition gate unset". This is the other case: |
|
@tlongwell-block @wesbillman @wpfleger96 mind taking a look when you get a chance? |
7dc7922 to
173fcc8
Compare
Summary
?? "owner-only"/None => defaultcoerce)Test plan
respond_to=anyoneFixes #2501
Made with Cursor