Skip to content

refactor(lading): annotate intentional-panic blackhole + small generator sites#1897

Draft
goxberry wants to merge 1 commit into
goxberry/expect-cleanup-lading-cat3from
goxberry/expect-cleanup-lading-blackhole
Draft

refactor(lading): annotate intentional-panic blackhole + small generator sites#1897
goxberry wants to merge 1 commit into
goxberry/expect-cleanup-lading-cat3from
goxberry/expect-cleanup-lading-blackhole

Conversation

@goxberry
Copy link
Copy Markdown
Contributor

@goxberry goxberry commented May 23, 2026

Summary

Annotate intentional-panic .expect() sites in the blackhole subsystem and a few small generator constructors with fn-level #[expect(clippy::expect_used, reason = "...")]. Convert the Cat-3-eligible Response::builder().body() and HeaderValue::from_static sites inside otlp/http.rs to unreachable!(), matching the rest of the codebase.

Sites annotated:

  • `blackhole/otlp/http.rs::new` — serde_json on default OTLP responses
  • `blackhole/tcp_rr.rs::run` — `set_nonblocking` on bound listener
  • `blackhole/tcp_rr.rs::create_listener` — socket-setup syscalls
  • `blackhole/tcp_rr.rs::server_thread_main` — mio Poll/registry setup
  • `generator/container.rs::spin` — `u32::try_from` on bounded index
  • `generator/file_tree.rs::spin` — `iter().cycle()` over non-empty Vec

Stacked on #1896. Part of the broader push toward enforcing clippy::expect_used = "deny" workspace-wide.

Test plan

  • `./ci/validate` passes
  • CI green on this PR

…tor sites

Attach fn-level #[expect(clippy::expect_used, reason = "...")] to
construction- and startup-time sites in the lading crate whose `.expect()`
calls intentionally panic on system-resource exhaustion or other
documented contracts. Convert the Cat-3 Response::builder().body() and
HeaderValue::parse sites inside otlp/http.rs to unreachable!() to match
the rest of the codebase.

- blackhole/otlp/http.rs::new        (serde_json on default OTLP responses)
- blackhole/tcp_rr.rs::run           (set_nonblocking on bound listener)
- blackhole/tcp_rr.rs::create_listener  (socket-setup syscalls)
- blackhole/tcp_rr.rs::server_thread_main (mio Poll/registry setup)
- generator/container.rs::spin       (u32::try_from on bounded idx)
- generator/file_tree.rs::spin       (iter().cycle() over non-empty Vec)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

goxberry commented May 23, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

Changelog Check | changelog-check   View in Datadog   GitHub Actions

🛟 This job is unlikely to succeed on retry. Please review your pipeline configuration. No changes to CHANGELOG.md detected. Add 'no-changelog' label if this is intentional.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 882d7df | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant