Skip to content

feat: add gemini server support OD-118#14

Merged
manufacturist merged 1 commit into
mainfrom
feat/od-118
Jun 25, 2026
Merged

feat: add gemini server support OD-118#14
manufacturist merged 1 commit into
mainfrom
feat/od-118

Conversation

@manufacturist

Copy link
Copy Markdown
Contributor

PoW:


  {                                                                                                                                                                                                                   
    "summary": {                                                                                                                                                                                                      
      "languageCount": 3,                                                                                                                                                                                             
      "fileCount": 120,                                                                                                                                                                                               
      "enabledPatterns": {                                                                                                                                                                                            
        "before": 2802,                                                                                                                                                                                               
        "after": 2820                                                                                                                                                                                                 
      },                                                                                                                                                                                                              
      "enabledTools": {                                                                                                                                                                                               
        "before": 9,                                                                                                                                                                                                  
        "after": 9                                                                                                                                                                                                    
      },                                                                                                                                                                                                              
      "issues": {                                                                                                                                                                                                     
        "before": 90,                                                                                                                                                                                                 
        "after": 88                                                                                                                                                                                                   
      },                                                                                                                                                                                                              
      "issuesByCategory": {                                                                                                                                                                                           
        "Security": {                                                                                                                                                                                                 
          "before": 78,                                                                                                                                                                                               
          "after": 78                                                                                                                                                                                                 
        },                                                                                                                                                                                                            
        "ErrorProne": {                                                                                                                                                                                               
          "before": 6,                                                                                                                                                                                                
          "after": 6                                                                                                                                                                                                  
        },                                                                                                                                                                                                            
        "Complexity": {                                                                                                                                                                                               
          "before": 6,                                                                                                                                                                                                
          "after": 4                                                                                                                                                                                                  
        }                                                                                                                                                                                                             
      },                                                                                                                                                                                                              
      "issuesBySeverity": {                                                                                                                                                                                           
        "Critical": {                                                                                                                                                                                                 
          "before": 18,                                                                                                                                                                                               
          "after": 16                                                                                                                                                                                                 
        },                                                                                                                                                                                                            
        "High": {                                                                                                                                                                                                     
          "before": 48,                                                                                                                                                                                               
          "after": 48                                                                                                                                                                                                 
        },                                                                                                                                                                                                            
        "Medium": {                                                                                                                                                                                                   
          "before": 22,                                                                                                                                                                                               
          "after": 22                                                                                                                                                                                                 
        },                                                                                                                                                                                                            
        "Minor": {                                                                                                                                                                                                    
          "before": 2,                                                                                                                                                                                                
          "after": 2                                                                                                                                                                                                  
        }                                                                                                                                                                                                             
      }                                                                                                                                                                                                               
    },                                                                                                                                                                                                                
    "toolChanges": [],                                                                                                                                                                                                
    "patternChanges": [                                                                                                                                                                                               
      {                                                                                                                                                                                                               
        "patternId": "Lizard_ccn-critical",                                                                                                                                                                           
        "toolName": "Lizard",                                                                                                                                                                                         
        "action": "updated",                                                                                                                                                                                          
        "reason": "Raised cyclomatic complexity threshold from 25 to 30 to reduce noise on borderline complex functions while keeping genuinely complex code flagged",                                                
        "deltaIssues": -2,                                                                                                                                                                                            
        "parameters": [                                                                                                                                                                                               
          {                                                                                                                                                                                                           
            "id": "threshold",                                                                                                                                                                                        
            "before": "25",                                                                                                                                                                                           
            "after": "30"                                                                                                                                                                                             
          }                                                                                                                                                                                                           
        ]                                                                                                                                                                                                             
      }                                                                                                                                                                                                               
    ],                                                                                                                                                                                                                
    "recommendedPathsToIgnore": [],                                                                                                                                                                                   
    "keyImprovements": [                                                                                                                                                                                              
      "Refreshed configuration with high-signal Security and ErrorProne patterns tailored to Go and web frameworks",                                                                                                  
      "Tuned complexity thresholds to match the framework's architecture, reducing noise by 33% in the Complexity category",                                                                                          
      "Evaluated and suppressed new XSS 'direct write' patterns that were noisy in the context of implementing a web framework's renderers",                                                                          
      "Maintained 100% of the baseline security coverage while optimizing for signal"                                                                                                                                 
    ],                                                                                                                                                                                                                
    "conflicts": [                                                                                                                                                                                                    
      {                                                                                                                                                                                                               
        "patternId": "Trivy_vulnerability_high",                                                                                                                                                                      
        "toolName": "Trivy",                                                                                                                                                                                          
        "conflict": "EnforcedByCodingStandard",                                                                                                                                                                       
        "codingStandardName": "Default",                                                                                                                                                                              
        "reason": "Vulnerability findings are enforced by the 'Default' and 'Security' coding standards and cannot be disabled at the repository level."                                                              
      },                                                                                                                                                                                                              
      {                                                                                                                                                                                                               
        "patternId": "Semgrep_problem-based-packs.insecure-transport.go-stdlib.http-customized-request.http-customized-request",                                                                                      
        "toolName": "Opengrep",                                                                                                                                                                                       
        "conflict": "EnforcedByCodingStandard",                                                                                                                                                                       
        "codingStandardName": "Default",                                                                                                                                                                              
        "reason": "Pattern enforced by coding standards. Reports HTTP requests that should use HTTPS, which is valid but sometimes unavoidable in framework tests or specific configurations."                        
      }                                                                                                                                                                                                               
    ],                                                                                                                                                                                                                
    "run": {                                                                                                                                                                                                          
      "llm": "gemini",                                                                                                                                                                                                
      "model": "gemini-3-flash-preview",                                                                                                                                                                              
      "startedAt": "2026-06-25T12:38:06Z",                                                                                                                                                                            
      "finishedAt": "2026-06-25T12:43:25Z",                                                                                                                                                                           
      "tokensIn": 1431228,                                                                                                                                                                                            
      "tokensOut": 6551,                                                                                                                                                                                              
      "durationMs": 317338,                                                                                                                                                                                           
      "costUsd": 0.735267,                                                                                                                                                                                            
      "sessionId": "58989c54-7ea2-401a-9b39-64b25d3bed5c"                                                                                                                                                             
    }                                                                                                                                                                                                                 
  }                                                                                                                                                                                                                   

Copilot AI review requested due to automatic review settings June 25, 2026 13:00

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds ripgrep to the Dockerfile, removes the Gemini extension installation from the entrypoint script, and updates the local pipeline script to execute Gemini with streaming JSON output, parsing the results and calculating run metadata using jq. A review comment points out a potential issue in the jq parsing logic where a missing result event could cause a null-indexing error, and suggests using the pipe operator for safe navigation.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docker/local-pipeline.sh
Comment on lines +81 to +84
tokensIn: ($result.stats.input_tokens // 0),
tokensOut: ($result.stats.output_tokens // 0),
durationMs: ($result.stats.duration_ms // 0),
costUsd: ((($result.stats.input_tokens // 0) * 0.50 + ($result.stats.output_tokens // 0) * 3.00) / 1000000),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

If the Gemini run fails or does not emit a result event, $result will be null. In jq, attempting to index a variable that is null directly (e.g., $result.stats) throws a Cannot index null with string "stats" error, which will cause this jq command to fail and print an error to stderr.

To prevent this, use the pipe operator to safely navigate the potentially null $result object (e.g., ($result | .stats.input_tokens // 0)).

Suggested change
tokensIn: ($result.stats.input_tokens // 0),
tokensOut: ($result.stats.output_tokens // 0),
durationMs: ($result.stats.duration_ms // 0),
costUsd: ((($result.stats.input_tokens // 0) * 0.50 + ($result.stats.output_tokens // 0) * 3.00) / 1000000),
tokensIn: ($result | .stats.input_tokens // 0),
tokensOut: ($result | .stats.output_tokens // 0),
durationMs: ($result | .stats.duration_ms // 0),
costUsd: (((($result | .stats.input_tokens // 0) * 0.50 + ($result | .stats.output_tokens // 0) * 3.00)) / 1000000),

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds support for running the configure-codacy-cloud skill using the Gemini CLI in the local Docker pipeline, aligning the container tooling with Gemini CLI expectations.

Changes:

  • Update docker/local-pipeline.sh to run configure-codacy-cloud via Gemini using the skill’s SKILL.md, capturing streamed output and run metadata.
  • Remove Gemini extension installation from the container entrypoint.
  • Install ripgrep in the Docker image to support Gemini CLI’s preferred search backend.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
docker/local-pipeline.sh Switches local pipeline Gemini execution to SKILL.md-driven invocation with stream capture + run metadata extraction.
docker/entrypoint.sh Removes Gemini extension installation at startup.
docker/Dockerfile Adds ripgrep package for Gemini CLI performance/compatibility.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker/local-pipeline.sh
Comment on lines +61 to +67
gemini -y --skip-trust -m "${GEMINI_MODEL:-gemini-3-flash-preview}" -o stream-json \
-p "Execute the skill instructions provided above." < "${SKILL_MD}" \
| tee "${GEMINI_STREAM_FILE}" \
| jq --unbuffered -rj 'select(.type == "message" and .role == "assistant") | .content'
SKILL_EXIT=${PIPESTATUS[0]}
RUN_FINISHED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ)
echo
Comment thread docker/local-pipeline.sh
Comment on lines +58 to +60
GEMINI_STREAM_FILE=$(mktemp)
RUN_STARTED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ)

@manufacturist manufacturist merged commit eca33c8 into main Jun 25, 2026
3 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.

3 participants