Skip to content

Hotfix | version bump & pre-commit -> lefthook#58

Merged
yuval-qf merged 3 commits intomainfrom
hotfix/version-bump-and-lefthook
Oct 9, 2025
Merged

Hotfix | version bump & pre-commit -> lefthook#58
yuval-qf merged 3 commits intomainfrom
hotfix/version-bump-and-lefthook

Conversation

@yuval-qf
Copy link
Collaborator

@yuval-qf yuval-qf commented Oct 9, 2025

No description provided.

@yuval-qf yuval-qf requested a review from drorIvry October 9, 2025 14:15
@yuval-qf yuval-qf self-assigned this Oct 9, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected scroll info display in provider selection.
    • Ensured API key is not used when Qualifire is disabled.
  • Refactor

    • Simplified internal flag checks and streamlined dialog content.
  • Chores

    • Replaced pre-commit with Lefthook for faster, parallel pre-commit checks across Python and Go (formatting, linting, type and security scans, import management, lock verification).
  • Release

    • Version updated to 0.1.10.

Walkthrough

Removes .pre-commit-config.yaml and adds lefthook.yaml for hooks; fixes an int/float cast in TUI provider scroll index; simplifies QualifireEnabled boolean checks and dialog text; bumps app and package versions to 0.1.10.

Changes

Cohort / File(s) Summary
Dev hooks migration
\.pre-commit-config.yaml
Removed pre-commit configuration that defined YAML/EOF/Black/Flake8/Mypy/Bandit/Gitleaks hooks.
Dev hooks migration
lefthook.yaml
Added Lefthook configuration: parallel staged-file hooks for gitleaks, EOF fixer, YAML validation, Python (add-trailing-comma, isort, black, flake8, mypy, bandit, uv lock check) and Go (gofmt, goimports, go vet).
Go TUI rendering fix
packages/tui/internal/components/llm_config_dialog.go
Cast math.Min result to int for the scroll start index to resolve a type mismatch in renderProviderSelection.
Go app logic and version
packages/tui/internal/tui/app.go
Replaced explicit == false checks with ! negation for QualifireEnabled, simplified server health dialog string usage, and updated displayed app version to v0.1.10.
Python version bump
pyproject.toml, rogue/__init__.py
Bumped project and package version from 0.1.9 to 0.1.10 only.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant T as TUI App
  participant Q as Qualifire Service

  rect rgba(230,245,255,0.6)
    note over T: Summary / Report flow (high level)
    U->>T: Trigger summary/report
    alt QualifireEnabled
      T->>Q: Send request (includes API key)
      Q-->>T: Response
      T-->>U: Display result
    else Qualifire disabled
      note over T: Skip remote call and API key
      T-->>U: Local/alternate result
    end
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A rabbit taps the hooks in time,
From pre-commit to Lefthook’s chime.
Go’s scroll now counts with integers neat,
Flags flip true/false with lighter feet.
Version hops to one-dot-ten—hip, hooray! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning There is no description provided for this pull request, so it does not describe any of the changes or objectives, making it completely off-topic for review. Please add a concise description summarizing the version bump, the removal of the pre-commit configuration, and the introduction of the Lefthook setup to clarify the purpose and scope of this pull request.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly captures the two primary changes in this pull request—bumping the project version and migrating from a pre-commit configuration to Lefthook—using clear and relevant terminology without extraneous detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1e3bd0 and ceeb1ed.

📒 Files selected for processing (1)
  • lefthook.yaml (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a00982a and c1e3bd0.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • .pre-commit-config.yaml (0 hunks)
  • lefthook.yaml (1 hunks)
  • packages/tui/internal/components/llm_config_dialog.go (1 hunks)
  • packages/tui/internal/tui/app.go (4 hunks)
  • pyproject.toml (1 hunks)
  • rogue/__init__.py (1 hunks)
💤 Files with no reviewable changes (1)
  • .pre-commit-config.yaml
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format Python code with Black
Ensure code passes flake8 linting
Run mypy with the repository configuration for static typing
Run Bandit security checks using .bandit.yaml configuration
Use isort import conventions for import ordering
Add type hints to all function signatures
Follow PEP 8 naming (snake_case for variables/functions, PascalCase for classes)
Use try/except around code that may raise exceptions

Files:

  • rogue/__init__.py
pyproject.toml

📄 CodeRabbit inference engine (AGENTS.md)

Manage dependencies with uv and declare them in pyproject.toml

Files:

  • pyproject.toml
🧬 Code graph analysis (1)
packages/tui/internal/tui/app.go (1)
packages/tui/internal/components/dialog.go (1)
  • NewInfoDialog (65-78)
⏰ 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). (2)
  • GitHub Check: codestyle
  • GitHub Check: rogue_sanity
🔇 Additional comments (8)
pyproject.toml (1)

3-3: LGTM!

Version bump to 0.1.10 is consistent with the PR objective and aligns with version updates in other files.

rogue/__init__.py (1)

47-47: LGTM!

Version bump to "0.1.10" is consistent with the version update in pyproject.toml and the PR objective.

packages/tui/internal/components/llm_config_dialog.go (1)

671-671: LGTM!

Correct fix for type compatibility. math.Min returns float64, so converting to int is necessary for the %d format specifier in the fmt.Sprintf call.

packages/tui/internal/tui/app.go (4)

279-279: LGTM!

Version bump to "v0.1.10" is consistent with the version updates in pyproject.toml and rogue/init.py.


90-90: LGTM!

Cleaner boolean check using negation instead of explicit equality comparison.


387-387: LGTM!

Simplified string formatting by removing unnecessary fmt.Sprintf. Since msg.Status is already a string, passing it directly to NewInfoDialog is more idiomatic.


593-593: LGTM!

Cleaner boolean check using negation instead of explicit equality comparison, consistent with the change at Line 90.

lefthook.yaml (1)

1-63: Verify hook ordering and dependencies.

The hooks run in parallel, but some may have dependencies on others. For example:

  • add-trailing-comma may modify files that black then needs to format
  • gofmt and goimports may conflict if run simultaneously on the same files

Consider whether parallel execution is appropriate for all hooks or if some should run sequentially.

@yuval-qf yuval-qf merged commit 8186f08 into main Oct 9, 2025
7 of 8 checks passed
@yuval-qf yuval-qf deleted the hotfix/version-bump-and-lefthook branch October 9, 2025 14:28
@drorIvry drorIvry mentioned this pull request Oct 28, 2025
21 tasks
@drorIvry drorIvry mentioned this pull request Nov 10, 2025
21 tasks
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