Commit 1e08d42
fix(observability): flip correct haveSentBuildUpdate flag so BuildUpdate sends once, not per test/hook [SDK-6574]
The one-shot guard `if(!this.haveSentBuildUpdate && ...)` set a dead sibling
field `this.shouldSendBuildUpdate = true` (written here only, read nowhere in
the repo) instead of `this.haveSentBuildUpdate`. The flag never flipped, so the
BuildUpdate event (a byte-identical, build-level `observability_version`
payload) re-fired on every test/hook event — hundreds to thousands of identical
events per build. Setting the real flag (synchronously, before the await — so
interleaved async mocha handlers cannot double-send) restores the intended
once-per-reporter-instance behaviour.
Bug present since the guard was introduced (a0f7404, 2023-06-18); not a
regression. Complements consumer-side dedupe TRAP-4033.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 0ff7157 commit 1e08d42
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
| 568 | + | |
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
| |||
0 commit comments