Skip to content

fix(intelligence): keep the escalation streak out of the log body - #930

Closed
adityaharishch wants to merge 1 commit into
pre-mainfrom
fix/log-body-interpolation-on-pre-main
Closed

fix(intelligence): keep the escalation streak out of the log body#930
adityaharishch wants to merge 1 commit into
pre-mainfrom
fix/log-body-interpolation-on-pre-main

Conversation

@adityaharishch

Copy link
Copy Markdown
Contributor

pre-main is red

log_hygiene::tests::no_user_data_interpolated_into_a_log_body fails on src/intelligence/providers/mod.rs:196:

"provider unreachable on {streak} consecutive attempts - escalating to a notice"

The message body is the one field telemetry_spool::redact cannot filter - attributes are dropped unless allowlisted, but the body always ships verbatim to central OpenObserve. So anything interpolated there egresses regardless of whether it should.

The fix is subtraction

streak was already a structured field on the same call, so the body was only duplicating it. Removing it from the body loses nothing. I added needed alongside it so the pair still reads as "n of m" without either number touching the body.

The count still reaches OpenObserve: as a u32 it arrives as a StringValue (tracing-opentelemetry 0.28 has no record_u64, so it falls through to record_debug), and redact::is_bare_number keeps it because the whole value parses as a number.

Why CI was green on both PRs and red once merged

The message 4a0a2fc4, on pre-main since August
The guard that rejects it #916, b4f33de7

#916's branch predated the message, so its new guard never scanned that line. The violation exists only in the merge, which is the first place the two meet.

This is the second "green individually, red combined" today - #923 was the other, and it merged with no Rust CI at all because it was based on a feature branch. Neither is visible until after the merge lands on pre-main, which is also the moment it blocks a release. Worth considering a required merge-queue or an up-to-date-branch check, but that is a separate change and not this PR.

Gate

cargo fmt --all --check, cargo clippy --workspace --all-targets -D warnings, cargo test --workspace (27 binaries green), plus the full pre-push suite.

Context

This is blocking the staging release cut for pre-main. Once this lands I will verify pre-main is green and cut v1.91.0-staging.7.

`pre-main` is red: `log_hygiene::no_user_data_interpolated_into_a_log_body`
fails on

    "provider unreachable on {streak} consecutive attempts - escalating to a notice"

The body is the one field `telemetry_spool::redact` cannot filter - attributes
are dropped unless allowlisted, but the body always ships verbatim to central
OpenObserve - so anything interpolated there egresses whether or not it should.

`streak` was ALREADY a structured field on this same call, so the body was
only duplicating it and nothing is lost by dropping it. Added `needed` too, so
the pair still reads as "n of m" without either number touching the body. The
count survives the ship leg as a bare number via `redact::is_bare_number`.

Neither PR that produced this was wrong on its own, and both were green:

- the message came from 4a0a2fc, on pre-main since August
- the guard that rejects it came from #916 (b4f33de)

#916's branch predated the message, so its new guard never scanned that line;
the collision only exists in the merge. This is the second instance today of
"green individually, red combined" - #923 was the other - and neither is
visible until after the merge lands on pre-main.
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 5644c8a4-3bde-4e3a-a949-4e2875ae4788

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@adityaharishch

Copy link
Copy Markdown
Contributor Author

Superseded by #933, which landed the same fix independently while this was open: a static WARN body with streak kept as the structured field it already was.

Merging pre-main in and taking that version leaves this branch with a zero-byte diff, so there is nothing left to review. Closing rather than pushing an empty PR.

The defect is closed either way, and pre-main is unblocked for the staging cut.

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.

1 participant