Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b38ce13
refactor(logging): route session logs off the log event, delete the A…
Aaronontheweb Jun 25, 2026
2bd56ea
test(logging): end-to-end proof actor _log routes to session.log via …
Aaronontheweb Jun 25, 2026
b801c2c
Merge branch 'dev' into refactor/unify-session-logging
Aaronontheweb Jun 25, 2026
c9f02e5
refactor(logging): publish session logs explicitly instead of routing…
Aaronontheweb Jun 26, 2026
27e0008
Merge branch 'dev' into refactor/unify-session-logging
Aaronontheweb Jun 26, 2026
9551067
fix(logging): publish routed-skill sub-agent spawn lifecycle to sessi…
Aaronontheweb Jun 26, 2026
748b2bb
feat(logging): correlate LLM chat-client diagnostics to sessions via …
Aaronontheweb Jun 26, 2026
7dace13
refactor(logging): address code-review findings on session-log correl…
Aaronontheweb Jun 26, 2026
dad8fb4
refactor(logging): centralize the "SessionId"/"SubSessionId" log-attr…
Aaronontheweb Jun 26, 2026
fc10a1a
refactor(logging): drop RetryingChatClient's redundant SessionId scope
Aaronontheweb Jun 26, 2026
3409ed7
Merge branch 'dev' into refactor/unify-session-logging
Aaronontheweb Jun 26, 2026
96408ab
refactor(logging): collapse sub-agent spawn breadcrumbs to one fan-ou…
Aaronontheweb Jun 26, 2026
33a708a
feat(logging): partition the log stream by session instead of explici…
Aaronontheweb Jun 29, 2026
38460e3
test(logging): end-to-end partition proof through the real Akka->MEL …
Aaronontheweb Jun 29, 2026
d95ba18
fix(logging): harden the session-partition sink (code-review follow-up)
Aaronontheweb Jun 30, 2026
fb629a3
docs(logging): document the dormant non-streaming retry session-scope…
Aaronontheweb Jun 30, 2026
70d8bf4
refactor(logging): drop the startup buffer + lock for a single volati…
Aaronontheweb Jun 30, 2026
138afba
Merge remote-tracking branch 'origin/refactor/unify-session-logging' …
Aaronontheweb Jun 30, 2026
e0e5776
Merge branch 'dev' into refactor/unify-session-logging
Aaronontheweb Jun 30, 2026
f49a87b
fix(logging): breadcrumb emitters take SubAgentRunId after the merged…
Aaronontheweb Jun 30, 2026
a9b1ea0
feat(logging): give each sub-agent run its own session.log, keyed by …
Aaronontheweb Jun 30, 2026
841dc7c
fix(logging): restore session correlation for sidecar LLM paths (code…
Aaronontheweb Jun 30, 2026
cfcff8f
feat(logging): flush the audit transcript immediately, keep diagnosti…
Aaronontheweb Jun 30, 2026
bebffde
refactor(logging): batch daemon.log flushes + consolidate the /subage…
Aaronontheweb Jun 30, 2026
3ddd796
fix(logging): guard PostStop dispose, fix audit-durability doc, scope…
Aaronontheweb Jun 30, 2026
6395863
fix(logging): keep daemon-infra session-named lines in daemon.log; ca…
Aaronontheweb Jun 30, 2026
8da21e6
Merge branch 'dev' into refactor/unify-session-logging
Aaronontheweb Jun 30, 2026
28c400a
test(logging): address code-quality bot findings (Path.Join, drain-lo…
Aaronontheweb Jul 1, 2026
44f31d6
Merge branch 'dev' into refactor/unify-session-logging
Aaronontheweb Jul 1, 2026
3ec711e
Merge branch 'dev' into refactor/unify-session-logging
Aaronontheweb Jul 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,20 @@ What to expect inside `session.log`:
cross-referencing two files.
- Two line shapes: session output audit lines (`User:`, `Assistant:`,
`Thinking:`, `Tool call:`, `Tool result:`, `Usage:`, `Turn N completed`,
etc.) and `Diagnostic:` lines from MEL providers (LLM client, HTTP,
retry middleware) emitted under a session diagnostics scope.
etc.) and `Diagnostic:` lines. Diagnostic lines reach `session.log` only
when a producer *explicitly publishes* them — notably the sub-agent spawn
lifecycle (requested, child spawned, dispatched, completed/failed, and
guard rejections), so a failed or blocked spawn is visible here. It is an
explicit publish, not automatic routing of every log line.
- Best-effort observability. Individual lines may be dropped on transient
IO errors and logged at Debug level in the daemon log; this is not a
transactional audit trail. Cross-check the daemon log for warnings
if a critical line appears missing.
- Sidecar paths (compaction, title generation, sub-agents, memory
distillation) currently bypass the session diagnostics scope, so their
internal diagnostics may not appear in `session.log` even though their
output audit lines do. Tracked in netclaw-dev/netclaw#920.
- Most actor and operational logs are NOT in `session.log` — only explicitly
published lines are. An actor's own lifecycle logging, and the LLM-client /
HTTP / retry / failover decorator internals, go to `daemon.log` (filterable
by the `SessionId` structured field where the line carries one). For an
actor's full lifecycle or deep LLM-call internals, read `daemon.log`.

| Symptom | Check |
|---------|-------|
Expand Down
242 changes: 0 additions & 242 deletions src/Netclaw.Actors.Tests/Sessions/SidecarDiagnosticsContextTests.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// -----------------------------------------------------------------------
// <copyright file="SessionDiagnosticsContextTests.cs" company="Petabridge, LLC">
// <copyright file="SubAgentSessionScopeTests.cs" company="Petabridge, LLC">
// Copyright (C) 2026 - 2026 Petabridge, LLC <https://petabridge.com>
// </copyright>
// -----------------------------------------------------------------------
using Netclaw.Configuration;
using Netclaw.Actors.SubAgents;
using Xunit;

namespace Netclaw.Configuration.Tests;
namespace Netclaw.Actors.Tests.SubAgents;

public sealed class SessionDiagnosticsContextTests
public sealed class SubAgentSessionScopeTests
{
[Theory]
[InlineData("ch/thr/subagent/skill", "ch/thr")]
[InlineData("ch/thr", "ch/thr")]
[InlineData("ch/thr/subagent/skill/inner", "ch/thr")]
public void NormalizeSessionId_collapses_subagent_marker_to_parent_id(string input, string expected)
{
Assert.Equal(expected, SessionDiagnosticsContext.NormalizeSessionId(input));
Assert.Equal(expected, SubAgentSessionScope.NormalizeSessionId(input));
}

[Theory]
Expand All @@ -25,6 +25,6 @@ public void NormalizeSessionId_collapses_subagent_marker_to_parent_id(string inp
[InlineData(" ")]
public void NormalizeSessionId_returns_null_for_blank(string? input)
{
Assert.Null(SessionDiagnosticsContext.NormalizeSessionId(input));
Assert.Null(SubAgentSessionScope.NormalizeSessionId(input));
}
}
Loading
Loading