Skip to content

fix(lading): surface tooling/FUSE-mount panics as errors#1904

Draft
goxberry wants to merge 1 commit into
goxberry/expect-fixme-remote-inputfrom
goxberry/expect-fixme-tooling-io
Draft

fix(lading): surface tooling/FUSE-mount panics as errors#1904
goxberry wants to merge 1 commit into
goxberry/expect-fixme-remote-inputfrom
goxberry/expect-fixme-tooling-io

Conversation

@goxberry
Copy link
Copy Markdown
Contributor

@goxberry goxberry commented May 23, 2026

Summary

Third and final PR in the FIXME-conversion stack. Addresses the three
remaining sites: two in the offline captool analyzer, one in the
FUSE-mount setup of the logrotate-fs generator.

bin/captool/main.rsmain and validate_capture

Both functions consume a LinesStream via .map(|l| { ... }) and
panic via .expect() on either a failed line read or a malformed
JSON record. Convert the closures to return Result<Line, Error>
and fail-fast on the first error. captool is an offline analyzer —
silently skipping corrupt lines would mask the corruption being
investigated.

The fn-level #[expect(clippy::expect_used)] stays on both
functions: a few .expect() calls remain on tokio::task::JoinHandle
results, where a JoinError is the intentional propagation of an
inner blocking-task panic. The reason text is rewritten so the
attribute no longer reads as tracked debt — it now describes
deliberate panic propagation.

generator/file_gen/logrotate_fs.rs::Server::new

fuser::spawn_mount2 returns an io::Result and the existing
Error::Io variant is already #[from] std::io::Error. The fix is
trivial: replace .expect("Failed to mount FUSE filesystem") with
?. No new variant needed. The fn-level FIXME #[expect] is
removed.

End state

After this PR, grep -rn 'FIXME' lading/src/ returns no results. All
remaining #[expect(clippy::expect_used)] attributes in the lading
crate are correctly-documented intentional panics (channel-iterator
construction, OnceCell set-once, JoinHandle task-panic
propagation, tokio::select! branch invariants, etc.) rather than
tracked debt.

Test plan

  • ./ci/validate passes
  • grep -rn 'FIXME' lading/src/ is empty
  • cargo build --workspace --all-targets --all-features

🤖 Generated with Claude Code

captool's JSONL paths panicked on a failed line read or malformed
JSON via `.expect()` inside a stream-map closure. Convert each closure
to return `Result<Line, Error>` and fail-fast on the first error;
captool is an offline analyzer where silently skipping corrupt lines
would mask the corruption being investigated. The fn-level
`#[expect(clippy::expect_used)]` on `main` and `validate_capture`
stays — the remaining `.expect()` sites are on `JoinHandle`s where a
`JoinError` is the intentional propagation of an inner blocking-task
panic. The reason text is updated accordingly so it no longer reads
as tracked debt.

logrotate_fs::Server::new panicked when `fuser::spawn_mount2` failed
(e.g. missing /dev/fuse permissions). The function already has
`#[from] std::io::Error -> Error::Io`, so the fix is just `?` on the
`io::Result`; no new variant needed. The fn-level FIXME `#[expect]`
is removed.

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: 2225fd4 | 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