test(outbox): assert cold-poller tracestate co-carry (PR #24 R3 follow-up) #25

Merged
hibryda merged 2 commits from test/outbox-poller-tracestate-assert into main 2026-06-01 16:41:34 +02:00
Owner

Header

im2be-platform-libs · PR #24 R3 follow-up (cold-poller tracestate co-carry test) · test/outbox-poller-tracestate-assertmain

TL;DR

Closes the lone MINOR from PR #24 R3 (which landed after #24 merged): the cold-poller test asserted only traceparent, leaving the tracestate co-carry wiring (OutboxPollerWorkerkafkaHeadersFor(..., record.getTraceState())) unguarded against a silent refactor.

Summary

GC-23 (b) producer carry merged in #24. R3's minor: coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent set traceParent but never traceState, so the poller's second-arg wiring was unasserted. Added a persisted tracestate to the row + a verbatim tracestate-header assertion. Unit-level co-carry is already covered by OutboxTraceContextTest.kafkaHeadersForTraceParentAndStateEmitsBothHeaders; this is the narrow poller-wiring guard.

Verification

mvn -pl outbox-publisher test -Dtest=OutboxPollerWorkerTest → 14 green, 0 [WARNING].

Verdict

NEEDS_REVIEW — test-only; no production change.

im2be-platform-libs · GC-23(b) R3 follow-up · test-only · 14 green · 2026-06-01

## Header **im2be-platform-libs** · PR #24 R3 follow-up (cold-poller tracestate co-carry test) · `test/outbox-poller-tracestate-assert` → `main` ## TL;DR Closes the lone MINOR from PR #24 R3 (which landed after #24 merged): the cold-poller test asserted only `traceparent`, leaving the `tracestate` co-carry wiring (`OutboxPollerWorker` → `kafkaHeadersFor(..., record.getTraceState())`) unguarded against a silent refactor. ## Summary GC-23 (b) producer carry merged in #24. R3's minor: `coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent` set `traceParent` but never `traceState`, so the poller's second-arg wiring was unasserted. Added a persisted `tracestate` to the row + a verbatim `tracestate`-header assertion. Unit-level co-carry is already covered by `OutboxTraceContextTest.kafkaHeadersForTraceParentAndStateEmitsBothHeaders`; this is the narrow poller-wiring guard. ## Verification `mvn -pl outbox-publisher test -Dtest=OutboxPollerWorkerTest` → 14 green, 0 `[WARNING]`. ## Verdict NEEDS_REVIEW — test-only; no production change. ## Footer im2be-platform-libs · GC-23(b) R3 follow-up · test-only · 14 green · 2026-06-01
test(outbox): assert cold-poller tracestate co-carry (PR #24 R3 follow-up)
Some checks failed
im2be-platform-libs CI / mvn verify (main only) (pull_request) Has been cancelled
im2be-platform-libs CI / mvn install (pull_request) Has been cancelled
dcbf1f9a32
PR #24 R3 flagged a MINOR wiring-coverage gap: the cold-poller test set only
traceParent, so OutboxPollerWorker's tracestate co-carry (the second arg of
kafkaHeadersFor(record.getTraceParent(), record.getTraceState()),
OutboxPollerWorker.java:218-219) was unasserted at the wiring level — a refactor
dropping/shadowing record.getTraceState() would have passed silently. The
unit-level logic is already covered by
OutboxTraceContextTest.kafkaHeadersForTraceParentAndStateEmitsBothHeaders;
this closes the poller-wiring gap.

Fix: set a persisted tracestate on the row in
coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent and assert the
re-emitted Kafka 'tracestate' header equals it verbatim.

Verification: mvn -pl outbox-publisher test -Dtest=OutboxPollerWorkerTest -> 14
green, 0 [WARNING].

Superseded by round 2.

Show previous round

hib-pr-reviewer review — PR #25 (affinity-intelligence-rework/im2be-platform-libs)

Round 1 — head dcbf1f9a3265, base main, trigger opened

TL;DR: CONDITIONAL_APPROVE — 1 agreed minor finding kept (stale method name/Javadoc); no blocking issues.

Summary

Reconciliation

No prior run history found in Memora for this PR — this is round 1.

Both A and B independently raised the same finding at the same file (OutboxPollerWorkerTest.java) and same line (376), both identifying that the enclosing method name coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent (line 340) and its Javadoc (lines 331–337) no longer describe the full scope of the test after the tracestate co-carry assertions were added in this PR. Verification via Read confirmed:

  • Method name at line 340: coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent — mentions only traceparent.
  • Javadoc at lines 331–337: describes only the traceparent contract; no mention of tracestate.
  • New assertions at lines 376–385 (added by this PR): clearly test tracestate co-carry.

The agreed finding is kept with severity minor (both reviewers). B's additional detail about the Javadoc staleness is incorporated into the body as it strengthens the same grounded finding. Run summary persisted to Memora (memory id 491).

Blast Radius

The diff touches a single test file within the outbox-publisher module. No production code is modified. Impact is limited to test discoverability and future maintainability of the tracing assertions.

BLAST_SCORE: 1/10

CI status (head dcbf1f9a3265)

Overall: pending

2 checks: 2 pending

Check State Link
im2be-platform-libs CI / mvn verify (main only) (pull_request) pending details
im2be-platform-libs CI / mvn install (pull_request) pending details

Findings (1)

[MINOR] Method name and Javadoc are stale — tracestate co-carry coverage is invisible from both

outbox-publisher/src/test/java/com/aim2be/platform/outbox/OutboxPollerWorkerTest.java:376

The new assertions at lines 376–385 extend the test to verify tracestate co-carry, but the enclosing method coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent (line 340) and its Javadoc (lines 331–337) mention only traceparent. A reader scanning test results or grepping for tracestate tests will not find this method, and a CI failure report will name only 'traceparent'.

Concrete options:

  1. Rename + extend Javadoc — e.g. coldPublishReEmitsPersistedTraceparentAndTracestateAndOmitsWhenAbsent and add a sentence such as "When a traceState was persisted it is co-carried verbatim as the tracestate Kafka header." to the Javadoc.
  2. Extract — move the new tracestate block into a dedicated @Test void coldPublishCoCarriesPersistedTracestate() so both concerns are individually discoverable in test reports.
  3. Shorter group namecoldPublishReEmitsPersistedTraceContextAndOmitsWhenAbsent() if the intent is to group all W3C trace fields together under a single umbrella.

Verdict

CONDITIONAL_APPROVE


hib-pr-reviewer • round 1 • 1 finding (1m) • 2026-06-01T14:35:46.853Z → 2026-06-01T14:36:34.819Z • posted-as: pr-reviewer-bot • model: auto

<!-- hib-pr-reviewer collapsed --> > _Superseded by round 2._ <details> <summary>Show previous round</summary> <!-- hib-pr-reviewer round:1 --> ## hib-pr-reviewer review — PR #25 (affinity-intelligence-rework/im2be-platform-libs) **Round 1** — head `dcbf1f9a3265`, base `main`, trigger `opened` **TL;DR:** CONDITIONAL_APPROVE — 1 agreed minor finding kept (stale method name/Javadoc); no blocking issues. ### Summary ## Reconciliation No prior run history found in Memora for this PR — this is round 1. Both A and B independently raised **the same finding** at the same file (`OutboxPollerWorkerTest.java`) and same line (376), both identifying that the enclosing method name `coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent` (line 340) and its Javadoc (lines 331–337) no longer describe the full scope of the test after the tracestate co-carry assertions were added in this PR. Verification via `Read` confirmed: - Method name at line 340: `coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent` — mentions only `traceparent`. - Javadoc at lines 331–337: describes only the `traceparent` contract; no mention of `tracestate`. - New assertions at lines 376–385 (added by this PR): clearly test `tracestate` co-carry. The agreed finding is kept with severity **minor** (both reviewers). B's additional detail about the Javadoc staleness is incorporated into the body as it strengthens the same grounded finding. Run summary persisted to Memora (memory id 491). ### Blast Radius The diff touches a single test file within the outbox-publisher module. No production code is modified. Impact is limited to test discoverability and future maintainability of the tracing assertions. **BLAST_SCORE: 1/10** ### CI status (head `dcbf1f9a3265`) **Overall: ⏳ pending** 2 checks: 2 pending | Check | State | Link | |---|---|---| | im2be-platform-libs CI / mvn verify (main only) (pull_request) | ⏳ pending | [details](/affinity-intelligence-rework/im2be-platform-libs/actions/runs/124/jobs/1) | | im2be-platform-libs CI / mvn install (pull_request) | ⏳ pending | [details](/affinity-intelligence-rework/im2be-platform-libs/actions/runs/124/jobs/0) | ### Related PRs - affinity-intelligence-rework/im2be-platform-libs#24 ### Findings (1) #### **[MINOR]** Method name and Javadoc are stale — tracestate co-carry coverage is invisible from both _outbox-publisher/src/test/java/com/aim2be/platform/outbox/OutboxPollerWorkerTest.java:376_ The new assertions at lines 376–385 extend the test to verify `tracestate` co-carry, but the enclosing method `coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent` (line 340) and its Javadoc (lines 331–337) mention only `traceparent`. A reader scanning test results or grepping for tracestate tests will not find this method, and a CI failure report will name only 'traceparent'. Concrete options: 1. **Rename + extend Javadoc** — e.g. `coldPublishReEmitsPersistedTraceparentAndTracestateAndOmitsWhenAbsent` and add a sentence such as *"When a `traceState` was persisted it is co-carried verbatim as the `tracestate` Kafka header."* to the Javadoc. 2. **Extract** — move the new tracestate block into a dedicated `@Test void coldPublishCoCarriesPersistedTracestate()` so both concerns are individually discoverable in test reports. 3. **Shorter group name** — `coldPublishReEmitsPersistedTraceContextAndOmitsWhenAbsent()` if the intent is to group all W3C trace fields together under a single umbrella. ### Verdict **CONDITIONAL_APPROVE** --- <sub>hib-pr-reviewer • round 1 • 1 finding (1m) • 2026-06-01T14:35:46.853Z → 2026-06-01T14:36:34.819Z • posted-as: pr-reviewer-bot • model: auto</sub> </details>
test(outbox): rename + redoc cold-poller test to surface tracestate co-carry (#25 R1)
All checks were successful
im2be-platform-libs CI / mvn install (pull_request) Successful in 3m28s
im2be-platform-libs CI / mvn verify (main only) (pull_request) Has been skipped
6201853673
#25 R1 MINOR: the method name + Javadoc mentioned only traceparent after the
tracestate assertion was added, so the tracestate coverage was invisible to a
reader/grep/CI report. Renamed
coldPublishReEmitsPersistedTraceparentAndOmitsWhenAbsent ->
coldPublishReEmitsPersistedTraceparentAndTracestateAndOmitsWhenAbsent and
extended the Javadoc to state the tracestate co-carry. No assertion change.

Verification: mvn -pl outbox-publisher test -Dtest=OutboxPollerWorkerTest -> green, 0 [WARNING].

hib-pr-reviewer review — PR #25 (affinity-intelligence-rework/im2be-platform-libs)

Round 2 — head 620185367309, base main, trigger synchronize

TL;DR: CONDITIONAL_APPROVE — kept 1 verified unique-to-A minor Javadoc style finding; R1 finding confirmed resolved; no blocking issues.

Summary

Round 2 Arbitration — CONDITIONAL_APPROVE

Memora recall returned no prior run history (both queries empty); this is treated as the first arbitration record for PR #25. Memora persistence attempted but failed due to tag-allowlist restrictions.

Reconciliation:

  • Reviewer A: 1 minor finding (Javadoc mixes {@code traceState} Java camelCase with {@code tracestate} W3C lowercase in same sentence, lines 335–336)
  • Reviewer B: 0 findings

Verification of unique-to-A finding: Read at offset 328 confirms lines 335–336 read exactly as A described — When a {@code traceState} was persisted it is (line 335) followed by co-carried verbatim as the {@code tracestate} header. (line 336). The mixed capitalisation within a single sentence is factually present. Finding kept.

Prior R1 finding: Both reviewers agree it is fully resolved (method renamed, Javadoc updated, assertions added). Not re-raised.

Kept 1 unique-to-A verified finding. Dropped 0.

Blast Radius

The diff touches a single test file only — no production classes, no exported interfaces, no migration files. The change is entirely additive (new assertions + Javadoc update). Blast radius is effectively zero beyond the test suite.

BLAST_SCORE: 1/10

CI status (head 620185367309)

Overall: pending

2 checks: 2 pending

Check State Link
im2be-platform-libs CI / mvn verify (main only) (pull_request) pending details
im2be-platform-libs CI / mvn install (pull_request) pending details

Findings (1)

[MINOR] Javadoc mixes {@code traceState} (Java field) and {@code tracestate} (W3C header) in the same sentence

outbox-publisher/src/test/java/com/aim2be/platform/outbox/OutboxPollerWorkerTest.java:335

Line 335 reads When a {@code traceState} was persisted it is while line 336 continues co-carried verbatim as the {@code tracestate} header. The first token uses the Java setter capitalisation; the second uses the W3C spec name. Both are individually correct but switching conventions mid-sentence causes readers who scan @code tokens as spec names to see two apparently different identifiers for the same concept.

Proposed fix — use the W3C lowercase name throughout, since the Javadoc describes the observable Kafka-header contract rather than the Java API:

* SAME business trace. When a {@code tracestate} was persisted it is
* co-carried verbatim as the {@code tracestate} header. When no

Alternatively, if calling out the Java field is intentional, prefer the linked form: {@link OutboxRecord#getTraceState() tracestate}.

Verdict

CONDITIONAL_APPROVE


hib-pr-reviewer • round 2 • 1 finding (1m) • 2026-06-01T14:39:31.591Z → 2026-06-01T14:40:52.088Z • posted-as: pr-reviewer-bot • model: auto

<!-- hib-pr-reviewer round:2 --> ## hib-pr-reviewer review — PR #25 (affinity-intelligence-rework/im2be-platform-libs) **Round 2** — head `620185367309`, base `main`, trigger `synchronize` **TL;DR:** CONDITIONAL_APPROVE — kept 1 verified unique-to-A minor Javadoc style finding; R1 finding confirmed resolved; no blocking issues. ### Summary **Round 2 Arbitration — CONDITIONAL_APPROVE** Memora recall returned no prior run history (both queries empty); this is treated as the first arbitration record for PR #25. Memora persistence attempted but failed due to tag-allowlist restrictions. **Reconciliation:** - Reviewer A: 1 minor finding (Javadoc mixes `{@code traceState}` Java camelCase with `{@code tracestate}` W3C lowercase in same sentence, lines 335–336) - Reviewer B: 0 findings **Verification of unique-to-A finding:** `Read` at offset 328 confirms lines 335–336 read exactly as A described — `When a {@code traceState} was persisted it is` (line 335) followed by `co-carried verbatim as the {@code tracestate} header.` (line 336). The mixed capitalisation within a single sentence is factually present. Finding kept. **Prior R1 finding:** Both reviewers agree it is fully resolved (method renamed, Javadoc updated, assertions added). Not re-raised. Kept 1 unique-to-A verified finding. Dropped 0. ### Blast Radius The diff touches a single test file only — no production classes, no exported interfaces, no migration files. The change is entirely additive (new assertions + Javadoc update). Blast radius is effectively zero beyond the test suite. **BLAST_SCORE: 1/10** ### CI status (head `620185367309`) **Overall: ⏳ pending** 2 checks: 2 pending | Check | State | Link | |---|---|---| | im2be-platform-libs CI / mvn verify (main only) (pull_request) | ⏳ pending | [details](/affinity-intelligence-rework/im2be-platform-libs/actions/runs/125/jobs/1) | | im2be-platform-libs CI / mvn install (pull_request) | ⏳ pending | [details](/affinity-intelligence-rework/im2be-platform-libs/actions/runs/125/jobs/0) | ### Related PRs - affinity-intelligence-rework/im2be-platform-libs#24 ### Findings (1) #### **[MINOR]** Javadoc mixes `{@code traceState}` (Java field) and `{@code tracestate}` (W3C header) in the same sentence _outbox-publisher/src/test/java/com/aim2be/platform/outbox/OutboxPollerWorkerTest.java:335_ Line 335 reads `When a {@code traceState} was persisted it is` while line 336 continues `co-carried verbatim as the {@code tracestate} header.` The first token uses the Java setter capitalisation; the second uses the W3C spec name. Both are individually correct but switching conventions mid-sentence causes readers who scan `@code` tokens as spec names to see two apparently different identifiers for the same concept. **Proposed fix** — use the W3C lowercase name throughout, since the Javadoc describes the observable Kafka-header contract rather than the Java API: ```java * SAME business trace. When a {@code tracestate} was persisted it is * co-carried verbatim as the {@code tracestate} header. When no ``` Alternatively, if calling out the Java field is intentional, prefer the linked form: `{@link OutboxRecord#getTraceState() tracestate}`. ### Verdict **CONDITIONAL_APPROVE** --- <sub>hib-pr-reviewer • round 2 • 1 finding (1m) • 2026-06-01T14:39:31.591Z → 2026-06-01T14:40:52.088Z • posted-as: pr-reviewer-bot • model: auto</sub>
hibryda deleted branch test/outbox-poller-tracestate-assert 2026-06-01 16:41:34 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
affinity-intelligence-rework/im2be-platform-libs!25
No description provided.