Repository navigation
TrackedSession ignores framework telemetry (INotToBeRouted) — fixes CritterWatch-monitored test hangs - #3390
Merged
Conversation
…ductSupport #33) Continuously-published monitoring traffic (e.g. Wolverine.CritterWatch outbound telemetry) kept tracked sessions from ever completing. The default ignore rule now covers INotToBeRouted in addition to IAgentCommand, with an explicit carve-out for Acknowledgement/FailureAcknowledgement, which the session's acknowledgement APIs depend on. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jeremydmiller
added a commit
that referenced
this pull request
Jul 13, 2026
…ages (#3395) Two things this wave surfaced that the testing guide did not say. Framework telemetry: as of 6.17.3 tracked sessions ignore INotToBeRouted by default (agent commands plus the telemetry a CritterWatch-monitored host publishes), so a monitored host no longer needs a hand-written filter. Documents the IgnoreMessagesMatchingType workaround for older versions, and notes the deliberate Acknowledgement/FailureAcknowledgement carve-out. Timeout: Timeout() bounds the whole session including its stages, so a slow stage like PauseThenCatchUpOnMartenDaemonActivity is capped by the session's 5 second default rather than by any budget internal to the stage. This is the trap behind GH-3388 and is worth saying out loud. Refs ProductSupport#33, #3388, #3390. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 13, 2026
jeremydmiller
added a commit
that referenced
this pull request
Jul 15, 2026
…ommand (revert INotToBeRouted tracking clause) (#3435) GH-3390 made TrackedSession ignore any INotToBeRouted message so continuously- published monitoring telemetry couldn't hold a session open. But INotToBeRouted governs conventional *routing*, not *tracking*, and real messages legitimately carry it while still needing to be trackable — CritterWatch's monitoring messages (ServiceUpdates, command acks, inbound commands) all do. The result was that a downstream running CritterWatch monitoring could no longer assert on ANY of its own traffic in a tracked session; every WaitForMessageToBeReceivedAt on those types timed out. Introduce a dedicated marker, ISystemCommand, that means exactly "system/ infrastructure traffic a tracked session should ignore by default." TrackedSession now ignores IAgentCommand plus ISystemCommand (unless included), and no longer keys off INotToBeRouted. A new IncludeSystemCommands() fluent method opts the system traffic back in for tests that assert on it — the missing escape hatch that INotToBeRouted-based filtering never had. Acknowledgements remain tracked (the session's acknowledgement APIs depend on them); agent commands remain ignored even with system commands included. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Fixes ProductSupport#33: with
AddCritterWatchMonitoringenabled, the monitored host's outbound telemetry (Wolverine.CritterWatch.Messages.Outbound.*, published on the heartbeat/poller cadence) was recorded by tracked sessions and never completed inside the window, soTrackActivity()…ExecuteAndWaitAsyncblocked until timeout.The fix
TrackedSession's default ignore rule grows fromIAgentCommandto aisFrameworkTrafficpredicate:IAgentCommandorINotToBeRouted(every CritterWatch telemetry type implementsICritterWatchMessage : INotToBeRouted), with an explicit carve-out keepingAcknowledgement/FailureAcknowledgementtracked — the session has first-class ack semantics (SendMessageAndWaitForAcknowledgementAsync,AssertAnyFailureAcknowledgements) that must not regress.Blast radius (checked)
Core
INotToBeRoutedimplementors are:ISideEffect,ValidationOutcome,OutgoingMessages(return-value types that never become envelopes), and the two ack types (carved out). The only envelope-borneINotToBeRoutedtraffic in practice is framework telemetry — which is exactly what should never hold a tracked session open. This matches the semanticsSystemMessageTypeExtensions.IsSystemMessageTypealready asserts for observability surfaces.Tests
New
ignoring_framework_and_telemetry_messages(5 tests): telemetry ignored, agent commands still ignored, both ack types still tracked, ordinary app messages still tracked. Full CoreTests suite: 1919 passed / 0 failed locally on net9.0.Ships in the next patch; the
IgnoreMessagesMatchingType(t => t.Namespace?.StartsWith("Wolverine.CritterWatch") == true)workaround remains valid for older versions.🤖 Generated with Claude Code