Repository navigation
Conversation
…tance If an idea was accepted between the dismissal reading it and writing it, the dismissal returned null and the idea card failed on it. Return the idea as it is now, the same way acceptance already does.
A delegated task joined the text of every model step into one string, so an update read like 'I'll make a plan.The plan is saved.' Separate the steps with a blank line.
…te may have happened Every failed file operation showed the same message, so a file over the size limit or a non-regular file gave no reason. Show the reason the computer reports. When a write, PDF write or new folder times out or is interrupted, say it may or may not have been saved instead of calling it a failure.
282eb76 to
5fdb000
Compare
|
Read through the diff. All three fixes change the reported outcome to match what actually happened, and the race test (pausing db.get mid-dismissal) covers exactly the interleaving the first fix targets. A few non-blocking edge cases: 1. engine/model.ts — messageId keying. The separator treats undefined as just another id. A provider that never emits messageId compares undefined !== undefined on every delta, so steps stay joined — safe, but the fix silently no-ops there. A provider that emits messageId on only some deltas of one message is worse: the first delta that drops it compares undefined !== and inserts a blank line in the middle of a message. Separating only when both ids are defined and differ (otherwise append) removes the second case while keeping the first's behavior. 2. computer.ts — truncated on a write. 3. service.ts — the fallback get. It also makes a double-dismiss idempotent (CAS fails because the idea is already dismissed, the get returns it), which is correct. One assumption worth noting: if ideas can be deleted concurrently, the get returns undefined and the caller hits the same "answered with nothing" this PR removes. Fine if ideas are not deletable. Nice that each fix is a separate commit with a test that fails on main first. |
|
thanks for going through this.. checked all three against the code and looks like none can happen today
gonna keep this as is unless a maintainer wants the extra guard |
What was broken
Three places on the server where the result the user (or the agent) saw didn't match what actually happened:
What happens now
How I checked
mainand passes with the change:pnpm lint,pnpm typecheckandpnpm testpass.Each fix is a separate commit.