Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Default owners for everything
# NOTE: Verify that all handles below are members of the rocketride-org organization.
# GitHub usernames confirmed to exist: @jmaionchi, @Rod-Christensen, @stepmikhaylov, @kwit75
# Org membership could not be verified programmatically (requires admin access).
* @jmaionchi @Rod-Christensen @stepmikhaylov

# DevOps maintainers
/.github/ @kwit75

# C++ engine — requires engine team review
packages/server/ @jmaionchi @Rod-Christensen

# Python nodes — requires ML team review
nodes/ @stepmikhaylov @jmaionchi

# Client SDKs
packages/client-typescript/ @jmaionchi @stepmikhaylov
packages/client-python/ @jmaionchi @stepmikhaylov
packages/client-mcp/ @jmaionchi @stepmikhaylov

# CI/CD — requires DevOps review (/.github/ covered by DevOps maintainers rule above)
docker/ @kwit75

# Security-sensitive files
packages/ai/src/ai/web/middleware.py @jmaionchi @Rod-Christensen
packages/ai/src/ai/account/ @jmaionchi @Rod-Christensen
SECURITY.md @jmaionchi @Rod-Christensen
59 changes: 59 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Code Coverage

on:
pull_request:
push:
branches: [develop, main]

permissions:
contents: read

jobs:
coverage:
name: Python coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
# Install node dependencies if requirements exist
if [ -f nodes/requirements.txt ]; then pip install -r nodes/requirements.txt; fi
if [ -f packages/ai/requirements.txt ]; then pip install -r packages/ai/requirements.txt; fi
# Install packages in editable mode for coverage tracking
if [ -f nodes/setup.py ] || [ -f nodes/pyproject.toml ]; then pip install -e nodes/; fi
if [ -f packages/ai/setup.py ] || [ -f packages/ai/pyproject.toml ]; then pip install -e packages/ai/; fi

- name: Run tests with coverage
id: tests
continue-on-error: true
run: |
pytest \
--cov=nodes \
--cov=packages \
--cov-report=xml:coverage.xml \
--cov-report=term-missing \
--junitxml=junit.xml \
-q \
nodes/test/ test/
Comment on lines +39 to +46
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if packages/ai/tests/ exists and contains tests
fd -t d -d 1 'tests' packages/ai/

# Check root pyproject.toml for testpaths configuration
if [ -f pyproject.toml ]; then
  echo "=== Root pyproject.toml testpaths ==="
  rg -n 'testpaths' pyproject.toml
fi

# List test files in packages/ai/tests/
fd 'test_.*\.py$' packages/ai/ 2>/dev/null | head -20

Repository: rocketride-org/rocketride-server

Length of output: 461


🏁 Script executed:

# Read the coverage.yml file to see the exact pytest command
cat -n .github/workflows/coverage.yml

Repository: rocketride-org/rocketride-server

Length of output: 2358


🏁 Script executed:

# Check for pytest configuration in pyproject.toml
rg -A 10 '\[tool\.pytest' pyproject.toml

# Check for pytest.ini
fd -n 'pytest.ini' .

# Check for conftest.py in packages/ai/tests/
find packages/ai/tests -name 'conftest.py' 2>/dev/null

Repository: rocketride-org/rocketride-server

Length of output: 589


🏁 Script executed:

# Verify what pytest actually discovers with the given paths
# Check what's in the main test/ directory
fd 'test_.*\.py$|conftest\.py$' test/ 2>/dev/null | head -20

# Check what's in nodes/test/ directory
fd 'test_.*\.py$|conftest\.py$' nodes/test/ 2>/dev/null | head -20

Repository: rocketride-org/rocketride-server

Length of output: 850


🏁 Script executed:

# Check if conftest.py files have sys.path manipulations
echo "=== nodes/test/conftest.py sys.path manipulations ==="
rg -n 'sys.path' nodes/test/conftest.py -A 2 -B 2

echo "=== packages/ai/tests/conftest.py sys.path manipulations ==="
rg -n 'sys.path' packages/ai/tests/conftest.py -A 2 -B 2

Repository: rocketride-org/rocketride-server

Length of output: 654


Test discovery may miss packages/ai/tests/.

The pytest command collects tests from nodes/test/ and test/, but packages/ai/tests/ contains test files that are not included in the test paths. Those tests won't run and their coverage won't be reported.

Additionally, both conftest.py files perform sys.path manipulations:

  • nodes/test/conftest.py adds dist/server
  • packages/ai/tests/conftest.py adds the src directory

These could conflict if both test directories are collected simultaneously.

Consider:

  1. Adding packages/ai/tests/ to the test paths if those tests should run
  2. Running the test suites separately if sys.path conflicts are a concern
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/coverage.yml around lines 39 - 46, The CI pytest
invocation currently collects tests from nodes/test/ and test/ but omits
packages/ai/tests/, so add packages/ai/tests/ to the pytest paths or run it as a
separate job to avoid sys.path collisions; specifically either extend the pytest
command (the existing pytest invocation with flags --cov=nodes --cov=packages
--cov-report=xml:coverage.xml --cov-report=term-missing --junitxml=junit.xml -q
nodes/test/ test/) to also include packages/ai/tests/ or create a separate
workflow step/job that runs pytest against packages/ai/tests/ (honoring its
conftest.py that mutates sys.path) so both suites run and coverage/junit are
produced without conflicting sys.path changes.


- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
with:
files: coverage.xml
fail_ci_if_error: false
flags: python
token: ${{ secrets.CODECOV_TOKEN }}

- name: Fail if tests failed
if: steps.tests.outcome == 'failure'
run: exit 1
22 changes: 22 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dependency Review

on: [pull_request]

permissions:
contents: read
pull-requests: write

jobs:
dependency-review:
name: Review dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Dependency Review
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
with:
fail-on-severity: high
deny-licenses: GPL-2.0-only, GPL-2.0-or-later, GPL-3.0-only, GPL-3.0-or-later, AGPL-3.0-only, AGPL-3.0-or-later
comment-summary-in-pr: always
24 changes: 24 additions & 0 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Secrets Scanning

on:
pull_request:
push:
branches: [develop, main]

permissions:
contents: read

jobs:
gitleaks:
name: Detect secrets
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

- name: Run Gitleaks
uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2.3.9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 8 additions & 13 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ paths = ['''\.pipe$''']
'''\$[A-Z_]+''',
'''\$\{[A-Z_]+\}''',
]
paths = [
'''testdata/''',
'''test/fixtures/''',
]

# Custom rule: detect hardcoded keys in services.json node configs
[[rules]]
Expand All @@ -34,16 +38,7 @@ paths = ['''services.*\.json$''']
'''\$[A-Z_]+''',
'''\$\{[A-Z_]+\}''',
]

# Global allowlist — skip lock files, build output, test fixtures
[allowlist]
paths = [
'''pnpm-lock\.yaml''',
'''package-lock\.json''',
'''\.gitleaks\.toml''',
'''build/''',
'''dist/''',
'''downloads/''',
'''node_modules/''',
'''\.claude/''',
]
paths = [
'''testdata/''',
'''test/fixtures/''',
]
1 change: 1 addition & 0 deletions apps/chat-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@
"typescript": "^5.2.2"
}
}

1 change: 1 addition & 0 deletions apps/chat-ui/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/dropper-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@
"typescript": "^5.2.2"
}
}

1 change: 1 addition & 0 deletions apps/dropper-ui/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,3 +440,4 @@
"dist/**"
]
}

20 changes: 20 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
coverage:
status:
project:
default:
target: auto
threshold: 2%
patch:
default:
target: 80%
ignore:
- "testdata/**"
- "docs/**"
- "scripts/**"
- "**/test_*.py"
- "**/conftest.py"

comment:
layout: "reach,diff,flags,files"
behavior: default
require_changes: true
78 changes: 78 additions & 0 deletions docs/BRANCH_PROTECTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Branch Protection Rules

Recommended branch protection configuration for the RocketRide Server repository.

## `develop` Branch (Primary Integration Branch)

### Required Settings

| Setting | Value | Rationale |
|---------|-------|-----------|
| Require pull request reviews | Yes | All changes must be peer-reviewed |
| Required approving reviews | 1 | Minimum one approval before merge |
| Dismiss stale reviews on new pushes | Yes | Force re-review after changes |
| Require review from CODEOWNERS | Yes | Enforces team-based ownership (see `.github/CODEOWNERS`) |
| Require status checks to pass | Yes | Prevents merging broken code |
| Require branches to be up to date | Yes | Ensures CI runs against latest develop |
| Require linear history | Yes | Keeps history clean (squash or rebase merges only) |
| Require signed commits | No | Optional; not all contributors have GPG keys configured |
| Include administrators | Yes | Rules apply to everyone, including admins |
| Restrict who can push | Yes | Only merge via PR; no direct pushes |
| Allow force pushes | No | Never allow force pushes to develop |
| Allow deletions | No | Prevent accidental branch deletion |

### Required Status Checks

These checks must pass before a PR can merge to `develop`:

- `CI OK` (from `ci.yml` — the gatekeeper job that aggregates all CI results)
- `Detect secrets` (from `gitleaks.yml`)
- `Review dependencies` (from `dependency-review.yml`)
- `Validate PR title` (from `pr-checks.yml`)

### Optional but Recommended Status Checks

- `Python coverage` (from `coverage.yml` — advisory, not blocking)

## `main` Branch (Production)

Apply the same settings as `develop`, with these additions:

| Setting | Value | Rationale |
|---------|-------|-----------|
| Required approving reviews | 2 | Higher bar for production releases |
| Restrict pushes to specific teams | DevOps only | Only release managers can merge to main |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Minor: Rephrase to avoid adverb repetition.

The phrase "DevOps only | Only release managers" uses "only" twice in close proximity.

✏️ Suggested fix
-| Restrict pushes to specific teams | DevOps only | Only release managers can merge to main |
+| Restrict pushes to specific teams | DevOps team | Release managers exclusively can merge to main |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Restrict pushes to specific teams | DevOps only | Only release managers can merge to main |
| Restrict pushes to specific teams | DevOps team | Release managers exclusively can merge to main |
🧰 Tools
🪛 LanguageTool

[style] ~44-~44: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...ushes to specific teams | DevOps only | Only release managers can merge to main | #...

(ADVERB_REPETITION_PREMIUM)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/BRANCH_PROTECTION.md` at line 44, The table row text "Restrict pushes to
specific teams | DevOps only | Only release managers can merge to main" repeats
"only" — update that row to remove the duplicate adverb, e.g. change the middle
and right cells to "DevOps" and "Release managers can merge to main" or to
"DevOps only" and "Release managers can merge to main" so the phrase no longer
uses "only" twice; locate and edit the exact table row string in
BRANCH_PROTECTION.md.


## How to Configure in GitHub UI

1. Go to **Settings** > **Branches** > **Add branch protection rule**
2. Enter the branch name pattern (e.g., `develop`)
3. Enable each setting from the tables above
4. Under **Require status checks to pass before merging**:
- Search for and add each required check by name
- Enable **Require branches to be up to date before merging**
5. Click **Create** (or **Save changes** if editing)

### Using GitHub CLI

You can also configure branch protection via `gh`:

```bash
gh api repos/{owner}/{repo}/branches/develop/protection \
--method PUT \
--field required_status_checks='{"strict":true,"contexts":["CI OK","Detect secrets","Review dependencies","Validate PR title"]}' \
--field enforce_admins=true \
--field required_pull_request_reviews='{"required_approving_review_count":1,"dismiss_stale_reviews":true,"require_code_owner_reviews":true}' \
--field restrictions=null \
--field required_linear_history=true \
--field allow_force_pushes=false \
--field allow_deletions=false
```
Comment on lines +60 to +70
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

CLI example uses restrictions=null but table says "Restrict who can push: Yes".

Line 66 sets --field restrictions=null, which means no push restrictions are applied. However, the settings table (line 20) specifies "Restrict who can push: Yes" with rationale "Only merge via PR; no direct pushes."

If the intent is to prevent direct pushes entirely (forcing all changes through PRs), the restrictions field should specify the users/teams allowed to push, or you could clarify that the restriction is achieved through requiring PR reviews rather than push restrictions.

📝 Possible clarification

Option 1: Update the CLI to restrict pushes to specific users/teams:

-  --field restrictions=null \
+  --field restrictions='{"users":[],"teams":["devops"]}' \

Option 2: Update the table to clarify that "no direct pushes" is enforced by requiring PRs, not by push restrictions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/BRANCH_PROTECTION.md` around lines 60 - 70, The CLI example currently
sets --field restrictions=null which contradicts the table entry "Restrict who
can push: Yes"; either update the CLI snippet to provide an explicit
restrictions payload listing allowed users/teams (replace restrictions=null with
a JSON object/array of allowed actors) to enforce no direct pushes, or keep
restrictions=null and update the table text to state that "no direct pushes" is
enforced via required_pull_request_reviews (see the
required_pull_request_reviews field) rather than branch push restrictions;
ensure the chosen fix updates the CLI snippet or the table so both consistently
reflect how push prevention is implemented.


## Rulesets (GitHub Rulesets Alternative)

GitHub Rulesets provide a newer, more flexible alternative to branch protection rules.
They support targeting multiple branches, bypass lists, and organization-level policies.

To use rulesets instead, go to **Settings** > **Rules** > **Rulesets** > **New ruleset**.
The same settings from the tables above apply; rulesets simply offer a more granular UI.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@
"typescript-eslint": "^8.15.0"
}
}

1 change: 1 addition & 0 deletions packages/client-mcp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ include = ["rocketride_mcp*"]

[tool.setuptools.package-data]
rocketride_mcp = ["pipelines/*.json"]

1 change: 1 addition & 0 deletions packages/client-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ include = ["rocketride*"]

[tool.setuptools.package-data]
rocketride = ["py.typed"]

1 change: 1 addition & 0 deletions packages/client-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@
"ws": "^8.18.3"
}
}

1 change: 1 addition & 0 deletions packages/client-typescript/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/server/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@
"zstd"
]
}

1 change: 1 addition & 0 deletions packages/shared-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@
"lucide-react": "^0.540.0"
}
}

1 change: 1 addition & 0 deletions packages/shared-ui/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ markers = [
"integration: marks tests as integration tests",
]
asyncio_mode = "auto"

Loading