fix(operations): test nesting against the rows being grouped - #135
Merged
Merged
Conversation
`nestedInGroup` walked the log's parent chain, not the selected set's. An operation that `kind` or `namespace` had excluded could still suppress a member's `durationTotalNs`, so the row reported a total below its own self time — impossible, and undetectable by the caller. Measured over 124 real logs and every selection: 114 rows in 111,624. Refs certinia#101
lcottercertinia
approved these changes
Aug 14, 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 the follow-up left by #101.
nestedInGroupwalked the log's parent chain, not the selected set's. An operation thatkindornamespacehad excluded could still suppress a member'sdurationTotalNs, so the grouped row reported a total below its owndurationSelfMs— impossible in the domain, and undetectable by the caller.Nesting is now tested against the rows being grouped. The membership
Setis built insidegroupOperations, so no call site can forget it.Measured
124 real logs, every
kindandnamespaceagainst everygroupBy, 111,624 grouped rows:Both new tests fail on the unfixed code.
Verification
pnpm test267 pass,pnpm run eval6 cases pass. No golden and no README figure moves — both eval fixtures call unfiltered.Refs #101