Skip to content

fix(ci): lint the whole workspace so jcode-sdk is no longer skipped - #166

Closed
KooshaPari wants to merge 1 commit into
masterfrom
fix/ci-clippy-workspace-coverage
Closed

KooshaPari wants to merge 1 commit into
masterfrom
fix/ci-clippy-workspace-coverage

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

User description

Closes #165

What this changes

1. .github/workflows/ci.yml — close the coverage gap

The clippy gate in job quality ("Quality Guardrails"), step "Run clippy with warnings denied", ran without --workspace:

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

Cargo therefore built only the root package's dependency graph, not the set of workspace members. crates/jcode-sdk is a workspace member with no dependents, so it was unreachable from the root and was silently never linted.

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

Only this one step changed. No other job, workflow, timeout, or cache setting was touched.

2. crates/jcode-sdk/src/client.rs — remove the dead code the gap was hiding

Removed the unused type Subscriber = (u64, Option<String>, Sender<ApiEvent>); and its attached doc comment. SubscriberList (a distinct alias) is untouched and still used. No other code in the crate changed; the alias had no other references.

Why this had to be done together

The gate and the tests disagreed. Green run 39390720989 proves the gate's blind spot: the clippy step checked 93 crates against a 94-package workspace, and jcode-sdk was the only member absent. The same run's later cargo test -p jcode-sdk parity step did compile the crate and emitted:

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

So a dead_code warning sat in the workspace on master for the entire life of the gate, and the gate was structurally unable to see it. Adding --workspace alone would turn that warning into a hard failure; removing the alias alone would leave the blind spot in place for every future member without dependents.

Validation

Run on the desk compute node (desk, WSL2), not the laptop.

jcode-sdk alone — VERIFIED, before and after

Before the edit, the violation reproduces and fails the gate:

    Checking jcode-sdk v0.1.0
error: type alias `Subscriber` is never used
   --> crates/jcode-sdk/src/client.rs:330:6
    |
330 | type Subscriber = (u64, Option<String>, Sender<ApiEvent>);
    |      ^^^^^^^^^^
    |
    = note: `-D dead-code` implied by `-D warnings`
error: could not compile `jcode-sdk` (lib) due to 1 previous error
EXIT_CODE=101

After the edit, same command, clean:

    Checking jcode-sdk v0.1.0
    Finished `dev` profile [unoptimized] target(s) in 21.66s
EXIT_CODE=0

Whole-workspace — UNVERIFIED (blocked, not passed)

cargo clippy --workspace --all-targets --all-features -- -D warnings was not run to completion end-to-end. The desk node was saturated at the time: 8 GB available with 0 bytes of swap, load average 8.9/20.4/36.3, seven other cargo/rustc processes, and ten CI runs queued against the single desk-kcode-1 runner. That box wedged for 1h38m earlier today on a comparable --workspace job, so starting another cold-cache 94-crate build there would have risked reproducing the incident and blocking this repo's only CI runner.

No local fallback was used either: the laptop has no target/ cache, so the same command there is a full cold build of the whole workspace.

Treat the whole-workspace result as unproven by this PR. The supporting reasoning — which is not a substitute for the run — is that --workspace changes only which packages are selected, not the lint configuration, and the other 93 members already passed the identical --all-targets --all-features -- -D warnings gate in run 39390720989. The one member it adds is jcode-sdk, verified clean above. That reasoning predicts a pass; it does not establish one. This PR's own CI run will exercise the real command, and that run is the authoritative check.

Scope

Exactly two files, 1 file changed, 1 insertion(+), 4 deletions(-):

  • .github/workflows/ci.yml (1 line)
  • crates/jcode-sdk/src/client.rs (3 lines: the alias and its doc comment)

CodeAnt-AI Description

Lint every workspace crate in CI

What Changed

  • CI now checks all workspace crates, including jcode-sdk, for lint warnings.
  • Removed an unused alias that would fail the expanded lint check.

Impact

✅ jcode-sdk linted in CI
✅ Dead-code warnings caught before merge

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

The clippy gate ran without --workspace, so cargo only built the root package's dependency graph. crates/jcode-sdk is a workspace member with no dependents and was never linted: the green run 39390720989 shows the clippy step checking 93 crates against a 94-package workspace, with jcode-sdk the only member absent.

That gap was not theoretical. cargo test -p jcode-sdk parity in the same run emitted a dead_code warning for the unused type alias Subscriber at crates/jcode-sdk/src/client.rs:330. Removing the dead alias and adding --workspace closes both the violation and the blind spot.

tx-agent: jcode
tx-validated: cargo-check
tx-scope: .github/workflows/ci.yml, crates/jcode-sdk/src/client.rs
tx-intent: Close the CI clippy workspace-coverage gap and remove the dead code it hid
Copilot AI balanced review requested due to automatic review settings October 21, 2026 05:49
@codeant-ai

codeant-ai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 762da9f Oct 21, 2026 · 05:49 05:53

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codeant-ai

codeant-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e2171580-3be9-424b-bb3a-f3a41873fb01
📥 Commits

Reviewing files that changed from the base of the PR and between 2aea04d and 762da9f.

📒 Files selected for processing: 2
  • .github/workflows/ci.yml
  • crates/jcode-sdk/src/client.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Oct 21, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • .github/workflows/ci.yml - 0 issues
  • crates/jcode-sdk/src/client.rs - 0 issues

Reviewed by free · Input: 38.2K · Output: 3.5K · Cached: 112.7K

@codeant-ai

codeant-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

1 code suggestion

1. The local helper still runs Clippy without --workspace, so it can pass while workspace-only warnings fail this gate, despite claiming to run every Quality Guardrails gate.

Api mismatch · .github/workflows/ci.yml:66

@codeant-ai

codeant-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: 762da9fbfa06

KooshaPari added a commit that referenced this pull request Oct 21, 2026
…rkspace-lint-fixes

Carries PR #166's --workspace clippy gate into PR #169 so this branch's own
CI validates the lint fixes it ships. The gate newly compiles
jcode-telemetry-core and jcode-setup-hints (never built by the root package's
dependency graph) plus jcode-sdk, which is why the jcode-sdk dead-code hunk
from #166 is required here too.

Conflict-free: the two branches touch disjoint files (#169: telemetry-core +
setup-hints; #166: ci.yml + jcode-sdk/src/client.rs).

No test removed or weakened.

tx-agent: jcode
tx-validated: pending-local-clippy
tx-task: #170
tx-scope: ci.yml, jcode-sdk, jcode-telemetry-core, jcode-setup-hints
tx-intent: make the workspace clippy gate self-validating on this branch
@KooshaPari

Copy link
Copy Markdown
Owner Author

@KooshaPari KooshaPari closed this Oct 27, 2026
@KooshaPari
KooshaPari deleted the fix/ci-clippy-workspace-coverage branch October 27, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI clippy gate skips the jcode-sdk workspace member

2 participants