Skip to content

fix(operations): test nesting against the rows being grouped - #135

Merged
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:101-nesting-membership
Aug 14, 2026
Merged

fix(operations): test nesting against the rows being grouped#135
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:101-nesting-membership

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

Closes the follow-up left by #101.

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 grouped row reported a total below its own durationSelfMs — impossible in the domain, and undetectable by the caller.

Nesting is now tested against the rows being grouped. The membership Set is built inside groupOperations, so no call site can forget it.

Measured

124 real logs, every kind and namespace against every groupBy, 111,624 grouped rows:

impossible rows
before 114
after 0

Both new tests fail on the unfixed code.

Verification

pnpm test 267 pass, pnpm run eval 6 cases pass. No golden and no README figure moves — both eval fixtures call unfiltered.

Refs #101

`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
lcottercertinia merged commit 5208302 into certinia:main Aug 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants