Skip to content

Conversation

@Anshgrover23
Copy link
Collaborator

@Anshgrover23 Anshgrover23 commented Jan 16, 2026

Summary

  • Add autofix-ci[bot] to the CLA verification bot allowlist in .github/scripts/cla_check.py
  • Fix import sorting in tests/test_licensing.py to resolve ruff I001 lint error

Test plan

  • Verify CLA check passes for PRs from autofix-ci[bot]
  • Verify ruff check tests/test_licensing.py passes without I001 error

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Licensing module public API expanded to include license activation, feature availability verification, license information retrieval, tier checks, and upgrade guidance.
  • Tests

    • Updated licensing tests to validate newly exposed public API functionality.
  • Chores

    • Updated bot detection patterns in CI workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

- Add autofix-ci[bot] to CLA verification bot allowlist
- Fix import sorting in tests/test_licensing.py (ruff I001)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

📝 Walkthrough

Walkthrough

This pull request adds "autofix-ci" to the CLA check bot allowlist pattern and expands the public API surface of the cortex.licensing module by exposing twelve additional symbols through test imports, including licensing configuration constants and utility functions.

Changes

Cohort / File(s) Summary
CLA Bot Allowlist Update
.github/scripts/cla_check.py
Adds "autofix-ci" to the bot_patterns allowlist, enabling the CLA check to recognize and skip contributors matching this pattern.
Licensing Public API Expansion
tests/test_licensing.py
Expands cortex.licensing module's public API surface by importing and testing twelve previously unexposed symbols: FEATURE_NAMES, FEATURE_REQUIREMENTS, LICENSE_FILE, FeatureNotAvailableError, _get_hostname, activate_license, check_feature, get_license_info, get_license_tier, require_feature, show_license_status, and show_upgrade_prompt. Includes minor formatting adjustments.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly Related PRs

Suggested Reviewers

  • mikejmorgan-ai
  • Suyashd999

Poem

🐰✨ Autofix-ci joins the crew,
Licensing symbols shine anew,
CLA checks hop faster now,
With API exposed—take a bow!
Cortex brightens, clear as dew! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description includes a summary of changes and test plan, but is missing required sections from the template: Related Issue, AI Disclosure checkbox, and PR Checklist. Add the missing template sections: specify the related issue number (Closes #...), clearly mark the AI Disclosure checkbox selection, and complete all items in the Checklist section.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes both main changes: adding autofix-ci bot to CLA ignore list and fixing a lint error in test_licensing.py.
Docstring Coverage ✅ Passed Docstring coverage is 95.45% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8e65faf and 2a18c18.

📒 Files selected for processing (2)
  • .github/scripts/cla_check.py
  • tests/test_licensing.py
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Follow PEP 8 style guide for Python code
Include type hints in Python code
Add docstrings for all public APIs in Python code
Use dry-run mode by default for all installation operations
Do not use silent sudo - require explicit user confirmation for privilege escalation
Implement Firejail sandboxing for execution of untrusted code
Log all operations to ~/.cortex/history.db for audit purposes

Files:

  • tests/test_licensing.py
tests/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Maintain test coverage above 80% for pull requests

Files:

  • tests/test_licensing.py
🧬 Code graph analysis (1)
tests/test_licensing.py (1)
cortex/licensing.py (7)
  • FeatureNotAvailableError (333-342)
  • FeatureTier (17-32)
  • LicenseInfo (76-106)
  • _get_hostname (326-330)
  • activate_license (263-317)
  • check_feature (150-173)
  • get_license_info (112-142)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Test (Python 3.12)
  • GitHub Check: Test (Python 3.11)
  • GitHub Check: Test (Python 3.10)
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.10)
  • GitHub Check: test (3.12)
🔇 Additional comments (4)
.github/scripts/cla_check.py (1)

339-340: LGTM — bot allowlist covers autofix-ci.

This will correctly skip CLA checks for autofix-ci bot activity under the current substring match logic.

tests/test_licensing.py (3)

3-25: LGTM! Import ordering correctly fixed.

The imports now follow PEP 8/isort conventions:

  1. Standard library imports (json, datetime, pathlib, unittest.mock)
  2. Third-party imports (pytest)
  3. Local imports (cortex.licensing)

This resolves the ruff I001 lint error as intended.


143-150: Consistent style improvement across fixtures.

The added blank line after the local import cortex.licensing as lic statement improves readability and follows a consistent pattern throughout the test file. The same formatting is applied to all similar fixtures (lines 196-202, 252-259, 307-314, 362-369).


399-406: Testing private function _get_hostname is acceptable here.

While _get_hostname is a private function (prefixed with _), testing it directly is reasonable since it's a pure helper with specific behavior that the module relies on. The test validates the contract that it returns a non-empty string.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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 and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Anshgrover23, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses two distinct areas: improving the continuous integration workflow by allowing the autofix-ci[bot] to bypass CLA checks, and enhancing code quality by resolving a Ruff linting error related to import order in the licensing test file. These changes collectively streamline automated processes and ensure adherence to coding standards.

Highlights

  • CLA Bot Allowlist: Added "autofix-ci[bot]" to the Contributor License Agreement (CLA) verification bot allowlist in .github/scripts/cla_check.py. This change ensures that automated commits from this bot do not trigger unnecessary CLA failures.
  • Linting Fix: Corrected import sorting in tests/test_licensing.py to resolve a Ruff I001 lint error. This brings the file into compliance with established code style guidelines for import order.
  • Code Formatting: Applied minor formatting adjustments, specifically adding blank lines around certain code blocks within tests/test_licensing.py, to enhance readability and maintain consistent code style.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sonarqubecloud
Copy link

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adds the autofix-ci bot to the CLA check ignore list and fixes an import sorting issue as described. The changes are functional and improve code style. I've included one suggestion for the tests/test_licensing.py file to refactor repeated code, which would significantly improve the maintainability of the test suite.

@Sahilbhatane Sahilbhatane merged commit 36450f6 into cortexlinux:main Jan 16, 2026
18 checks passed
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.

2 participants