Skip to content

ci: fix workflow required-check names for feat/sdk-openapi-cherry-pick#509

Closed
KooshaPari wants to merge 2 commits intofeat/sdk-openapi-cherry-pickfrom
ci/fix-feat-sdk-openapi-cherry-pick
Closed

ci: fix workflow required-check names for feat/sdk-openapi-cherry-pick#509
KooshaPari wants to merge 2 commits intofeat/sdk-openapi-cherry-pickfrom
ci/fix-feat-sdk-openapi-cherry-pick

Conversation

@KooshaPari
Copy link
Copy Markdown
Owner

@KooshaPari KooshaPari commented Feb 26, 2026

Layered CI fix PR for feat/sdk-openapi-cherry-pick.

Summary by CodeRabbit

  • Chores

    • Added automated pull request merging workflow for labeled pull requests upon approval.
  • Refactor

    • Consolidated SDK configuration type definitions across modules for improved consistency.

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 26, 2026

Warning

Rate limit exceeded

@KooshaPari has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 36 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 45bb73d and 986a4d4.

📒 Files selected for processing (7)
  • .github/required-checks.txt
  • .github/workflows/auto-merge.yml
  • .github/workflows/pr-path-guard.yml
  • .github/workflows/pr-test-build.yml
  • pkg/llmproxy/access/reconcile.go
  • pkg/llmproxy/api/handlers/management/config_basic.go
  • pkg/llmproxy/config/sdk_types.go
📝 Walkthrough

Walkthrough

Introduces a GitHub Actions workflow for automated PR merging and refactors SDK configuration type handling by consolidating internal config definitions into type aliases that reference external SDK packages.

Changes

Cohort / File(s) Summary
GitHub Actions Auto-Merge Workflow
.github/workflows/auto-merge.yml
New workflow triggered on PR events (opened, reopened, ready for review, synchronize, labeled, review submitted) that automatically enables squash-merge for PRs with automerge label, excluding those with do-not-merge label.
SDK Configuration Type Consolidation
pkg/llmproxy/config/sdk_types.go
Converts SDKConfig and StreamingConfig from concrete structs to type aliases of external sdkconfig package types, removes local field definitions, and adds import for github.com/router-for-me/CLIProxyAPI/v6/sdk/config.
Configuration Access Registration
pkg/llmproxy/access/reconcile.go
Updates config registration to use aliased sdkconfig.SDKConfig type instead of internal config.SDKConfig, including streaming field conversion in the registration process.
Proxy Handler Config Reference
pkg/llmproxy/api/handlers/management/config_basic.go
Updates proxy configuration in GetLatestVersion handler to use config.SDKConfig (now an alias) instead of direct SDK config reference, maintaining ProxyURL field assignment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through config trees,
Where types now dance in harmony,
External aliases pave the way,
Auto-merge gates guard the day,
Squashed commits, labeled with care! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions a CI workflow fix for a feature branch, but the actual changes include significant type alias refactoring across multiple Go source files that have nothing to do with CI workflow names. Update the title to accurately reflect the main changes: type alias refactoring for SDK config types and auto-merge workflow addition, rather than just workflow check names.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/fix-feat-sdk-openapi-cherry-pick

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/auto-merge.yml:
- Line 30: Replace the mutable tag "uses:
peter-evans/enable-pull-request-automerge@v3" with the action pinned to a full
commit SHA; locate the latest stable commit SHA in the
peter-evans/enable-pull-request-automerge repository and update the uses line to
"uses: peter-evans/enable-pull-request-automerge@<full-sha>" so the workflow
(the line currently showing uses: peter-evans/enable-pull-request-automerge@v3)
no longer references a mutable tag.

In `@pkg/llmproxy/access/reconcile.go`:
- Around line 89-98: The code manually copies fields into a new sdkCfg instead
of using the existing struct alias; replace the field-by-field mapping with a
direct assignment from newCfg.SDKConfig to sdkCfg (e.g., make a local copy:
sdkCfg := newCfg.SDKConfig) and pass its address to configaccess.Register, and
remove the unnecessary sdkconfig.StreamingConfig(...) conversion so the
Streaming field is preserved via the direct assignment; keep references to the
identifiers sdkCfg, sdkconfig.SDKConfig, newCfg.SDKConfig, and
configaccess.Register.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45bb73d and 724c581.

📒 Files selected for processing (4)
  • .github/workflows/auto-merge.yml
  • pkg/llmproxy/access/reconcile.go
  • pkg/llmproxy/api/handlers/management/config_basic.go
  • pkg/llmproxy/config/sdk_types.go
📜 Review details
⏰ 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). (1)
  • GitHub Check: Analyze (Go) (go)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*.go: NEVER create a v2 file - refactor the original instead
NEVER create a new class if an existing one can be made generic
NEVER create custom implementations when an OSS library exists - search pkg.go.dev for existing libraries before writing code
Build generic building blocks (provider interface + registry) before application logic
Use chi for HTTP routing (NOT custom routers)
Use zerolog for logging (NOT fmt.Print)
Use viper for configuration (NOT manual env parsing)
Use go-playground/validator for validation (NOT manual if/else validation)
Use golang.org/x/time/rate for rate limiting (NOT custom limiters)
Use template strings for messages instead of hardcoded messages and config-driven logic instead of code-driven
Zero new lint suppressions without inline justification
All new code must pass: go fmt, go vet, golint
Maximum function length: 40 lines
No placeholder TODOs in committed code

Files:

  • pkg/llmproxy/api/handlers/management/config_basic.go
  • pkg/llmproxy/config/sdk_types.go
  • pkg/llmproxy/access/reconcile.go
🧠 Learnings (1)
📚 Learning: 2026-02-25T10:11:41.448Z
Learnt from: CR
Repo: KooshaPari/cliproxyapi-plusplus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-25T10:11:41.448Z
Learning: Applies to **/*.go : Build generic building blocks (provider interface + registry) before application logic

Applied to files:

  • pkg/llmproxy/api/handlers/management/config_basic.go
🧬 Code graph analysis (2)
pkg/llmproxy/api/handlers/management/config_basic.go (1)
pkg/llmproxy/config/sdk_types.go (1)
  • SDKConfig (7-7)
pkg/llmproxy/access/reconcile.go (1)
pkg/llmproxy/config/sdk_types.go (2)
  • SDKConfig (7-7)
  • StreamingConfig (8-8)
🔇 Additional comments (2)
pkg/llmproxy/config/sdk_types.go (1)

6-8: Good alias consolidation.

This keeps config types aligned with SDK definitions and avoids local type drift.

pkg/llmproxy/api/handlers/management/config_basic.go (1)

47-48: Type alignment here looks correct.

Using config.SDKConfig at this call site is consistent with the new alias-based SDK config unification.

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@v3
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Check if the file exists and examine its contents
if [ -f ".github/workflows/auto-merge.yml" ]; then
  echo "=== File exists, showing content ===";
  wc -l ".github/workflows/auto-merge.yml";
  cat -n ".github/workflows/auto-merge.yml";
else
  echo "File not found";
fi

Repository: KooshaPari/cliproxyapi-plusplus

Length of output: 1186


🏁 Script executed:

# Run the verification script from the review comment
rg -nP '^\s*uses:\s*[^@]+@(?![0-9a-f]{40}\b)[^\s]+' .github/workflows

Repository: KooshaPari/cliproxyapi-plusplus

Length of output: 2427


Pin the GitHub Action to an immutable commit SHA.

Line 30 uses a mutable tag (@v3) in a pull_request_target workflow with write permissions (pull-requests: write). Pin to a full commit SHA to reduce supply-chain risk.

Suggested change
-        uses: peter-evans/enable-pull-request-automerge@v3
+        uses: peter-evans/enable-pull-request-automerge@<full-length-commit-sha> # v3
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/auto-merge.yml at line 30, Replace the mutable tag "uses:
peter-evans/enable-pull-request-automerge@v3" with the action pinned to a full
commit SHA; locate the latest stable commit SHA in the
peter-evans/enable-pull-request-automerge repository and update the uses line to
"uses: peter-evans/enable-pull-request-automerge@<full-sha>" so the workflow
(the line currently showing uses: peter-evans/enable-pull-request-automerge@v3)
no longer references a mutable tag.

Comment on lines +89 to +98
sdkCfg := sdkconfig.SDKConfig{
ProxyURL: newCfg.SDKConfig.ProxyURL,
ForceModelPrefix: newCfg.SDKConfig.ForceModelPrefix,
RequestLog: newCfg.SDKConfig.RequestLog,
APIKeys: newCfg.SDKConfig.APIKeys,
PassthroughHeaders: newCfg.SDKConfig.PassthroughHeaders,
Streaming: sdkconfig.StreamingConfig(newCfg.SDKConfig.Streaming),
NonStreamKeepAliveInterval: newCfg.SDKConfig.NonStreamKeepAliveInterval,
}
configaccess.Register(&sdkCfg)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check SDKConfig alias definition in config package
echo "=== Searching for SDKConfig alias in pkg/llmproxy/config ==="
fd 'sdk_types.go' --type f | xargs -I {} sh -c 'echo "File: {}"; cat -n "{}"'

echo ""
echo "=== Searching for SDKConfig struct in sdkconfig package ==="
fd '*.go' -path '*/sdkconfig/*' --type f | head -20

echo ""
echo "=== Searching for SDKConfig struct definition ==="
rg -n 'type\s+SDKConfig\s+struct' --type go -A 50

Repository: KooshaPari/cliproxyapi-plusplus

Length of output: 4120


🏁 Script executed:

#!/bin/bash
# Check the specific lines in reconcile.go and surrounding context
echo "=== Checking reconcile.go lines 80-105 ==="
sed -n '80,105p' pkg/llmproxy/access/reconcile.go | cat -n -v

Repository: KooshaPari/cliproxyapi-plusplus

Length of output: 1538


🏁 Script executed:

#!/bin/bash
# Search for the types in imports to understand the relationship
echo "=== Check imports in reconcile.go ==="
head -30 pkg/llmproxy/access/reconcile.go | cat -n

echo ""
echo "=== Search for config.SDKConfig type definition ==="
rg -n 'SDKConfig' pkg/llmproxy/config/ --type go | head -20

Repository: KooshaPari/cliproxyapi-plusplus

Length of output: 1660


Use direct assignment instead of manual field-by-field copying.

Since config.SDKConfig is an alias for sdkconfig.SDKConfig, manually mapping fields in lines 89-97 is error-prone when the struct evolves. The type conversion on line 95 (sdkconfig.StreamingConfig(newCfg.SDKConfig.Streaming)) is unnecessary and suggests type uncertainty. Replace with direct assignment:

Suggested change
-	sdkCfg := sdkconfig.SDKConfig{
-		ProxyURL:                   newCfg.SDKConfig.ProxyURL,
-		ForceModelPrefix:           newCfg.SDKConfig.ForceModelPrefix,
-		RequestLog:                 newCfg.SDKConfig.RequestLog,
-		APIKeys:                    newCfg.SDKConfig.APIKeys,
-		PassthroughHeaders:         newCfg.SDKConfig.PassthroughHeaders,
-		Streaming:                  sdkconfig.StreamingConfig(newCfg.SDKConfig.Streaming),
-		NonStreamKeepAliveInterval: newCfg.SDKConfig.NonStreamKeepAliveInterval,
-	}
+	sdkCfg := newCfg.SDKConfig
 	configaccess.Register(&sdkCfg)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
sdkCfg := sdkconfig.SDKConfig{
ProxyURL: newCfg.SDKConfig.ProxyURL,
ForceModelPrefix: newCfg.SDKConfig.ForceModelPrefix,
RequestLog: newCfg.SDKConfig.RequestLog,
APIKeys: newCfg.SDKConfig.APIKeys,
PassthroughHeaders: newCfg.SDKConfig.PassthroughHeaders,
Streaming: sdkconfig.StreamingConfig(newCfg.SDKConfig.Streaming),
NonStreamKeepAliveInterval: newCfg.SDKConfig.NonStreamKeepAliveInterval,
}
configaccess.Register(&sdkCfg)
sdkCfg := newCfg.SDKConfig
configaccess.Register(&sdkCfg)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/llmproxy/access/reconcile.go` around lines 89 - 98, The code manually
copies fields into a new sdkCfg instead of using the existing struct alias;
replace the field-by-field mapping with a direct assignment from
newCfg.SDKConfig to sdkCfg (e.g., make a local copy: sdkCfg := newCfg.SDKConfig)
and pass its address to configaccess.Register, and remove the unnecessary
sdkconfig.StreamingConfig(...) conversion so the Streaming field is preserved
via the direct assignment; keep references to the identifiers sdkCfg,
sdkconfig.SDKConfig, newCfg.SDKConfig, and configaccess.Register.

@KooshaPari
Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 26, 2026

✅ Actions performed

Full review triggered.

@KooshaPari KooshaPari added HELIOS-CODEX Bundle identifier for HELIOS-CODEX release train HELIOS-CODEX-L0 HELIOS-CODEX foundation layer pkg:he:core-sdk-openapi HELIOS-CODEX SDK OpenAPI package labels Feb 26, 2026
@KooshaPari
Copy link
Copy Markdown
Owner Author

[HELIOS-CODEX] Retro-versioned and grouped.

  • version stamp: \
  • effective semantic version: \
  • package: \
  • layer: \
  • stack lane: \
  • branch scope: \

This PR is aligned for stacked/layered merge in the HELIOS-CODEX run and should merge after any earlier wave dependency and before any later-wave dependency.

@KooshaPari
Copy link
Copy Markdown
Owner Author

[HELIOS-CODEX] Retro-versioned and grouped.\n\n- version stamp: HELIOS-CODEX/v6.8.87-0-codex0.101.0\n- effective semantic version: v6.8.87-0+codex0.101.0\n- package: pkg:he:core-sdk-openapi\n- layer: HELIOS-CODEX-L0\n- stack lane: Wave A (foundation)\n- branch scope: feat/sdk-openapi-cherry-pick\n- change package: sdk openapi cherry-pick\n\nThis PR is aligned for stacked/layered merge in the HELIOS-CODEX run and should merge after any earlier wave dependency and before any later-wave dependency.

@KooshaPari
Copy link
Copy Markdown
Owner Author

[HELIOS-CODEX] Versioning rule corrected.\n\nUse this pattern from now on: <project_version>-<codex_minor>.<codex_patch>.\n\n- project version: 0.1.3\n- codex version: 0.123.1\n- corrected composite version: 0.1.3-${codex_version#0.}

@KooshaPari
Copy link
Copy Markdown
Owner Author

HELIOS-CODEX versioning correction

Use the corrected composite rule:

  • If Codex version is 0.123.1 and project version is 0.1.3, final version is 0.1.3-123.1.
  • Rule: project_version + '-' + codex_major.patch where codex_major.patch is 123.1 from 0.123.1 (drop the leading 0. from codex).

Please keep prior HELIOS notes but normalize package/version fields to this format in labels, release notes, and future comments.

@KooshaPari KooshaPari deleted the branch feat/sdk-openapi-cherry-pick February 26, 2026 10:40
@KooshaPari KooshaPari closed this Feb 26, 2026
@KooshaPari KooshaPari deleted the ci/fix-feat-sdk-openapi-cherry-pick branch February 27, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HELIOS-CODEX Bundle identifier for HELIOS-CODEX release train HELIOS-CODEX-L0 HELIOS-CODEX foundation layer pkg:he:core-sdk-openapi HELIOS-CODEX SDK OpenAPI package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant