Skip to content

agent/fix-obi: sync tests to OBI upstream before patching assertions#2560

Merged
rafaelroquetto merged 1 commit intomainfrom
rafael/update_agent_plan
Feb 28, 2026
Merged

agent/fix-obi: sync tests to OBI upstream before patching assertions#2560
rafaelroquetto merged 1 commit intomainfrom
rafael/update_agent_plan

Conversation

@rafaelroquetto
Copy link
Contributor

Summary

  • Adds a "sync before patch" rule to the plan step of the fix-obi agent workflow
  • Prevents the agent from silently patching a failing test assertion when the correct fix is to remove the test block entirely (because OBI removed it upstream)

Context

When an OBI commit removes a feature/option, its test block is also removed upstream. Previously, the plan agent could see a failing Beyla assertion and produce a plan to adjust it (e.g. assert.False(...)) — technically making it green, but diverging from upstream intent.

The new rule instructs the agent to first locate the same test in .obi-src/, compare the failing block against the OBI version, and:

  • Remove the block if OBI removed it (applying the normal OBI→Beyla translation rules)
  • Adjust the assertion only if the block still exists in OBI but the expected value changed

Example that motivated this change

TestWillUseTC in Beyla's config_test.go — OBI removed the "ip" sub-case in
open-telemetry/opentelemetry-ebpf-instrumentation@56db2407, but the agent patched
the assertion instead of removing the block.

@rafaelroquetto rafaelroquetto requested a review from a team as a code owner February 27, 2026 20:48
@rafaelroquetto rafaelroquetto requested a review from skl February 27, 2026 20:49
Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rafaelroquetto rafaelroquetto merged commit 0c8d993 into main Feb 28, 2026
19 checks passed
@rafaelroquetto rafaelroquetto deleted the rafael/update_agent_plan branch February 28, 2026 00:53
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