Skip to content
Open
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
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Phenotype org
url: https://github.com/KooshaPari
about: Other Phenotype-ecosystem repos and discussions
7 changes: 5 additions & 2 deletions .github/workflows/alert-sync-issues.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: Alert sync issues
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
schedule:
- cron: '17 * * * *'
workflow_dispatch:

permissions:
contents: read
issues: write

jobs:
sync:
uses: KooshaPari/phenoShared/.github/workflows/alert-sync-issues.yml@main
uses: KooshaPari/phenoShared/.github/workflows/alert-sync-issues.yml@4b820a6d1eca7884e692e4ec4edf2b59732809cd
with:
auto-label: auto-alert-sync
min_severity: high
10 changes: 7 additions & 3 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Auto Merge Gate

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

permissions:
contents: read
pull-requests: write
Expand All @@ -12,12 +15,13 @@ jobs:
if: |
(github.event_name != 'pull_request_review') ||
(github.event.review.state == 'APPROVED')
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Enable auto-merge for labeled PRs
if: |
contains(github.event.pull_request.labels.*.name, 'automerge') &&
!contains(github.event.pull_request.labels.*.name, 'do-not-merge')
uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3with:
uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash
10 changes: 7 additions & 3 deletions .github/workflows/ci-rerun-flaky.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: ci-rerun-flaky

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

permissions:
actions: write
contents: read
Expand All @@ -12,10 +15,11 @@ jobs:
rerun-failed-jobs:
name: rerun-failed-jobs
if: github.event.label.name == 'ci:rerun-flaky'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Rerun failed CI jobs and remove rerun label
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7with:
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const label = 'ci:rerun-flaky';
const { owner, repo } = context.repo;
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


on:
push:
Expand All @@ -11,25 +15,28 @@ permissions:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

strategy:
matrix:
go-version: ['1.21', '1.22']

steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Refresh models catalog
run: |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
name: Refresh models catalog
- run: |
git fetch --depth 1 https://github.com/router-for-me/models.git main
mkdir -p pkg/llmproxy/registry/models
git show FETCH_HEAD:models.json > pkg/llmproxy/registry/models/models.json

- name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5with:
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: ${{ matrix.go-version }}

- name: Cache Go modules
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4with:
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
Expand All @@ -45,10 +52,11 @@ jobs:
run: go test ./... -v -race -coverprofile=coverage.out

- name: Upload coverage
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3with:
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3
with:
files: ./coverage.out


phenotype-validate:
runs-on: ubuntu-latest
uses: KooshaPari/phenotypeActions/.github/workflows/validate-governance.yml@main
runs-on: ubuntu-24.04
uses: KooshaPari/phenotypeActions/.github/workflows/validate-governance.yml@48772d7560c964fff01a209742429f24283e96cf
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reusable workflow job cannot have runs-on

High Severity

The phenotype-validate job specifies both runs-on: ubuntu-24.04 and uses: (a reusable workflow call). GitHub Actions does not allow runs-on on jobs that call reusable workflows — the called workflow defines its own runner. This will cause a workflow validation error, potentially blocking the entire CI workflow.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0864037. Configure here.

18 changes: 12 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: codeql

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

permissions:
actions: read
contents: read
Expand All @@ -12,19 +15,22 @@ jobs:
analyze:
name: Analyze (Go)
if: ${{ !startsWith(github.head_ref, 'ci/fix-migrated-router-20260225060000-feature_ampcode-alias') }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
language: [go]
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4with:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checkout and CodeQL init merged into one step

High Severity

The Checkout step and Initialize CodeQL step have been collapsed into a single YAML mapping with duplicate name: and uses: keys. In YAML, duplicate keys cause the last value to win, so this step only runs github/codeql-action/init (never actions/checkout). The repository is never checked out, so CodeQL analysis will fail.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5f17af3. Configure here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: name: Initialize CodeQL merged into uses line — step properties corrupted, workflow will fail

languages: ${{ matrix.language }}
config-file: .github/codeql/codeql-config.yml
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5with:
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
cache: true
- name: Build
Expand All @@ -33,7 +39,7 @@ jobs:
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4analyze-skip-for-migrated-router-fix:
Comment on lines 24 to 39
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Architect Review — CRITICAL

The CodeQL job now has checkout and init collapsed into a single step with duplicate name/uses keys, and the analyze step is merged with the next job definition, so the intended checkout/init/analyze sequence is not executed and the branch-specific skip job has been collapsed into the same job, breaking the CodeQL analysis flow.

Suggestion: Restore separate steps for checkout, CodeQL init, and analyze, and split the analyze-skip-for-migrated-router-fix job back into its own job block so both the main analysis path and the compatibility-branch skip path are well-formed and executable.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is an **Architect / Logical Review** comment left during a code review. These reviews are first-class, important findings — not optional suggestions. Do NOT dismiss this as a 'big architectural change' just because the title says architect review; most of these can be resolved with a small, localized fix once the intent is understood.

**Path:** .github/workflows/codeql.yml
**Line:** 24:39
**Comment:**
	*CRITICAL: The CodeQL job now has checkout and init collapsed into a single step with duplicate `name`/`uses` keys, and the `analyze` step is merged with the next job definition, so the intended checkout/init/analyze sequence is not executed and the branch-specific skip job has been collapsed into the same job, breaking the CodeQL analysis flow.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative instruction. If no explicit code suggestion is given, you MUST still draft and apply your own minimal, localized fix — do not punt back with 'no suggestion provided, review manually'. Keep the change as small as possible: add a guard clause, gate on a loading state, reorder an await, wrap in a conditional, etc. Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix

name: Analyze (Go)
if: ${{ startsWith(github.head_ref, 'ci/fix-migrated-router-20260225060000-feature_ampcode-alias') }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Skip CodeQL build for migrated router compatibility branch
run: echo "Skipping CodeQL build for migrated router compatibility branch."
12 changes: 8 additions & 4 deletions .github/workflows/coderabbit-rate-limit-retry.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: coderabbit-rate-limit-retry

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

permissions:
checks: write
contents: read
Expand All @@ -12,10 +15,11 @@ permissions:
jobs:
retrigger:
name: retrigger-coderabbit-on-rate-limit
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Re-request CodeRabbit when backlog is high and check is stale
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7with:
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
Expand Down Expand Up @@ -166,7 +170,7 @@ jobs:
status: "completed",
conclusion: pass ? "success" : "failure",
output: {
title: pass ? "CodeRabbit gate passed" : "CodeRabbit gate blocked",
title: "pass ? "CodeRabbit gate passed" : "CodeRabbit gate blocked","
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

JavaScript ternary expression corrupted into string literal

High Severity

The JavaScript ternary expression pass ? "CodeRabbit gate passed" : "CodeRabbit gate blocked" has been incorrectly wrapped in outer double quotes, turning it into the invalid string literal "pass ? "CodeRabbit gate passed" : "CodeRabbit gate blocked",". This will cause a JavaScript syntax error at runtime due to unescaped nested quotes, crashing the publishGate function.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5f17af3. Configure here.

summary,
},
});
Expand Down
44 changes: 29 additions & 15 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: docker-image

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

env:
APP_NAME: CLIProxyAPI
DOCKERHUB_REPO: ${{ secrets.DOCKERHUB_USERNAME }}/cli-proxy-api-plus
Expand All @@ -12,16 +15,19 @@ permissions:

jobs:
docker_amd64:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Refresh models catalog
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Refresh models catalog
run: |
git fetch --depth 1 https://github.com/router-for-me/models.git main
git show FETCH_HEAD:models.json > internal/registry/models/models.json
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3- name: Login to DockerHub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3with:
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Login to DockerHub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate Build Metadata
Expand All @@ -30,7 +36,8 @@ jobs:
echo COMMIT=`git rev-parse --short HEAD` >> $GITHUB_ENV
echo BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` >> $GITHUB_ENV
- name: Build and push (amd64)
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6with:
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
platforms: linux/amd64
push: true
Expand All @@ -46,13 +53,16 @@ jobs:
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Refresh models catalog
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Refresh models catalog
run: |
git fetch --depth 1 https://github.com/router-for-me/models.git main
git show FETCH_HEAD:models.json > internal/registry/models/models.json
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3- name: Login to DockerHub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3with:
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Login to DockerHub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate Build Metadata
Expand All @@ -61,7 +71,8 @@ jobs:
echo COMMIT=`git rev-parse --short HEAD` >> $GITHUB_ENV
echo BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` >> $GITHUB_ENV
- name: Build and push (arm64)
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6with:
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
platforms: linux/arm64
push: true
Expand All @@ -74,15 +85,18 @@ jobs:
${{ env.DOCKERHUB_REPO }}:${{ env.VERSION }}-arm64

docker_manifest:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs:
- docker_amd64
- docker_arm64
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3- name: Login to DockerHub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3with:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Login to DockerHub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate Build Metadata
Expand All @@ -102,7 +116,7 @@ jobs:
"${DOCKERHUB_REPO}:${VERSION}-arm64"
- name: Cleanup temporary tags
continue-on-error: true
env:
- env:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Docker cleanup step split creates invalid workflow step

Medium Severity

The "Cleanup temporary tags" step has been split into a step with only name and continue-on-error: true (no action), and a separate unnamed step with env and run. The first step is invalid (no uses or run), and the cleanup step loses continue-on-error: true — meaning a failed cleanup will now fail the entire workflow.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5f17af3. Configure here.

DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
Expand Down
Loading
Loading