GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: add ACP session runtime and transcripts by hugodutka · Pull Request #30835 · coder/coder Conversation
|
| HarnessDisplayName: cfg.displayName, | ||
| Status: workspacesdk.ACPSessionStatusInitializing, | ||
| Cursor: workspacesdk.ACPCursor{ | ||
| Epoch: uuid.New(), |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is this official ACP spec? Feels weird to have an epoch with UUID.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No, this is for our own use. We need ids for turns that are unique even across workspace agent restarts.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
How about GenerationID instead of Epoch? I feel like epoch carries the wrong connotation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'll do that
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| func (s *SessionFSM) updateStatusLocked(operation sessionOperation) error { | ||
| target, ok := sessionTransitions[s.info.Status][operation] |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If we enter error state (s.info.Status), the map above has no recovery path. So any consecutive Message would return !ok here? Oversight or intentional? Don't harnesses produce recoverable error states too? I don't know what classifies, but e.g. "over limit" or "model overloaded" are both recoverable states. Don't know if they'd produce error though.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Intentional. A later PR introduces recovery.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| // replaces permissionCtx, allowing an interrupted turn's request. The SDK | ||
| // dispatches callbacks asynchronously without turn identity, so capturing the | ||
| // context before locking cannot reliably bind it to the original turn. | ||
| // We'd need a change in the SDK to resolve this. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sounds like this TODO shouldn't be deferred?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't think deferring this is a problem. We approve all requests automatically. The ACP spec says that if a turn gets interrupted then we must send a "cancelled" response instead of "approved" for the requests sent during that turn. So the problem here is that we now have a small race condition: if you interrupt a turn, then right away start a new turn, and then get a late permission request, we'll send "approved" instead of "cancelled". I don't know what the consequences of doing that would be, but I don't think it's worth handling right now. The race window is really hard to hit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable to defer, thanks for creating the ticket. This behavior and our SDK piqued my curiosity so I dug into it a bit with my agent and had it write comments on these tickets with a suggestion for a slightly adjusted approach.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| var message struct { | ||
| Method string `json:"method"` | ||
| } | ||
| if json.Unmarshal(raw, &message) == nil && message.Method != "" { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Since the timer is still running, we may end up closing after a successful write while doing this post-processing.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
cb403d2 to
7082100
Compare
7082100 to
d4e261a
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Pre-approving for when the 3 remaining issues are fixed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Create dedicated harness sessions and keep their operations, status, and transcripts in a session runtime. Attach callbacks during initialization, retain ordered output, support cancellation and event watching, and close manager-owned processes on shutdown. Unknown sessions return not found. Runtime and lifecycle tests follow in the next change. Restoration and agent API transport are separate changes.
d4e261a to
07fdbd3
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.