Skip to content

CI clippy gate skips the jcode-sdk workspace member #165

Open

Description

@KooshaPari

The clippy gate skips one workspace member: crates/jcode-sdk

Mechanism

The clippy step in .github/workflows/ci.yml, job quality ("Quality Guardrails"),
step "Run clippy with warnings denied", ran:

run: cargo clippy --all-targets --all-features -- -D warnings

The command has no --workspace. Cargo therefore builds only the root
package's dependency graph
, not the set of workspace members.

crates/jcode-sdk is declared as a workspace member but no other crate depends
on it
. It is therefore unreachable from the root package, so cargo never
compiles it, so clippy never lints it. Its lints — including dead_code — are
completely invisible to the gate.

The gate is therefore structurally incapable of catching any violation in that
crate, no matter how severe.

Proof, parsed from a green CI run

Parsed from GitHub Actions run 39390720989, job "Quality Guardrails":

  • The clippy step emitted Checking/Compiling lines for exactly 93 crates.
  • The workspace has 94 member packages (93 crates + the root package kcode).
  • Exactly one member is absent from the clippy step's output: jcode-sdk.
    Every other member appears.

So the gate linted 93 of 94 members and silently skipped jcode-sdk.

The gap was not theoretical

The same green run contains a later step, cargo test -p jcode-sdk parity, which
does compile the crate. It emitted:

warning: type alias `Subscriber` is never used  --> crates/jcode-sdk/src/client.rs:330:6
warning: `jcode-sdk` (lib) generated 1 warning

type Subscriber = (u64, Option<String>, Sender<ApiEvent>); is never referenced
anywhere in the crate (the only occurrence of the identifier is its own
definition; SubscriberList is a distinct, used alias).

A dead_code warning sat in the workspace, on master
(2aea04dd871f21da5c5b21800d156a2c9b0830b1), for the entire life of the gate as
written — and the gate was structurally unable to see it. This is a concrete,
real defect the coverage gap was hiding, not a hypothetical.

Fix

  1. Add --workspace to the clippy command so the gate lints all 94 members.
  2. Remove the dead type Subscriber alias it exposes.

Why this must not regress

The gate and the tests disagreed: tests compiled jcode-sdk and saw a warning
the gate never could. Any workspace member without dependents is equally blind.
--workspace removes the class of blind spot rather than the single instance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions