Open
Conversation
NikhilSinha1
commented
Oct 8, 2025
internal/runner/manager.go
Outdated
| // Derive the runtime context from the manager's context | ||
| runtimeContext, runtimeCancel := context.WithCancel(ctx) | ||
|
|
||
| cmd, callback, err := cp.Restore(runtimeContext) |
Contributor
Author
There was a problem hiding this comment.
Call this postRunnerStart or something
NikhilSinha1
commented
Oct 8, 2025
internal/runner/manager.go
Outdated
| @@ -353,9 +376,72 @@ func (m *Manager) createDefaultRunner(ctx context.Context) (*Runner, error) { | |||
| m.monitorRunnerSubprocess(m.ctx, DefaultRunnerName, runner) | |||
Contributor
Author
There was a problem hiding this comment.
Move this after the goto
NikhilSinha1
commented
Oct 8, 2025
internal/service/service.go
Outdated
| if s.cfg.SignalMode { | ||
| // This runs an infinite loop for handling signals, so we explicitly | ||
| // do not want to put it in a wait group of any kind | ||
| go s.handler.HandleSignals() |
Contributor
Author
There was a problem hiding this comment.
Add a context for cancelling
meatballhat
approved these changes
Oct 8, 2025
Contributor
meatballhat
left a comment
There was a problem hiding this comment.
We went through this synchronously 🎉🌮🎉
nmurthy
approved these changes
Oct 9, 2025
nmurthy
left a comment
There was a problem hiding this comment.
overall LGTM, OOC have you been testing with any specific cogs?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
We want to add checkpointing to cog-runtime, so we can checkpoint and restore models after they completed setup. As such, this PR introduces the
Checkpointerobject, that exposes the ability to checkpoint and restore the model.To enable this, we also want to restore some of the ability for
cogletto use signals to communicate with the parent process over signals rather than over webhooks, as switched to in this PR.