Skip to content

Improve Project Quality and Fix CI Failures#10

Merged
SamyRai merged 2 commits intomainfrom
refactor/dev-commands
Dec 9, 2025
Merged

Improve Project Quality and Fix CI Failures#10
SamyRai merged 2 commits intomainfrom
refactor/dev-commands

Conversation

@google-labs-jules
Copy link
Contributor

@google-labs-jules google-labs-jules bot commented Nov 9, 2025

This change improves the project's quality by adding an .editorconfig file, issue templates, and pre-commit hooks. It also fixes several CI failures and refactors the dev.go file to reduce code duplication.


PR created automatically by Jules for task 7118184923619042982


Note

Extracts a shared binary build helper used by dev build/install/release; adds .editorconfig, pre-commit hooks, streamlined issue templates; updates golangci-lint config and tweaks docs.

  • CLI (dev tools):
    • Extracts buildBinaries helper in internal/cli/commands/dev.go and uses it across build, install, and release commands to remove duplicate build loops.
    • Simplifies build summary/outputs and centralizes version/flags handling for both juleson and juleson-mcp.
  • Tooling/CI:
    • Adds .editorconfig for consistent formatting.
    • Adds .pre-commit-config.yaml with YAML, whitespace, golangci-lint, and markdownlint hooks.
    • Updates .github/ISSUE_TEMPLATE/* to simpler templates with triage labels.
    • Refactors .golangci.yml settings under linters-settings, adds gosec SARIF output, and fixes output.formats structure; maintains test and exclusion rules.
  • Docs:
    • Minor formatting fixes in README.md and CONTRIBUTING.md (code block language hints, layout).

Written by Cursor Bugbot for commit ab3806f. This will update automatically on new commits. Configure here.

This commit introduces several improvements to the project's quality and fixes a number of CI failures.

**Improvements:**

- **`.editorconfig`:** A new `.editorconfig` file has been added to ensure consistent editor settings across different environments.
- **Issue Templates:** GitHub issue templates for bug reports and feature requests have been added to streamline the contribution process.
- **Pre-commit Hooks:** A new `.pre-commit-config.yaml` file has been added to automate code quality checks before commits.
- **Refactoring:** The `dev.go` file has been refactored to reduce code duplication in the build commands.

**Fixes:**

- **`.golangci.yml`:** The configuration file has been corrected to be compatible with the linter version used in the CI environment.
- **Markdown:** Fenced code blocks in Markdown files have been updated with the correct language specifiers.
- **`gosec`:** The `gosec` configuration has been updated to generate valid SARIF reports.
- **Dependencies:** The `internal/build` package has been restored to resolve build and test failures.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@SamyRai SamyRai marked this pull request as ready for review December 9, 2025 10:52
@SamyRai SamyRai self-requested a review as a code owner December 9, 2025 10:52
@SamyRai SamyRai enabled auto-merge (squash) December 9, 2025 10:52
@SamyRai SamyRai merged commit 4242d74 into main Dec 9, 2025
4 checks passed
@SamyRai SamyRai deleted the refactor/dev-commands branch December 9, 2025 10:53
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

}
results, err := buildBinaries(ctx, version, goos, goarch, race)
if err != nil {
return err
Copy link

Choose a reason for hiding this comment

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

Bug: Build command flags --cli, --mcp, --all are never used

The refactoring to use buildBinaries() removed the logic that respected the --cli, --mcp, and --all flags. The old implementation used these flags to determine which binaries to build, but now buildBinaries() always builds both binaries regardless of which flags are passed. Users who expect --cli to build only the CLI binary will get both binaries built instead.

Additional Locations (1)

Fix in Cursor Fix in Web

if err != nil {
failCount += len(results)
continue
}
Copy link

Choose a reason for hiding this comment

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

Bug: Release builds lose platform-specific output directories

The refactored newReleaseCommand no longer sets custom OutputDir for each platform build. The old code set config.OutputDir = fmt.Sprintf("dist/%s-%s-%s", binary.name, platform.goos, platform.goarch) to create distinct directories for each platform/binary combination. Since buildBinaries() doesn't set this, all platforms will build to the default directory, causing each subsequent platform build to overwrite the previous one.

Additional Locations (1)

Fix in Cursor Fix in Web

return fmt.Errorf("failed to build MCP: %w", err)
_, err := buildBinaries(ctx, "dev", runtime.GOOS, runtime.GOARCH, false)
if err != nil {
return err
Copy link

Choose a reason for hiding this comment

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

Bug: Install command proceeds even when builds fail

The newInstallCommand discards the build results (assigned to _) and buildBinaries always returns nil for the error. The old code explicitly checked each Build() call and returned early on failure. Now the install step proceeds regardless of whether builds succeeded, potentially attempting to install non-existent or stale binaries.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

1 participant