Skip to content

Conversation

@mikejmorgan-ai
Copy link
Member

@mikejmorgan-ai mikejmorgan-ai commented Jan 15, 2026

Summary

This PR adopts Business Source License 1.1 (BSL 1.1) for Cortex Linux core.

What changed

  • Added BSL_LICENSE.md with full BSL 1.1 terms (1 system free; 30-day eval allowed; Change Date Jan 15, 2032 → Apache 2.0)
  • Updated LICENSE to point to BSL_LICENSE.md and commercial licensing path
  • Updated README to reflect new licensing terms

Commercial licensing

  • Any use beyond one (1) system, production use, or managed services requires a commercial license.
  • Contact: licensing@cortexlinux.com

Summary by CodeRabbit

  • Chores

    • Introduces a Business Source License 1.1 document with one-system free use, exceptions (personal/educational/evaluation/contribution), and a scheduled transition to Apache 2.0 on January 15, 2032.
    • Replaces the prior LICENSE text with a concise statement that the project will be available under Apache 2.0 effective January 15, 2032.
  • Documentation

    • README updated to reference the new BSL terms and link to the full license document.
  • Tests

    • Test suite adjusted to align with the public licensing interface and updated test patching style.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds a Business Source License 1.1 document, replaces the root LICENSE with a short Apache 2.0 effective-date statement (Jan 15, 2032), updates README license text, and adjusts tests to reference and export several licensing-related symbols from cortex.licensing.

Changes

Cohort / File(s) Summary
License documents
BSL_LICENSE.md, LICENSE, README.md
Adds full BSL 1.1 text in BSL_LICENSE.md; replaces LICENSE contents with a brief Apache 2.0 effective-date statement (20232-01-15); updates README license section to reference BSL 1.1 and link to full terms.
Tests / Public API references
tests/test_licensing.py
Test updated to import and reference several public symbols from cortex.licensing (FEATURE_NAMES, FEATURE_REQUIREMENTS, LICENSE_FILE, FeatureNotAvailableError, _get_hostname, activate_license, check_feature, get_license_info, get_license_tier, require_feature, show_license_status, show_upgrade_prompt) and standardized patch call styles.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Suyashd999
  • Anshgrover23

Poem

🐰 With twitching whiskers and a curious hop,
I penned a license from bottom to top.
BSL today, Apache later in line,
Hoppity changes — the code will be fine! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides a clear summary of changes and commercial licensing details, but is missing several required template sections including Related Issue, AI Disclosure checkbox, and pre-merge Checklist items. Add the missing template sections: Related Issue (Closes #XXX), AI Disclosure checkboxes, and Checklist items to fully comply with the repository's PR description template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: move Cortex Linux core to BSL 1.1 license' clearly and accurately summarizes the main change: adopting Business Source License 1.1 for Cortex Linux core, matching the changeset's primary objective.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% 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 nitpick comments
tests/test_licensing.py (2)

316-357: Activation tests cover success, failure, and error scenarios well.

The tests properly verify:

  • License file is written on successful activation
  • False returned on invalid key
  • Network errors handled gracefully (no exception propagation)

Minor style note: nested with statements at lines 329-330 could be combined into a single statement, but this is purely aesthetic.

Optional: Combine nested context managers
-        with patch.object(lic, "LICENSE_FILE", license_file):
-            with patch("httpx.post", return_value=mock_response):
-                result = activate_license("test-key-123")
+        with (
+            patch.object(lic, "LICENSE_FILE", license_file),
+            patch("httpx.post", return_value=mock_response),
+        ):
+            result = activate_license("test-key-123")

143-150: Consider consolidating repeated cache reset fixtures.

The reset_cache fixture is duplicated across 5+ test classes with identical implementation. This could be moved to conftest.py as a session or function-scoped fixture to reduce duplication.

Optional: Move to conftest.py

Create tests/conftest.py:

import pytest

`@pytest.fixture`(autouse=True)
def reset_license_cache():
    """Reset license cache before and after each test."""
    import cortex.licensing as lic
    lic._cached_license = None
    yield
    lic._cached_license = None

Then remove the individual reset_cache fixtures from each test class.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5c4ba58 and 4aebfc0.

📒 Files selected for processing (1)
  • 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
⏰ 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.11)
  • GitHub Check: Test (Python 3.12)
  • GitHub Check: Test (Python 3.10)
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.10)
  • GitHub Check: test (3.12)
🔇 Additional comments (6)
tests/test_licensing.py (6)

1-25: Imports look well-organized and comprehensive.

The expanded import list properly covers the public API surface being tested. Minor note: _get_hostname is a private function (underscore prefix) - testing it is acceptable for ensuring internal logic correctness, but be aware this couples tests to implementation details.


140-190: Test class structure is solid.

Good use of:

  • autouse fixture for cache isolation between tests
  • tmp_path for file operations to avoid side effects
  • patch.object for targeted mocking of LICENSE_FILE and Path.exists

The identity check at line 189 (info1 is info2) correctly verifies caching behavior returns the same object instance.


192-247: Feature gating tests provide good coverage.

Tests properly verify:

  • Community tier can access unknown/community features but not pro features
  • Pro tier can access pro features
  • Enterprise tier can access all features
  • Upgrade prompt display when silent=False

249-287: Decorator tests correctly validate feature gating behavior.

Good pattern using pytest.raises context manager and verifying the exception contains relevant information ("cloud_llm" in str(exc_info.value)).


359-407: Status display and hostname helper tests are adequate.

The capsys fixture usage properly validates console output contains expected tier information ("COMMUNITY", "PRO", "ACTIVE").


409-431: Upgrade prompt tests verify expected output.

The flexible assertion at line 417 ("Cloud LLM" in captured.out or "cloud_llm" in captured.out) handles both display name and raw feature name, which is pragmatic.

Note: Hardcoded pricing values ($20, $99) in assertions will require test updates if pricing changes. Consider whether these should reference constants from the licensing module if available.

✏️ 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 @mikejmorgan-ai, 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 transitions the Cortex Linux core to a Business Source License 1.1 model. This change aims to regulate commercial usage of the software by requiring commercial licenses for use beyond a single system or for production purposes, while still allowing certain free uses. The license also includes a clear path for the software to become Apache 2.0 licensed in the future, providing a structured approach to its long-term availability and use.

Highlights

  • New License File Added: A new file, BSL_LICENSE.md, has been added which contains the full text of the Business Source License 1.1, outlining its parameters, definitions, terms, commercial use conditions, and termination clauses.
  • License Reference Updated: The main LICENSE file has been updated to be a concise reference, pointing to BSL_LICENSE.md for the full license text and cortexlinux.com/pricing for commercial licensing information. It also explicitly states the future transition to Apache License 2.0 on January 15, 2032.
  • README Updated for Clarity: The README.md file's license section has been updated to clearly state that Cortex Linux is now under BSL 1.1, detailing the conditions for free use (one system for personal, educational, contribution, or 30-day evaluation) and commercial use requirements, along with the Change Date to Apache 2.0.
  • Business Source License 1.1 Adoption: The core of Cortex Linux is now licensed under BSL 1.1, which limits free usage to one system and specifies conditions for commercial use, while also setting a future date (January 15, 2032) for conversion to the more permissive Apache License 2.0.
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.

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 transitions the Cortex Linux core license to Business Source License 1.1. The changes include adding a new BSL_LICENSE.md file with the full terms, updating the LICENSE file to be a concise pointer, and modifying the README.md to reflect the new licensing model. The changes are clear and consistent across the new and updated files. My main feedback is regarding an inconsistency in the README.md where the license badge at the top of the file was not updated and still refers to Apache 2.0, which could confuse users. This should be corrected to reflect the BSL 1.1 license.

Comment on lines +462 to +468
Cortex Linux is licensed under the **Business Source License 1.1 (BSL 1.1)**.

- Free use: **one (1) system** for personal, educational, contribution, or evaluation (up to **30 days**, including for-profit evaluation)
- Commercial use: any additional systems, production use, managed services, or competing offerings require a commercial license
- Change Date: **January 15, 2032****Apache 2.0**

See **BSL_LICENSE.md** for full terms.
Copy link
Contributor

Choose a reason for hiding this comment

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

high

While this section correctly updates the license to BSL 1.1, the license badge at the top of the README (line 17) still shows 'Apache 2.0'. This is misleading and should be updated to be consistent with the new license. A custom badge might be needed to represent BSL 1.1 accurately.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

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

⚠️ Outside diff range comments (1)
README.md (1)

17-17: Update license badge to reflect BSL 1.1.

The badge currently displays "Apache 2.0" but the project is licensed under BSL 1.1 until January 15, 2032. This inconsistency could mislead users about the actual license terms and restrictions.

🏷️ Proposed fix to update the badge
-    <img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License" />
+    <img src="https://img.shields.io/badge/License-BSL%201.1-blue.svg" alt="License" />
🧹 Nitpick comments (1)
BSL_LICENSE.md (1)

91-91: Consider wrapping bare URLs in markdown link syntax.

Markdownlint prefers explicit link syntax for URLs (note: line 91 is an email address and should remain as-is).

♻️ Proposed formatting improvements
 For commercial licensing inquiries:
 licensing@cortexlinux.com
 
 Pricing information:
-https://cortexlinux.com/pricing
+[https://cortexlinux.com/pricing](https://cortexlinux.com/pricing)
 This license is based on the Business Source License 1.1, originally published by
 MariaDB Corporation.
-https://mariadb.com/bsl11/
+[https://mariadb.com/bsl11/](https://mariadb.com/bsl11/)

Also applies to: 94-94, 126-126

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bcc35e2 and 5c4ba58.

📒 Files selected for processing (3)
  • BSL_LICENSE.md
  • LICENSE
  • README.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
BSL_LICENSE.md

91-91: Bare URL used

(MD034, no-bare-urls)


94-94: Bare URL used

(MD034, no-bare-urls)


126-126: Bare URL used

(MD034, no-bare-urls)

⏰ 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.10)
  • GitHub Check: Test (Python 3.11)
  • GitHub Check: test (3.10)
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.12)
🔇 Additional comments (2)
README.md (1)

462-468: LGTM! License description is clear and accurate.

The license section accurately reflects the BSL 1.1 terms, including the one-system limitation, commercial use requirements, and the Change Date for Apache 2.0 conversion. The reference to BSL_LICENSE.md provides users with a clear path to the full terms.

LICENSE (1)

1-7: LGTM! Clear and concise license summary.

The summary-style LICENSE file effectively directs users to the full BSL 1.1 terms in BSL_LICENSE.md while noting the commercial licensing path and future Apache 2.0 conversion. This approach is appropriate for projects with detailed license terms in a separate document.

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

@github-actions
Copy link

github-actions bot commented Jan 15, 2026

CLA Verification Passed

All contributors have signed the CLA.

Contributor Signed As
Mike Morgan Mike Morgan
@Anshgrover23 @Anshgrover23

@sonarqubecloud
Copy link

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.

3 participants