Skip to content

CI Hardening and Development Dependency Modernization (Cycle 8) - #141

Draft
NITISH-R-G wants to merge 1 commit into
mainfrom
cycle-8-ci-and-dev-dependency-improvements-3294829347130607757
Draft

CI Hardening and Development Dependency Modernization (Cycle 8)#141
NITISH-R-G wants to merge 1 commit into
mainfrom
cycle-8-ci-and-dev-dependency-improvements-3294829347130607757

Conversation

@NITISH-R-G

@NITISH-R-G NITISH-R-G commented Jul 21, 2026

Copy link
Copy Markdown
Owner

This branch implements the recommendations documented in CYCLE_8_REPORT.md (which is also generated).

  • Ensures mypy and bandit are installed properly when devs run pip install -e ".[dev]", allowing validate-submission.sh to run smoothly.
  • Expands the automated CI workflow to strictly run the newly added local tests.
  • Mitigates floating-version issues breaking the duplicate-code step by locking jscpd to 4.0.0 and updating it's --ignore lists for Python+Node build output.
  • Minor typing fix for dynamic gradio button properties in the demo.

PR created automatically by Jules for task 3294829347130607757 started by @NITISH-R-G

Summary by Sourcery

Harden the development and CI environment by formalizing dev dependencies, expanding security and environment validation in the code-quality workflow, stabilizing duplicate-code detection, and documenting these improvements in a Cycle 8 report.

New Features:

  • Add Bandit SAST and OpenEnv validation steps to the code-quality GitHub Actions workflow.

Bug Fixes:

  • Adjust Gradio demo button callbacks with typing ignores to silence spurious mypy attr-defined errors.

Enhancements:

  • Include mypy and bandit as explicit dev dependencies to ensure local validation scripts run out-of-the-box.
  • Pin jscpd to version 4.0.0 and expand ignore patterns to exclude build artifacts for more stable duplicate-code checks.
  • Add a generated Cycle 8 repository health report documenting CI and dependency improvements.

CI:

  • Update CI dependency installation to include bandit and openenv-core for security and environment checks.

Documentation:

  • Add the Cycle 8 Report markdown file summarizing repository health, CI improvements, and planned work.

…ents

- Added mypy and bandit to pyproject.toml dev dependencies to allow out-of-the-box execution of validate-submission.sh
- Enhanced .github/workflows/code-quality.yml to execute bandit (SAST) and openenv validate
- Pinned jscpd to v4.0.0 and updated ignore patterns to fix CI stability issues
- Suppressed false positive mypy type errors in viz/gradio_demo.py
- Documented findings in CYCLE_8_REPORT.md per continuous improvement sprint protocol

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1d4bf5d0-e128-4bff-8988-a994e0e8a78a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cycle-8-ci-and-dev-dependency-improvements-3294829347130607757

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.

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@sourcery-ai

sourcery-ai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Reviewer's Guide

CI pipeline is hardened by adding security and environment validation steps, pinning jscpd, and ensuring dev dependencies include mypy/bandit; plus minor typing suppressions in the Gradio demo and a generated cycle report document.

Flow diagram for hardened code-quality CI pipeline

flowchart TD
  gh_actions["GitHub Actions code-quality workflow"]
  install_deps["Install Python dev dependencies (ruff, mypy, bandit, openenv-core)"]
  run_mypy["Run mypy type checking"]
  run_bandit["Run Bandit SAST"]
  run_openenv["Run openenv validate"]
  run_ruff["Run Ruff lint/format"]
  run_vulture["Run Vulture dead code scan"]
  setup_node["Setup Node.js"]
  install_jscpd["Install jscpd@4.0.0"]
  run_jscpd["Run jscpd with expanded ignore patterns (dist, build, venv)"]

  gh_actions --> install_deps
  install_deps --> run_ruff
  install_deps --> run_mypy
  install_deps --> run_bandit
  install_deps --> run_openenv
  install_deps --> run_vulture
  gh_actions --> setup_node
  setup_node --> install_jscpd
  install_jscpd --> run_jscpd
Loading

File-Level Changes

Change Details Files
Strengthen CI code-quality workflow with security scanning, environment validation, and stable duplicate-code detection.
  • Extend Python dependency installation in the workflow to include bandit and openenv-core alongside existing tools.
  • Add a dedicated Bandit SAST step configured to use pyproject.toml.
  • Add an OpenEnv validation step to validate the repository environment as part of CI.
  • Pin jscpd to version 4.0.0 in the Node job to avoid breaking changes from newer releases.
  • Expand jscpd ignore patterns to skip common build artifacts (dist, build) in addition to existing exclusions.
.github/workflows/code-quality.yml
Ensure local development installs necessary static analysis tools via dev extras.
  • Add mypy as a dev dependency with a minimum version constraint.
  • Add bandit as a dev dependency with a minimum version constraint.
pyproject.toml
Suppress Gradio dynamic attribute typing issues to keep mypy strict while using framework-provided button APIs.
  • Annotate Gradio button click registrations with type: ignore[attr-defined] to silence attribute existence warnings from mypy without changing runtime behavior.
viz/gradio_demo.py
Add documentation summarizing cycle 8 repository health, CI risks, and remediation steps implemented in this PR.
  • Create CYCLE_8_REPORT.md describing current strengths/weaknesses, CI and dependency issues, and the improvement plan implemented by the branch.
CYCLE_8_REPORT.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

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