Skip to content

ci: ingest via telemetrygen (gRPC) + assert body reconstruction in the deploy smoke test - #319

Merged
jensholdgaard merged 3 commits into
mainfrom
ci/deploy-test-assert-body
Jun 30, 2026
Merged

ci: ingest via telemetrygen (gRPC) + assert body reconstruction in the deploy smoke test#319
jensholdgaard merged 3 commits into
mainfrom
ci/deploy-test-assert-body

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jun 30, 2026

Copy link
Copy Markdown
Owner

What

Strengthen the deploy smoke test (#318) to assert body reconstruction end-to-end, now that #302 (closed via #312) is done.

Previously the smoke test asserted only rows >= 1 with a comment deferring body text "to #302". The receiver now persists the miner's template audit events, so the querier reconstructs clean-row bodies bit-identically (CLAUDE.md §3.3). This makes the k8s deploy path verify that: after the row is queried back, assert body.line equals the ingested line and reconstruction == "faithful".

Details

  • Success condition now requires the row and a faithful body render (retries until both hold; the sink's audit barrier flushes audit events before the data, so a visible row implies a derivable registry).
  • The ingested log line is an env var (LOG_BODY) reused by both ingest and assertion, so they can't drift.

Validation

Validated on this PR via the temporary path-scoped pull_request trigger (workflow_dispatch can't target a non-default branch); dropped before merge — final state is on-demand + nightly only.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved smoke test coverage for pull request changes.
    • Strengthened log validation to ensure ingested logs are checked more accurately before a run is marked successful.
    • Added clearer failure reporting when expected log data is not returned or reconstructed correctly.

@jensholdgaard
jensholdgaard requested a review from Copilot June 30, 2026 11:03
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2392e952-49cb-4f63-b2f3-7494e20be92e

📥 Commits

Reviewing files that changed from the base of the PR and between 8c90414 and a453622.

📒 Files selected for processing (1)
  • .github/workflows/deploy-test.yml
📝 Walkthrough

Walkthrough

The deploy-test workflow gains a pull_request trigger, switches OTLP log ingestion from HTTP/JSON via port-forward to an in-cluster telemetrygen Kubernetes Job over gRPC, and upgrades query verification to assert both exact log body (LOG_BODY) and faithful reconstruction mode.

Smoke Test Overhaul

Layer / File(s) Summary
Trigger and LOG_BODY env var
.github/workflows/deploy-test.yml
Adds a pull_request trigger scoped to the workflow file and defines LOG_BODY: user 1 logged in as the shared log content for ingestion and verification.
In-cluster telemetrygen gRPC ingestion job
.github/workflows/deploy-test.yml
Replaces kubectl port-forward + curl OTLP/JSON with a Kubernetes Job running a pinned telemetrygen image that sends logs to ourios-receiver:4317 over gRPC with --body $LOG_BODY.
Query verification: body and reconstruction assertions
.github/workflows/deploy-test.yml
Upgrades the polling loop to extract line and reconstruction from the first returned record, fail if line != LOG_BODY, and fail if reconstruction != "faithful".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit hops through gRPC lanes,
No more JSON over port-forward chains.
telemetrygen fires the log,
faithful reconstruction's no fog.
The body matches, the test is bright — 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description covers the change and validation, but it misses the template's Summary/Related/Checklist sections, including the required checklist. Rewrite it using the repo template and add Summary, Related, and a filled checklist for fmt, clippy, tests, docs, and RFC if relevant.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: ingesting via telemetrygen and asserting body reconstruction in the deploy smoke test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/deploy-test-assert-body

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Strengthens the existing kind-based deploy smoke test workflow to validate end-to-end log body reconstruction (not just presence of queried rows) by asserting the queried body.line matches the ingested message and body.reconstruction reports faithful.

Changes:

  • Introduces LOG_BODY as a shared input for ingestion and assertion to avoid drift.
  • Extends the query assertion to require body.line == LOG_BODY and reconstruction == "faithful".
  • Adds a path-scoped pull_request trigger intended as temporary for PR self-validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/deploy-test.yml Outdated
Comment thread .github/workflows/deploy-test.yml Outdated
Comment thread .github/workflows/deploy-test.yml Outdated
Two related strengthenings of the deploy smoke test:

- Replace the hand-built OTLP/JSON curl ingest with telemetrygen (the
  OpenTelemetry synthetic-telemetry generator) run as an in-cluster Job,
  sending one OTLP log over gRPC (:4317) to the receiver. A real OTLP client
  on the wire, and it exercises the gRPC ingest path the curl test never did.
  service.name (= tenant) and the log body are set via flags; image pinned
  by digest.
- Assert the queried row's body reconstructs to the ingested line with
  reconstruction "faithful" (CLAUDE.md §3.3), now that #302 is fixed — not
  just rows >= 1.

A temporary path-scoped pull_request trigger validates this on its own PR
(workflow_dispatch can't target a non-default branch); removed before merge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jensholdgaard
jensholdgaard force-pushed the ci/deploy-test-assert-body branch from c210f2d to 8c90414 Compare June 30, 2026 11:20
@jensholdgaard jensholdgaard changed the title ci: assert body reconstruction in the deploy smoke test ci: ingest via telemetrygen (gRPC) + assert body reconstruction in the deploy smoke test Jun 30, 2026
@jensholdgaard
jensholdgaard requested a review from Copilot June 30, 2026 11:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/deploy-test.yml Outdated
Comment thread .github/workflows/deploy-test.yml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/deploy-test.yml (1)

18-24: 📐 Maintainability & Code Quality | 🔵 Trivial

Remove the temporary pull_request trigger before merge.

The trigger is self-described as temporary, and the PR objectives state it was to be dropped before merge, but it is still present here. Leaving it in widens the trigger surface beyond the intended on-demand + nightly final state.

Want me to open a tracking issue or prepare the removal diff?

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-test.yml around lines 18 - 24, Remove the temporary
pull_request trigger from the deploy-test workflow so the final trigger set
matches the intended on-demand + nightly-only behavior. Update the workflow
configuration in the deploy-test YAML by deleting the path-scoped pull_request
section and keep the remaining dispatch/scheduled triggers intact. Use the
existing workflow trigger block near the temporary comment to locate the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/deploy-test.yml:
- Around line 18-24: Remove the temporary pull_request trigger from the
deploy-test workflow so the final trigger set matches the intended on-demand +
nightly-only behavior. Update the workflow configuration in the deploy-test YAML
by deleting the path-scoped pull_request section and keep the remaining
dispatch/scheduled triggers intact. Use the existing workflow trigger block near
the temporary comment to locate the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 82921afe-81a1-4861-861a-18cb344918c0

📥 Commits

Reviewing files that changed from the base of the PR and between 05d42b0 and 8c90414.

📒 Files selected for processing (1)
  • .github/workflows/deploy-test.yml

Validated end-to-end on this PR: telemetrygen sends one OTLP log over gRPC,
the querier returns it with a faithful body reconstruction (rows=1,
reconstruction=faithful). Revert to on-demand + nightly only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/deploy-test.yml
Comment thread .github/workflows/deploy-test.yml
The loop intends to retry until the row is back AND its body reconstructs
faithfully, but the break checked only rows + line — so a transient
retained_verbatim render whose line happened to match would break early and
fail the post-loop check. Add reconstruction == faithful to the break so it
retries until all three hold. Strict superset of the prior condition; the
validated happy path (faithful on attempt 1) is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@jensholdgaard
jensholdgaard merged commit 697b771 into main Jun 30, 2026
21 checks passed
@jensholdgaard
jensholdgaard deleted the ci/deploy-test-assert-body branch June 30, 2026 11:40
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