Skip to content

fix(ci): green up failing main-branch tests and example#1506

Merged
chaliy merged 1 commit intomainfrom
claude/fix-ci-tests-7Ew1f
May 2, 2026
Merged

fix(ci): green up failing main-branch tests and example#1506
chaliy merged 1 commit intomainfrom
claude/fix-ci-tests-7Ew1f

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 2, 2026

Summary

CI on main was red across Test, Coverage, and Examples. Three independent root causes — fixed each:

  1. TM-INF-022 source guard (no_debug_fmt_in_builtin_source) — six legitimate Debug uses in ssh/{config,handler}.rs and sqlite/tests.rs were missing the // debug-ok: <reason> marker that the static guard requires. Annotated each: the ssh tests assert that Debug redacts secrets (the Debug call IS the test), and the sqlite asserts dump the run result on assertion failure.
  2. jq::tests::differential::diff_unknown_flag_exit_coderun_real_jq returned None when real jq exited before reading stdin (broken pipe on --xyzzy), and the test fell back to exit=-1, never matching bashkit's 2. Drop stdin and ignore the write error so wait_with_output still produces the real exit code.
  3. agent_tool example panicked with "No provider set" — reqwest is built with rustls-no-provider, so a CryptoProvider must be installed before reqwest::Client::new(). Install ring at the top of main(), mirroring what network::client::install_default_crypto_provider does for the library.

Test plan

  • cargo test -p bashkit --lib no_debug_fmt_in_builtin_source (was red, now green)
  • cargo test -p bashkit --lib differential::diff_unknown_flag_exit_code (was red, now green)
  • cargo test -p bashkit --lib ssh::config::tests::test_debug_redacts_credentials ssh::handler::tests::test_debug_redacts_credentials sqlite::tests::persistence_round_trip* (still green after annotations)
  • cargo build --example agent_tool --features http_client (compiles)
  • cargo fmt --check
  • cargo clippy --all-targets --all-features -- -D warnings

Generated by Claude Code

- ssh/{config,handler}.rs and sqlite/tests.rs: annotate intentional
  Debug uses with `// debug-ok:` so the TM-INF-022 source guard
  (no_debug_fmt_in_builtin_source) passes. The ssh tests verify that
  Debug redacts secrets; the sqlite asserts dump the run result on
  failure — both legitimate test-only Debug uses.
- jq tests: tolerate broken-pipe on stdin in run_real_jq so
  diff_unknown_flag_exit_code doesn't fall back to exit=-1 when real
  jq exits before reading stdin (e.g. on `--xyzzy`).
- examples/agent_tool.rs: install rustls' ring crypto provider
  before constructing reqwest::Client. reqwest is built with
  rustls-no-provider, so without this the example panics with
  "No provider set".
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit f474c1b Commit Preview URL

Branch Preview URL
May 02 2026, 03:35 PM

@chaliy chaliy merged commit be7e49f into main May 2, 2026
34 checks passed
@chaliy chaliy deleted the claude/fix-ci-tests-7Ew1f branch May 2, 2026 15:46
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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