Repository navigation
#1729 Request correlation's causal scope works without the profiler - #1734
Merged
Merged
Conversation
The correlation switch (Typhon:Profiler:Correlation:Enabled) alone now carries a request's or client command's causal id onto the tick: CausalScope.Capture/Enter, the InTick/WriteInTick hand-off, client-command scoping and the ASP.NET Core listener are gated on CorrelationScopeActive (the switch's own field, renamed from ProfilerCorrelationEnabled). An application reads CausalScope.Current, or CausalScope.IsActive, to stamp its own logs and audit. The profiler's records (ExternalRequest, kinds 236-240, span stamping, the ASP.NET recording middleware) stay on ProfilerCorrelationActive, the profiler master AND the switch. New gated test pass X (profiler off, correlation on) runs the tests that need that configuration: the InTick hand-off, command scoping with break and the end-of-system clear, and CausalScope itself.
…side the profiler It no longer needs the profiler, so its key no longer says it does. The flag catalog gains an optional per-node "key" that overrides the path-derived one; the generators, the reference docs and the shell's telemetry file honour it (the shell writes and reads the flag beside Profiler and ignores a value left at the old spot). Env var: TYPHON__CORRELATION__ENABLED. AddTyphonRequestCorrelation's registration is split so the profiler-off branch is tested in this suite's process: a request's trace id is captured by CausalScope.Capture after an await, and no recording middleware is registered.
This was referenced Dec 2, 2026
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.
Closes #1729.
Request correlation's causal scope no longer needs the profiler. An application (NockWorld's shard, for its logs, journal and audit) turns on one switch and reads
CausalScope.Currenton the tick.Two gates from one switch, now
Typhon:Correlation:Enabled(moved out ofTyphon:Profiler):CorrelationScopeActive(CausalScope.IsActive): the switch alone. GatesCausalScope.Capture/Enter(so theInTick/WriteInTickhand-off), client-command scoping, and the ASP.NET Core listener (a request gets a trace id).ProfilerCorrelationActive: profiler AND the switch. Gates the records (ExternalRequest, kinds 236-240), span stamping, and the ASP.NET recording middleware.static readonly: with the switch off, the JIT removes every branch.Catalog: a node may now carry
"key"to override its path-derived config key. The generators, the reference docs and the shell'styphon telemetryfile model honour it. The shell writes the flag beside Profiler and ignores a value left at the old spot.Tests:
Xinshard.py(profiler off, correlation on):breakkeeps the last id, and the end-of-system clear empties the scope;CausalScopeitself.pre-push.sh: all gate-equivalent checks pass. The engine suite ran 11 054 tests across the gate shards plus the T, C and X passes, with 0 failed.Docs:
claude/design/Profiler/13-request-correlation.md§ 2.2 and overview 09 (Typhon-Claude branchfeature/correlation-scope), the in-depth overview, PACKAGE.md, and the regenerated flag reference.🤖 Generated with Claude Code
https://claude.ai/code/session_01UCUestf7LdQ9JAKiYLAD6v