Skip to content

Add ./roe-cli format, lint CI gate, and format codebase#55

Merged
jadenfix merged 2 commits into
mainfrom
jaden/roe-cli-format-ci
Jun 16, 2026
Merged

Add ./roe-cli format, lint CI gate, and format codebase#55
jadenfix merged 2 commits into
mainfrom
jaden/roe-cli-format-ci

Conversation

@jadenfix

Copy link
Copy Markdown
Contributor

Summary

  • Add ./roe-cli with a format command (ruff format + ruff check --fix), mirroring roe-main's ./roe-cli format
  • Add a dedicated lint CI job (ruff check + ruff format --check) that runs on every PR and on pushes to main
  • Make scripts/generate-sdk ruff-format generated wrappers (src/roe/api) so running the formatter never introduces codegen drift (ruff added to the codegen dependency group)
  • Document ./roe-cli format in the README (Development section)
  • Format the codebase with ruff format (9 files)

Test plan

  • ./roe-cli format then ruff format --check . and ruff check . → clean
  • uv run pytest → 39 passed
  • bash scripts/generate-sdk then drift diff on the CI-checked paths → clean

🤖 Generated with Claude Code

- Add ./roe-cli with a format command (ruff format + ruff check --fix)
- Add a dedicated lint CI job (ruff check + ruff format --check) that runs
  on every PR and on pushes to main
- Make scripts/generate-sdk ruff-format generated wrappers so formatting
  never introduces codegen drift (ruff added to the codegen group)
- Document ./roe-cli format in the README
- Format the codebase with ruff format

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown

Greptile Summary

This PR introduces a ./roe-cli format developer script, a dedicated CI lint job (ruff check + ruff format --check), and formats the existing codebase with ruff. It also extends scripts/generate-sdk to run ruff format on the generated wrappers so codegen never introduces formatting drift.

  • CI: The old single-step ruff check lint is replaced by two explicit steps (--output-format=github and --check --diff) in a new lint job; the test job is left independent (no needs: gate), so both run in parallel on every PR.
  • Tooling: roe-cli is a new bash script with a format command that runs ruff check --fix then ruff format; ruff is added to the codegen dependency group so generate-sdk can invoke it.
  • Code changes: All source and example file changes are pure ruff-formatting reformats with no logic modifications.

Confidence Score: 5/5

Safe to merge — all source changes are pure reformats with no logic modifications, and the new tooling is additive.

Every change to src/ and examples/ is a line-wrapping reformat only. The new roe-cli, CI lint job, and codegen formatting step are straightforward additions that don't touch runtime behaviour. The one UX quirk in roe-cli (format step skipped when unfixable lint errors exist) doesn't affect correctness or CI.

No files require special attention; the only non-trivial new file is roe-cli.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Splits the original single job into separate lint and test jobs; both are independent (no needs: relationship), which is fine. Lint now uses --output-format=github and --diff for better PR annotations.
roe-cli New bash CLI script; correctly orders ruff check --fix before ruff format, but set -e causes the format step to be skipped entirely when there are unfixable lint violations.
scripts/generate-sdk Adds ruff format on src/roe/api after wrapper generation to prevent codegen drift when the formatter is run.
pyproject.toml Adds ruff to the codegen dependency group so generate-sdk can invoke it; ruff was already present in the dev group.
scripts/generate_wrappers.py Pure ruff formatting reformats (line-wrapping only), no logic changes.
src/roe/config.py Pure formatting change to batch_chunk_delay assignment; logic is identical.
src/roe/exceptions.py Pure formatting change to translate_response raise statement; no logic change.
src/roe/models/job.py Pure formatting changes to ternary and list comprehension; no logic change.
src/roe/utils/transport.py Pure formatting change to conditional; no logic change.
src/roe/api/agents.py Pure formatting change to AgentRunAsyncManyRequest instantiation; no logic change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    PR[Pull Request / Push to main] --> LINT[lint job\nuv sync --group dev]
    PR --> TEST[test job\nuv sync --group dev]
    PR --> CODEGEN[check-codegen-drift job\nuv sync --group codegen]

    LINT --> RC[ruff check --output-format=github .]
    LINT --> RF[ruff format --check --diff .]

    TEST --> PT[uv run pytest]

    CODEGEN --> GS[bash scripts/generate-sdk]
    GS --> GEN[openapi-python-client generate]
    GEN --> WP[python scripts/generate_wrappers.py]
    WP --> FMT[ruff format src/roe/api]
    CODEGEN --> DIFF[git diff --exit-code\nREADME.md openapi/ src/roe/_generated src/roe/api]

    DEV[Developer: ./roe-cli format] --> FIX[ruff check --fix .]
    FIX --> FORMAT[ruff format .]
Loading

Reviews (2): Last reviewed commit: "Run Ruff fixes before formatting" | Re-trigger Greptile

Comment thread roe-cli Outdated
@jadenfix

Copy link
Copy Markdown
Contributor Author

@greptileai

@jadenfix jadenfix merged commit 095b4a7 into main Jun 16, 2026
4 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