Skip to content

refactor(lading): annotate intentional-panic network generators#1899

Draft
goxberry wants to merge 1 commit into
goxberry/expect-cleanup-lading-file-genfrom
goxberry/expect-cleanup-lading-net-generators
Draft

refactor(lading): annotate intentional-panic network generators#1899
goxberry wants to merge 1 commit into
goxberry/expect-cleanup-lading-file-genfrom
goxberry/expect-cleanup-lading-net-generators

Conversation

@goxberry
Copy link
Copy Markdown
Contributor

@goxberry goxberry commented May 23, 2026

Summary

Annotate intentional-panic .expect() sites in the network protocol generators with fn-level #[expect(clippy::expect_used, reason = "...")]. Reasons distinguish documented-contract panics from user-input parsing failures (the latter carry FIXME markers tracking eventual conversion to Error variants).

Sites annotated:

  • `generator/tcp.rs::new` (FIXME — user-supplied addr parsing)
  • `generator/grpc.rs` — gRPC client construction
  • `generator/http.rs` — HTTP client + header parsing
  • `generator/kubernetes/resource.rs` — k8s api construction
  • `generator/procfs.rs` — sysfs path setup
  • `generator/splunk_hec.rs` — Splunk endpoint setup
  • `generator/splunk_hec/acknowledgements.rs::send` — channel routing invariant

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

Test plan

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

Attach fn-level #[expect(clippy::expect_used, reason = "...")] to the
construction and spin sites in the network protocol generators, plus
Cat-3 mechanical conversions for procfs path literals.

- generator/http.rs::{new, spin}               (OnceCell + Semaphore)
- generator/grpc.rs::{new, connect}            (target_uri parsing, FIXME on new)
- generator/splunk_hec.rs::{new, spin, send_hec_request} (FIXME on parse)
- generator/tcp.rs::new                          (FIXME: addr parsing)
- generator/procfs.rs                            (Cat-3 /proc paths)
- generator/kubernetes/resource.rs::get_name     (set_name contract)
- generator/splunk_hec/acknowledgements.rs::send (ack-id contract)

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
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: d87c012 | 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