MCPcopy Index your code
hub / github.com/docker/docker-agent / OnRunStart

Method OnRunStart

pkg/runtime/persistence_observer.go:60–67  ·  view source on GitHub ↗

OnRunStart persists the session row before the run loop starts. Sub-sessions skip this: the parent session's store absorbs them via the SubSessionCompletedEvent handling in OnEvent.

(ctx context.Context, sess *session.Session)

Source from the content-addressed store, hash-verified

58// Sub-sessions skip this: the parent session's store absorbs them via
59// the SubSessionCompletedEvent handling in OnEvent.
60func (p *PersistenceObserver) OnRunStart(ctx context.Context, sess *session.Session) {
61 if sess.IsSubSession() {
62 return
63 }
64 if err := p.store.UpdateSession(ctx, sess); err != nil {
65 slog.WarnContext(ctx, "Failed to persist initial session", "session_id", sess.ID, "error", err)
66 }
67}
68
69// OnEvent applies the per-event-type persistence rules. Sub-session
70// events are skipped (the parent absorbs them on SubSessionCompleted),

Callers

nothing calls this directly

Calls 2

UpdateSessionMethod · 0.65
IsSubSessionMethod · 0.45

Tested by

no test coverage detected