Skip to content
Merged
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
7 changes: 6 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ---- Shared ----
LOG_DIR="$HOME/.saorsa/logs"
# STT (Kyutai Moshi)
KYUTAI_MOSHI_URL=ws://localhost:8000/stream
KYUTAI_API_KEY=
HUGGINGFACEHUB_API_TOKEN=
HF_INFERENCE_URL=https://api-inference.huggingface.co/models/kyutai/stt-2.6b-en

# ---- Policy server (GPU host) ----
POLICY_SERVER_HOST=127.0.0.1
Expand Down Expand Up @@ -32,4 +37,4 @@ ARM04_CAM_INDEX=3

# ---- Async policy execution ----
ACTIONS_PER_CHUNK=40
CHUNK_SIZE_THRESHOLD=0.6
CHUNK_SIZE_THRESHOLD=0.6
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

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

jobs:
rust:
name: Rust Build, Fmt, Clippy
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Build
env:
RUSTFLAGS: -D warnings
run: |
cargo build --workspace --all-targets

- name: Format check
run: cargo fmt --all -- --check

- name: Clippy (strict)
run: |
cargo clippy --all-features -- -D clippy::panic -D clippy::unwrap_used -D clippy::expect_used

82 changes: 81 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@

# Rust
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Cargo
Cargo.lock
# Remove the above line if you're creating a library

# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Python
__pycache__/
*.py[cod]
Expand All @@ -14,18 +37,76 @@ venv/
ENV/
env/
.env
*.pyc
*.pyo
*.pyd
.pytest_cache/
.tox/
.coverage
htmlcov/
.hypothesis/
*.ipynb_checkpoints
.mypy_cache/
.dmypy.json
dmypy.json
.pyre/
.pytype/
*.sage.py
celerybeat-schedule
celerybeat.pid
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
instance/
.webassets-cache
.scrapy
docs/_build/
.pybuilder/
target/
profile_default/
ipython_config.py
__pypackages__/
celerybeat-schedule
*.sage.py
.spyderproject
.spyproject
.ropeproject
site
.pdm.toml
.pdm-python
.pdm-build/

# macOS
.DS_Store
.AppleDouble
.LSOverride
._*

# Docker
.dockerignore
*.tar
docker-compose.override.yml
docker-compose.*.yml

# IDE
.idea/
*.swp
*.swo
*~
.vscode/
*.sublime-project
*.sublime-workspace
.project
.classpath
.settings/
*.iml
*.ipr
*.iws
.nb-gradle/
.metadata
*.launch
.buildpath

# Claude helper script
.claude-check
Expand Down Expand Up @@ -67,7 +148,6 @@ temp/

# Jupyter
.ipynb_checkpoints/
*.ipynb

# Coverage
htmlcov/
Expand Down
38 changes: 38 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# AGENTS.md - Saorsa Robotics Development Guide

## Build/Lint/Test Commands

**Rust (Workspace):**
- Build: `cargo build --workspace --all-targets`
- Format: `cargo fmt --all`
- Lint: `cargo clippy --all-features -- -D clippy::panic -D clippy::unwrap_used -D clippy::expect_used`
- Test all: `cargo test --workspace`
- Test single: `cargo test --package <crate-name> <test_name>`
- All: `make rust-all`

**Python:**
- Lint: `ruff check .`
- Format: `black .`
- Test: `python -m pytest` (if available)

## Code Style Guidelines

**Rust:**
- **Error Handling:** Use `Result<T, E>` with `?` operator. Never use `unwrap()`, `expect()`, or `panic!()` in production code
- **Imports:** Group std, external crates, then local modules. Use explicit imports
- **Naming:** snake_case for functions/variables, PascalCase for types, SCREAMING_SNAKE_CASE for constants
- **Documentation:** Use `//!` for module docs, `///` for public items
- **Safety:** `unsafe` blocks require justification and extensive review

**Python:**
- **Line Length:** 100 characters (ruff/black)
- **Imports:** Standard library first, then third-party, then local. One import per line
- **Naming:** snake_case for functions/variables, PascalCase for classes, UPPER_CASE for constants
- **Types:** Use type hints for all function parameters and return values
- **Error Handling:** Use specific exceptions, avoid bare `except:`
- **Documentation:** Use docstrings for all public functions/classes

**General:**
- **Commits:** Use conventional commits (feat:, fix:, docs:, etc.)
- **Testing:** Write tests for all new functionality. Aim for >85% coverage
- **Security:** Never log secrets, validate all inputs, use secure dependencies
Loading
Loading