Skip to content

[rankjoinprocessor] M19 pod-evicted join integration test missing (re-scoped from containerstdout per RFC-0013) #163

Description

@trilamsr

Summary

`TestFailure_PodEvictedRaceM19Join` (PR #158 Phase 13.6 backfill #10) is a reflect-only compile pin asserting:

  • `Config.EvictionMatchWindow` is `time.Duration`
  • `DefaultEvictionMatchWindow == 5*time.Second`
  • `AttrRank == "gen_ai.training.rank"`

It does not exercise the actual M19 cross-receiver join (containerstdout emit + k8sevents pod-evicted within 5s window → single record carries both `gen_ai.training.rank` AND M19 join attrs).

Risk

The compile pin asserts only that the receiver could satisfy the M19 contract surface — it does not assert that it does. Real join correctness can drift undetected.

Fix

End-to-end integration test (likely in `pipeline_test.go` or new `m19_join_test.go`):

  1. Spin up fake k8s client with pod "trainer-0" running on test-node.
  2. Start containerstdout receiver against temp log dir.
  3. Write log line at T0 with rank=3.
  4. Simulate k8sevents pod-evicted event at T0 + 2s (within EvictionMatchWindow=5s).
  5. Assert a single downstream record (or correlated pair, depending on join model) carries:
    • `gen_ai.training.rank=3`
    • `k8s.pod_evicted_at` (or whichever M19 attr the join surfaces)
  6. Repeat with T0 + 10s (outside window) → assert NO correlation.

May require k8sevents test harness to fire pod-evicted events. Check `components/receivers/k8sevents/` for test fixtures.

Why load-bearing

M19 is the load-bearing reason M15 exists (RFC-0010 §M18/M19 joins). A compile pin asserts the surface; only an integration test asserts the behavior. AGENTS.md lesson #8 explicitly names cross-receiver-contract tests.

Affected files

  • `components/receivers/containerstdout/failure_modes_internal_test.go` (TestFailure_PodEvictedRaceM19Join — augment or replace)
  • New integration test referencing both receivers

Origin

PR #158 self-review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions