Skip to content

ci: add an all-features build job and fix the --nocapture flag - #894

Merged
jlucaso1 merged 1 commit into
mainfrom
ci/all-features-and-nocapture
Jun 18, 2026
Merged

jlucaso1 merged 1 commit into
mainfrom
ci/all-features-and-nocapture

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

What

Two CI changes, plus the minimal code fixes the first one surfaced.

  • New test-all-features job in .github/workflows/main.yml ("Build & Lint (all features)"). It mirrors the existing test job's setup (same pinned nightly-2026-06-16, protoc, sccache, rust-cache) and runs:
    • cargo build --workspace --exclude e2e-tests --all-features --all-targets --verbose
    • cargo clippy --workspace --exclude e2e-tests --all-features --all-targets -- -D warnings
  • --nocapture flag fix in main.yml and e2e.yml: the libtest flag is one word (--nocapture), so the previous --no-capture was silently ignored.
  • #[recursion_limit = "512"] added to three target roots (examples/benchmark.rs, tests/bench-integration/src/main.rs, tests/e2e/src/lib.rs). Under --all-features, feature unification enlarges those crates' async futures past the default layout-query depth, so the build failed without this. 512 matches the limit already set in src/lib.rs / examples/demo.rs for the same reason.

Why

Feature-gated code (tracing, metrics, debug-diagnostics, debug-snapshots, tracing-pii, ...) was never built in CI on the full feature set, so it could rot unnoticed. Building + clippy-checking with --all-features --all-targets closes that gap.

The job intentionally does not run cargo test --all-features: --all-features enables danger-skip-cert-chain-verify / danger-skip-tls-verify, which disable security verification (the cert-chain negative test is even #[cfg]'d out under it). The suite would therefore change behavior rather than catch rot, so build + clippy already cover the "doesn't rot" goal. A comment in the workflow notes this.

Benchmark workflows (bench-integration.yml, codspeed.yml, binary-size.yml) stay non-gating and are untouched.

Verification

On the pinned nightly-2026-06-16, all run clean locally:

  • cargo build --workspace --exclude e2e-tests --all-features --all-targets passes.
  • cargo clippy --workspace --exclude e2e-tests --all-features --all-targets -- -D warnings is clean.
  • cargo fmt --all -- --check is clean.
  • Both workflow files parse as valid YAML.

Add a `test-all-features` job to the Rust CI workflow that builds and lints
the workspace with `--all-features --all-targets`, so feature-gated code
(tracing, metrics, debug-* etc.) is compiled and clippy-checked in CI instead
of being allowed to rot. It runs `cargo build` and `cargo clippy -D warnings`;
it intentionally skips `cargo test` because `--all-features` enables the
`danger-skip-*` features that disable security verification.

Three target roots overflowed the default layout-query recursion limit under
`--all-features` (the feature-unified futures get larger); bump them to 512 to
match the limit already set in `src/lib.rs` / `examples/demo.rs`.

Also fix the silently-ignored libtest flag: the correct spelling is one word,
`--nocapture`, not `--no-capture`, in both `main.yml` and `e2e.yml`.
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions CI workflows to improve test output handling and introduced comprehensive all-features testing across the entire pipeline
    • Enhanced overall build performance through protoc installation and sccache caching configuration in the CI environment
    • Adjusted Rust compiler recursion limits to properly support complex dependency resolution during feature-rich compilation scenarios

Walkthrough

Two GitHub Actions workflows have --no-capture corrected to --nocapture in cargo test invocations. main.yml gains a new test-all-features job that runs cargo build and cargo clippy --all-features (excluding e2e-tests). Three crates receive a #![recursion_limit = "512"] attribute to support deeper async instrumentation under all-features builds.

Changes

CI and Compiler Attribute Updates

Layer / File(s) Summary
recursion_limit = 512 across crates
examples/benchmark.rs, tests/bench-integration/src/main.rs, tests/e2e/src/lib.rs
Adds #![recursion_limit = "512"] with explanatory comments at the crate level in all three locations to handle increased macro/type recursion depth under --all-features tracing builds.
CI workflow fixes and new all-features job
.github/workflows/e2e.yml, .github/workflows/main.yml
Corrects --no-capture to --nocapture in both workflow files. Adds a test-all-features job in main.yml that installs protoc, configures sccache, restores Rust registry cache, then runs cargo build and cargo clippy --all-features (excluding e2e-tests); cargo test --all-features is deliberately omitted.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • oxidezap/whatsapp-rust#303: Modifies the E2E test harness in tests/e2e/src/lib.rs and e2e.yml, directly overlapping with both the --nocapture flag fix and the new recursion_limit addition in those same files.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the two main changes: adding an all-features build job and fixing the nocapture flag in CI workflows.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the what, why, and verification of all modifications.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/all-features-and-nocapture

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 and usage tips.

@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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In @.github/workflows/main.yml:
- Line 79: The actions/checkout action is currently configured to persist Git
credentials in the local git config, which poses a security risk since this CI
job doesn't require Git write access after checkout. Add the
`persist-credentials: false` parameter to the actions/checkout@v6 step to
disable credential persistence and reduce the attack surface.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bdfd57db-ce82-4032-b578-0cf44c570c0c

📥 Commits

Reviewing files that changed from the base of the PR and between 2d8fa7f and 0e9ee32.

📒 Files selected for processing (5)
  • .github/workflows/e2e.yml
  • .github/workflows/main.yml
  • examples/benchmark.rs
  • tests/bench-integration/src/main.rs
  • tests/e2e/src/lib.rs

Comment thread .github/workflows/main.yml

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e9ee32fcd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/main.yml
@github-actions

Copy link
Copy Markdown

📦 Binary size report

Metric main PR Δ
bin size (stripped) 10.56 MiB 10.56 MiB 0
bin .text 8.68 MiB 8.68 MiB 0
bin allocated (text+data+bss) 10.56 MiB 10.56 MiB 0
llvm-lines wacore 639,574 639,574 0
llvm-lines wacore copies 17,666 17,666 0
llvm-lines whatsapp-rust lib 650,732 650,732 0
llvm-lines whatsapp-rust lib copies 20,022 20,022 0
deps crates (Cargo.lock) 341 341 0
.text per crate
Crate main PR Δ
.text whatsapp_rust 1.43 MiB 1.43 MiB 0
.text wacore 518.06 KiB 518.06 KiB 0
.text wacore_binary 157.70 KiB 157.70 KiB 0
.text wacore_libsignal 166.67 KiB 166.67 KiB 0
.text wacore_appstate 36.61 KiB 36.61 KiB 0
.text wacore_noise 29.06 KiB 29.06 KiB 0
.text waproto 876.21 KiB 876.21 KiB 0
.text whatsapp_rust_sqlite_storage 207.48 KiB 207.48 KiB 0
.text whatsapp_rust_tokio_transport 32.49 KiB 32.49 KiB 0
.text whatsapp_rust_ureq_http_client 5.93 KiB 5.93 KiB 0
.text std 1.13 MiB 1.13 MiB 0
.text other deps 4.07 MiB 4.07 MiB 0

Baseline: 2d8fa7f57 (latest main run) · Head: 6201b19ac · Graphs

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 5 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/main.yml
@codspeed-hq

codspeed-hq Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 176 untouched benchmarks


Comparing ci/all-features-and-nocapture (0e9ee32) with main (2d8fa7f)

Open in CodSpeed

@jlucaso1
jlucaso1 merged commit 19ef46b into main Jun 18, 2026
21 checks passed
@jlucaso1
jlucaso1 deleted the ci/all-features-and-nocapture branch June 18, 2026 12:07
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