Skip to content

Adopt the Whitaker Dylint suite in the lint gate and CI - #134

Merged
leynos merged 5 commits into
mainfrom
adopt-whitaker
Jul 9, 2026
Merged

Adopt the Whitaker Dylint suite in the lint gate and CI#134
leynos merged 5 commits into
mainfrom
adopt-whitaker

Conversation

@leynos

@leynos leynos commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

This change adopts the Whitaker Dylint suite in podbot's lint gate and continuous integration (CI), as part of the estate-wide rollout that began with leynos/netsuke#410. The Makefile gains a WHITAKER tool variable and the lint target now runs whitaker --all -- --all-targets --all-features after Clippy with warnings denied. The CI workflow installs the suite via the hardened estate pattern: whitaker-installer is pinned to the 0.2.5 crates.io release through a job-level WHITAKER_INSTALLER_VERSION environment variable (read as a plain shell variable inside the run block), installed with cargo binstall --locked and a build-from-source fallback for runners without binstall, with a cache covering only the installer binary and the binstall download cache, keyed by runner operating system, architecture, and installer version.

A preparatory commit resolves every finding the suite reported, without any suppressions or dylint.toml exclusions: two bumpy_road_function extractions (config override building and credential archive entry writing); five module_max_lines splits (the protocol exec module into stdin_io and output_io submodules, the error module's tests, the GitHub tests, the ACP frame and protocol ACP test modules, and the configuration layer-precedence BDD steps); twelve module_must_have_inner_docs additions; roughly fifty no_expect_outside_tests conversions, under which helper and fixture functions now return Result and propagate arrangement failures while only test bodies unwrap, and mutex-guard recorders recover from poisoning via PoisonError::into_inner; and eleven no_std_fs_operations sites now performing fixture filesystem work through cap-std directory handles instead of ambient std::fs calls.

Review walkthrough

Validation

All gates were run locally with env -u WHITAKER so the Makefile's default tool resolution was exercised:

  • make check-fmt — pass
  • make typecheck — pass
  • make lint — pass (cargo doc, Clippy, and whitaker --all clean under -D warnings, suite v0.2.5)
  • make test — pass (all suites, zero failures)
  • make markdownlint — pass (64 files, 0 errors)
  • cargo check --no-default-features and cargo test --no-default-features --test cli_feature_gating --test compile_contract — pass (CI no-CLI legs)

🤖 Generated with Claude Code

leynos added 2 commits July 9, 2026 18:45
Prepare the codebase for adopting the Whitaker Dylint suite by fixing
every finding it reports, without suppressions:

- bumpy_road_function: extract build_agent_overrides and
  serialize_agent_override from build_overrides in the config loader,
  and append_file_entry/append_symlink_entry from
  append_non_directory_entry in the credential archive writer.
- module_max_lines: split the protocol exec module into stdin_io and
  output_io sibling submodules; move the error module's tests to a
  sibling error_tests.rs; split the github tests into client_tests and
  property_tests submodules; split the ACP frame and protocol ACP test
  modules; move the configuration layer-precedence BDD steps into
  tests/bdd_config_steps/layer.rs.
- module_must_have_inner_docs: add //! inner documentation to every
  unit-test module that lacked it.
- no_expect_outside_tests: helper and fixture functions no longer
  panic; they return Result (io::Result, serde_json::Error, or
  PodbotError) and propagate failures, with the calling test bodies
  unwrapping as the test verdict. Mutex-guard recorders in test
  doubles now recover from poisoning via PoisonError::into_inner
  instead of panicking.
- no_std_fs_operations: the Makefile audit-target test and the BDD
  config-loader helpers now perform fixture filesystem work through
  cap-std directory handles instead of ambient std::fs calls.

Also resolve the Clippy too_many_arguments and needless_pass_by_value
diagnostics introduced by the refactoring.
Wire the Whitaker Dylint suite into the standard quality gates as part
of the estate-wide rollout (see leynos/netsuke#410):

- Makefile: add a WHITAKER tool variable and run the suite after
  Clippy in the lint target, with warnings denied.
- CI: pin whitaker-installer to the 0.2.5 crates.io release via a
  job-level WHITAKER_INSTALLER_VERSION environment variable, cache the
  installer binary and the cargo-binstall download cache keyed by
  runner OS, architecture, and installer version, and install with
  cargo binstall --locked, falling back to building from crates.io on
  runners without binstall.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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

Sorry @leynos, your pull request is larger than the review limit of 150000 diff characters

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR pins and integrates a Whitaker Dylint installer into CI and the Makefile lint target, refactors config-loader agent overrides into helper functions, and substantially reworks the protocol exec stdin/output forwarding by extracting it into new protocol_stdin.rs/protocol_output.rs modules with new ACP masking/routing tests. It also converts numerous test fixtures across the codebase (git identity, connection, repository clone, GitHub client, config BDD, audit target) to use fallible runtime creation, poison-safe mutex recovery, and cap_std-based filesystem access, and extracts error and GitHub client tests into dedicated files.

Changes

Whitaker CI/lint integration

Layer / File(s) Summary
Whitaker installer CI step and Makefile lint wiring
.github/workflows/ci.yml, Makefile
Pins WHITAKER_INSTALLER_VERSION, caches installer/cargo-binstall directories, conditionally installs whitaker-installer via cargo binstall/cargo install, and adds a WHITAKER variable invoked from the lint target.

Config loader agent overrides

Layer / File(s) Summary
Agent override builder and serializer helpers
src/config/loader.rs
Extracts build_agent_overrides and serialize_agent_override from build_overrides, centralising JSON construction and per-field serialization error messages.

Protocol exec extraction and ACP tests

Layer / File(s) Summary
Protocol module extraction
src/engine/connection/exec/protocol.rs, protocol_stdin.rs, protocol_output.rs
Moves stdin forwarding/settlement and output-draining logic out of protocol.rs into two new modules with adapter-aware and raw-copy paths.
New ACP masking/routing tests
protocol_acp_masking_tests.rs, protocol_acp_routing_tests.rs
Adds tests for mask_acp_initialize_frame behaviour and CapabilityPolicy routing of blocked terminal/create requests.
ACP test harness refactor
protocol_acp_tests.rs, protocol_acp_forwarding_tests.rs, protocol_acp_bdd_tests.rs, protocol_acp_policy_integration_tests.rs
Converts frame builders/parsers/forwarding runner to Result-returning helpers, wires sibling test modules via #[path], and updates call sites to expect()/map_err.
ACP frame assembler split/reassembly tests
acp_frame_split_tests.rs, acp_frame_tests.rs
Adds deterministic byte-identical reassembly tests across chunk splits and updates frame builders to return Result.
ACP policy/runtime test fallibility
acp_policy_tests.rs, acp_runtime_bdd_tests.rs, acp_runtime_tests.rs
Converts frame serialization to Result, propagates errors via ?/map_err, and recovers poisoned mutexes instead of panicking.
Exec module test docs/runtime fallibility
host_io.rs, session.rs, terminal.rs, helpers_tests.rs, runtime_helpers.rs
Adds test doc comments, fixes poisoned-mutex handling, and returns io::Result from the runtime fixture.

Test runtime fallibility hardening

Layer / File(s) Summary
Git identity runtime fallibility
configure_git_identity.rs, container_configurator.rs
Converts runtime-construction helpers to io::Result, requiring explicit .expect(...) at test call sites.
Repository clone runtime/typed-value fallibility
repository_clone/mod.rs, repository_clone.rs
Converts runtime, typed_request_values, and typed_askpass test helpers to Result types.
Connection tests runtime fallibility
connection/tests.rs, error_classification.rs, test_utils.rs
Converts the runtime fixture to io::Result and adds test-module documentation.

Archive, error, and GitHub test reorganisation

Layer / File(s) Summary
Tar entry helpers
upload_credentials/archive.rs
Extracts file/symlink tar-entry construction into append_file_entry/append_symlink_entry.
Error test extraction
src/error.rs, src/error_tests.rs
Moves error-formatting/conversion tests into a new error_tests.rs loaded via #[path].
GitHub client/property test extraction
src/github/client_tests.rs, property_tests.rs, tests.rs, classify.rs
Adds client construction/credential tests and a status-classification property test, wired via #[path]; converts temp_key_dir to io::Result.

Test infrastructure: BDD config and audit target

Layer / File(s) Summary
Layer precedence steps extraction and cap_std writes
tests/bdd_config_helpers.rs, tests/bdd_config_steps/layer.rs, bdd_config_loader_helpers.rs, bdd_hosting_config_loader_helpers.rs
Extracts layer-merge BDD steps into a submodule and switches config-file writes to cap_std::fs::Dir.
Capability-based audit target helpers
tests/make_audit_target.rs
Converts filesystem helpers from std::fs to cap_std::fs::Dir capability handles.

Sequence Diagram(s)

sequenceDiagram
  participant HostStdin
  participant ForwardHostStdinToChannel
  participant WriteCmdSink
  participant OutboundPolicyAdapter
  participant HostStdout

  HostStdin->>ForwardHostStdinToChannel: read buffered stdin
  ForwardHostStdinToChannel->>WriteCmdSink: send masked initialize frame (WriteCmd::Forward)
  ForwardHostStdinToChannel->>WriteCmdSink: pump remaining raw frames until EOF
  WriteCmdSink->>OutboundPolicyAdapter: handle_chunk(bytes)
  OutboundPolicyAdapter->>HostStdout: write_output_chunk(forwarded bytes)
Loading

Possibly related PRs

  • leynos/podbot#68: Both PRs modify src/config/loader.rs around building agent override JSON via helper functions and serialization error handling.
  • leynos/podbot#79: Both touch the protocol-mode exec stdin ACP initialize masking seam, one refactoring/extracting it, the other implementing the masking itself.
  • leynos/podbot#72: Both change the protocol-mode exec proxy's stdin/output forwarding pipeline in the same code path.

Suggested labels: Roadmap

Suggested reviewers: codescene-delta-analysis

Poem

A rabbit hopped through stdin's stream,
Split frames rejoined, byte-true and clean,
Whitaker's teeth now guard the lint,
Poisoned mutexes recovered — no complaint!
Runtimes now fallibly begin,
Hop, hop, review — let the tests all grin. 🐇✨


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
Rust Compiler Lint Integrity ❌ Error The PR adds lint-appeasement anchors (drop(config_state.file_layer.get()), drop(value), let _ = state) instead of real usage. Remove the artificial anchors and redundant drops, and make any unused BDD parameters or helpers either real or deleted so Clippy/rustc can report true dead code.
Developer Documentation ⚠️ Warning docs/developers-guide.md still lists make lint as clippy-only; no docs/ADR/execplan update records Whitaker or the CI install flow. Update docs/developers-guide.md and any relevant ADR/execplan or roadmap entry to document the new Whitaker lint gate and CI install/cache requirements.
Performance And Resource Use ⚠️ Warning CI caches only the installer and binstall cache, yet runs whitaker-installer every job, so the expensive suite build stays repeated. Cache the suite staging/target directory produced by whitaker-installer (keyed by OS, arch, version) or otherwise skip rebuilds when unchanged.
✅ Passed checks (17 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarises the main change: adopting Whitaker in the lint gate and CI.
Description check ✅ Passed The description clearly matches the changeset, covering Whitaker adoption, CI installation, and the preparatory refactors.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
Testing (Overall) ✅ Passed The new ACP, config, archive, error, GitHub, and Make target tests assert concrete outputs and failure modes, so the changed behaviour is genuinely exercised.
User-Facing Documentation ✅ Passed Only developer-facing Makefile/CI changes landed; no user-facing surface changed, and the existing users guide already covers the relevant protocol behaviour.
Module-Level Documentation ✅ Passed All changed Rust modules begin with module-level docs, and the scan found zero files missing an obvious module docstring.
Testing (Unit And Behavioural) ✅ Passed PASS: The PR adds real boundary tests (Makefile rust-audit, repository-cloning E2E, config BDD) plus edge-case/unit coverage for errors, framing, and invariants.
Testing (Property / Proof) ✅ Passed PASS: It adds a substantive proptest for the github_status_class range invariant and exhaustive split-order tests for ACP frame reassembly; no proof assumptions remain unsupported.
Testing (Compile-Time / Ui) ✅ Passed PASS — compile-time surfaces are already covered by trybuild in tests/compile_contract.rs and tests/cli_feature_gating.rs; the new error/output checks are local assertions, not a new UI snapshot su...
Unit Architecture ✅ Passed Production code keeps fallibility explicit and isolates stdin/env/filesystem access at edge seams; protocol IO is split into injectable stdin/output modules.
Domain Architecture ✅ Passed Keep the boundary intact: this PR only adds CI/lint wiring and test/docs refactors; production changes stay in adapter modules and inject I/O cleanly.
Observability ✅ Passed Only CI and Makefile lint wiring changed; no runtime behaviour, logging, metrics, tracing, or alerts were added, so observability requirements do not apply.
Security And Privacy ✅ Passed No secret material, auth bypasses, broad permissions, or sensitive-data exposures were introduced.
Concurrency And State ✅ Passed PASS: protocol.rs documents the task model and cancellation; tests cover timeout, abort, channel ordering, and mutex-poison recovery under interleaving.
Architectural Complexity And Maintainability ✅ Passed Local extractions split real seams and reduce file size; no new generic layers, hidden hooks, or speculative framework were added.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch adopt-whitaker

Comment @coderabbitai help to get the list of available commands.

codescene-access[bot]

This comment was marked as outdated.

@coderabbitai coderabbitai Bot added the Roadmap label Jul 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/github/tests.rs (1)

41-61: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Propagate the fallible fixture with ? instead of .expect()-ing it in every test.

temp_key_dir now returns io::Result<(TempDir, Utf8Dir)>, but every consumer (this test and load_missing_file_returns_error, load_empty_file_returns_error, load_invalid_pem_returns_error, load_ec_key_returns_clear_error, load_ed25519_key_returns_clear_error, error_includes_file_path, load_private_key_resolves_full_path, load_invalid_key_types_return_clear_error) unwraps it via .expect("should create temp key dir"). The coding guideline explicitly states fallible rstest fixtures should be consumed by making the test return Result and applying ?, not by .expect()-ing them inline.

♻️ Proposed pattern (apply across all affected tests)
 #[rstest]
 fn load_valid_rsa_key_succeeds(
     valid_rsa_pem: String,
     temp_key_dir: io::Result<(TempDir, Utf8Dir)>,
-) {
-    let (_tmp, dir) = temp_key_dir.expect("should create temp key dir");
+) -> io::Result<()> {
+    let (_tmp, dir) = temp_key_dir?;
     dir.write("key.pem", &valid_rsa_pem)
         .expect("should write key");
     let path = Utf8Path::new("/display/key.pem");
     let result = load_private_key_from_dir(&dir, "key.pem", path);
     assert!(result.is_ok(), "expected Ok, got: {result:?}");
+    Ok(())
 }
🤖 Prompt for 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.

In `@src/github/tests.rs` around lines 41 - 61, The `temp_key_dir` fixture is
fallible, so update each affected `rstest` test that uses it to return
`io::Result<()>` (or the appropriate `Result`) and use `?` when binding the
fixture instead of calling `.expect("should create temp key dir")`; apply this
consistently in `load_valid_rsa_key_succeeds`,
`load_missing_file_returns_error`, `load_empty_file_returns_error`,
`load_invalid_pem_returns_error`, `load_ec_key_returns_clear_error`,
`load_ed25519_key_returns_clear_error`, `error_includes_file_path`,
`load_private_key_resolves_full_path`, and
`load_invalid_key_types_return_clear_error`.

Source: Coding guidelines

🤖 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/ci.yml:
- Around line 45-62: The current cache in the CI workflow only covers the
Whitaker installer binary and binstall downloads, but the unconditional
`whitaker-installer` invocation still rebuilds the staged Dylint suite every
job. Update the cache setup in the `Cache Whitaker installer` / `Install
Whitaker` steps to also include the directory that `whitaker-installer`
populates for the built suite (or the relevant `~/.cargo`/target cache it uses),
and key it by `WHITAKER_INSTALLER_VERSION` so repeated runs can reuse the
expensive build output instead of rebuilding it each time.

In `@src/config/loader.rs`:
- Around line 247-257: `serialize_agent_override` has a redundant `Ok(...?)`
wrapper around `serde_json::to_value(value).map_err(...)`, which is already the
correct `Result<serde_json::Value, ConfigError>` shape. Simplify the function by
returning the mapped result directly and keep the existing
`ConfigError::ParseError` message formatting unchanged so the helper stays
clippy-clean under `-D warnings`.

In `@src/engine/connection/exec/acp_runtime_bdd_tests.rs`:
- Around line 69-77: The serialize_frame function contains a redundant explicit
drop of value after serde_json::to_vec(&value), since the Value is only borrowed
and will be dropped automatically at scope end. Remove the unnecessary
drop(value) call in serialize_frame and keep the rest of the frame serialization
logic unchanged.

In `@src/engine/connection/exec/protocol_acp_routing_tests.rs`:
- Around line 27-36: The blocked-frame builder is duplicated between the ACP
routing and policy test modules, so consolidate it into the shared test harness.
Move the parameterized frame builder into protocol_acp_tests.rs alongside
initialize_frame, then update blocked_terminal_create_frame and the existing
blocked_request_frame helper to call that shared function via super::. Keep the
shared helper generic over id/method so both sibling tests reuse the same
implementation.

In `@src/engine/connection/exec/runtime_helpers.rs`:
- Around line 110-115: The `block_on_runtime_maps_outcomes_outside_tokio` test
is still unwrapping the fallible `current_thread_runtime` fixture with `expect`;
update this `rstest` case to return `io::Result<()>` (or the appropriate Result
type) and propagate the fixture with `?` instead of unwrapping. Keep the rest of
the test logic the same by using the `Runtime` from `current_thread_runtime`
after successful propagation, and reference the `current_thread_runtime` fixture
and `block_on_runtime_maps_outcomes_outside_tokio` test when making the change.

In `@src/engine/connection/upload_credentials/archive.rs`:
- Around line 146-161: The size metadata in append_file_entry is fetched from
parent_dir.metadata before the file is opened, creating a TOCTOU window that can
make the tar header size inconsistent with the actual stream. Open the file
first with parent_dir.open, then read metadata from that file handle and use it
to build the header in new_entry_header so Builder::append_data gets the real
size from the opened file. Keep the fix localized to append_file_entry and its
use of metadata_mode/new_entry_header.

In `@src/github/client_tests.rs`:
- Around line 14-70: These rstest cases are unwrapping the fallible temp_key_dir
fixture with .expect, instead of propagating the error from the test itself.
Update build_app_client_with_valid_key_succeeds,
build_app_client_with_zero_app_id_succeeds, and
build_app_client_without_runtime_returns_error (and the related
validate_app_credentials tests) to return Result and use ? when consuming
temp_key_dir. Keep the rest of the setup and the calls to
build_app_client/load_private_key_from_dir the same, but remove the inline
expect on the fixture.

In `@tests/bdd_config_steps/layer.rs`:
- Around line 121-149: The test step configuration_is_merged has a redundant
#[expect(clippy::expect_used)] on its use of expect, and this lint is already
allowed by the test clippy settings. Remove that attribute from
configuration_is_merged and keep the rest of the merge logic unchanged so the
step remains a normal test helper without an unfulfilled lint expectation.

In `@tests/make_audit_target.rs`:
- Around line 47-68: De-duplicate the hard-coded cargo stub path used by
write_fake_cargo and its callers by introducing a shared relative path constant
or having write_fake_cargo return the path it creates. Update the
write_fake_cargo helper and the call sites that currently use
workspace.join("bin/cargo") so they reference the same unique symbol instead of
repeating the string literal.

---

Outside diff comments:
In `@src/github/tests.rs`:
- Around line 41-61: The `temp_key_dir` fixture is fallible, so update each
affected `rstest` test that uses it to return `io::Result<()>` (or the
appropriate `Result`) and use `?` when binding the fixture instead of calling
`.expect("should create temp key dir")`; apply this consistently in
`load_valid_rsa_key_succeeds`, `load_missing_file_returns_error`,
`load_empty_file_returns_error`, `load_invalid_pem_returns_error`,
`load_ec_key_returns_clear_error`, `load_ed25519_key_returns_clear_error`,
`error_includes_file_path`, `load_private_key_resolves_full_path`, and
`load_invalid_key_types_return_clear_error`.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1416b58c-8abf-48e5-9d75-572a4e3cf560

📥 Commits

Reviewing files that changed from the base of the PR and between 5562139 and 6fa2ec4.

📒 Files selected for processing (41)
  • .github/workflows/ci.yml
  • Makefile
  • src/api/configure_git_identity.rs
  • src/api/repository_clone.rs
  • src/config/loader.rs
  • src/engine/connection/error_classification.rs
  • src/engine/connection/exec/acp_frame_split_tests.rs
  • src/engine/connection/exec/acp_frame_tests.rs
  • src/engine/connection/exec/acp_policy_tests.rs
  • src/engine/connection/exec/acp_runtime_bdd_tests.rs
  • src/engine/connection/exec/acp_runtime_tests.rs
  • src/engine/connection/exec/helpers_tests.rs
  • src/engine/connection/exec/host_io.rs
  • src/engine/connection/exec/protocol.rs
  • src/engine/connection/exec/protocol_acp_bdd_tests.rs
  • src/engine/connection/exec/protocol_acp_forwarding_tests.rs
  • src/engine/connection/exec/protocol_acp_masking_tests.rs
  • src/engine/connection/exec/protocol_acp_policy_integration_tests.rs
  • src/engine/connection/exec/protocol_acp_routing_tests.rs
  • src/engine/connection/exec/protocol_acp_tests.rs
  • src/engine/connection/exec/protocol_output.rs
  • src/engine/connection/exec/protocol_stdin.rs
  • src/engine/connection/exec/runtime_helpers.rs
  • src/engine/connection/exec/session.rs
  • src/engine/connection/exec/terminal.rs
  • src/engine/connection/git_identity/container_configurator.rs
  • src/engine/connection/repository_clone/mod.rs
  • src/engine/connection/tests.rs
  • src/engine/connection/upload_credentials/archive.rs
  • src/error.rs
  • src/error_tests.rs
  • src/github/classify.rs
  • src/github/client_tests.rs
  • src/github/property_tests.rs
  • src/github/tests.rs
  • tests/bdd_config_helpers.rs
  • tests/bdd_config_loader_helpers.rs
  • tests/bdd_config_steps/layer.rs
  • tests/bdd_hosting_config_loader_helpers.rs
  • tests/make_audit_target.rs
  • tests/test_utils.rs

Comment thread .github/workflows/ci.yml
Comment thread src/config/loader.rs
Comment thread src/engine/connection/exec/acp_runtime_bdd_tests.rs
Comment thread src/engine/connection/exec/protocol_acp_routing_tests.rs
Comment thread src/engine/connection/exec/runtime_helpers.rs
Comment thread src/engine/connection/upload_credentials/archive.rs
Comment thread src/github/client_tests.rs
Comment thread tests/bdd_config_steps/layer.rs
Comment thread tests/make_audit_target.rs
Consolidate the ACP test doubles and frame builders into a shared
acp_test_support module: one poison-tolerant RecordingWriter replaces
the three near-identical recorders, and one jsonrpc_frame builder
replaces the per-module frame constructors, resolving the CodeScene
code-duplication findings on acp_frame_tests,
protocol_acp_policy_integration_tests, and protocol_acp_tests. The
two structurally similar non-enforcing policy tests are now a single
parameterized rstest case, and the two initialize-frame builders share
a blocked_capabilities helper.

Also, per reviewer feedback:

- read tar entry metadata from the open file handle instead of a prior
  directory call, so the header size cannot drift from the streamed
  bytes if the file changes between the two calls;
- consume fallible rstest fixtures by returning Result from the tests
  and propagating with `?` rather than unwrapping inline;
- pass the frame value to serialize_frame by reference, removing the
  explicit drop;
- return the mapped ConfigError directly instead of wrapping with
  Ok(...?);
- name the fake cargo script path once via a constant.
Comment thread src/engine/connection/exec/acp_frame_tests.rs
Comment thread src/engine/connection/exec/protocol_acp_policy_integration_tests.rs Outdated
Comment thread src/engine/connection/exec/protocol_acp_tests.rs
codescene-access[bot]

This comment was marked as outdated.

CodeScene flagged the permitted-frame and blocked-notification tests
as structurally duplicated. They are now a single parameterized rstest
case that drives one frame through the adapter and asserts the
expected host-stdout routing per frame kind.
codescene-access[bot]

This comment was marked as outdated.

The fixture-consumption rework made several tests return Result so
fixtures propagate with `?`, but the crate denies
clippy::panic_in_result_fn, which rejects assert!/assert_eq!/panic! in
any Result-returning function, including tests. Swap those assertions
for eyre::ensure! and the panicking match arms for eyre::bail!, and
return eyre::Result so both io::Error and PodbotError propagate.
@leynos
leynos merged commit ef00ce0 into main Jul 9, 2026
6 checks passed
@leynos
leynos deleted the adopt-whitaker branch July 9, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant