-
Notifications
You must be signed in to change notification settings - Fork 2
fix: layer 3 — remove broken test files and clean build artifacts #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6f0fef8
6767e6a
ff48e88
3cb374b
fdc3125
33a6a3d
4ce4371
c0ed1f4
0e6114b
96574c8
b41c629
7c1496b
28f4391
874c1d8
c3401ad
abbd6b7
b527f5b
3a1067c
8ac9f65
5de4437
158efa8
cdce419
db8c8d9
d536ed9
3d6fd43
51653a4
8da6fa5
33da0c2
d2406f2
2fda8f1
8f72c7c
d3bc5ab
be5c5ea
ba1fa0d
5accbac
760fe33
761478a
cdbcd68
439628a
e62d90b
3d362db
c23a140
638afec
f2b62d5
abba4ba
25db34a
bc68460
e4631f2
ef6ff97
d2dcbc9
4943c13
e6c3e41
8a2972b
d61ad25
76c830b
2ea2ba5
1e50842
a0b797e
286559e
6f39ac0
0342d68
2dc0d83
4d394fa
6047636
63fb63b
8e369ce
7079118
f0e0add
4863fbd
16fc115
db1a890
38b0594
a92faf1
0b10213
6dbbbfd
00e9d8c
a183096
35b0bc6
757f081
186255c
7d4efed
ac75a08
ac72480
2b22dd7
02dd551
42242fd
b7735e9
8592c50
520c6ab
34fcc1d
512d6ee
efe74bd
043a4f0
c8d5c96
4c4e4f9
6cb80a8
8a847f9
9f24969
5e08422
96e0424
dae919e
811f1d1
a0ba941
5e37c03
a7fb1cb
b19c835
07032b2
15287a3
74a4f82
aba30f6
b9dd3b0
426ab27
e40ecc1
817252a
77cbbb3
5cdc16f
b6561b4
f51091b
7d859c1
6408e7f
5b51dd6
131be40
4e66c5a
1898a7e
6e9216a
f6fa9bc
7331b89
4957e4b
9d9ecba
089dbdb
5f04809
3f60234
c5470b0
90e88be
a51dca2
c60ade7
018ef2b
5c98d24
e545469
fcc3634
fa2b107
aed3650
fd5bba6
de51ad0
eeedf85
8e1233d
848ddc2
0f1ae70
e3442df
be645ad
57293be
e2dd585
4dc6908
3a7a724
fcacf09
12dd7d3
2652147
4261254
1d36001
9207326
740bcd3
85b8a49
1ffed00
978d35f
e259ac3
b789821
3b6bdee
6268ac9
e77f812
cbdb23e
0f0026b
7ed6457
c7ab480
b02def5
c5c6e4a
cc4ca8c
4dc5642
bbca49e
5204ef3
30a1bde
0406367
9b9c6a8
e9148d6
b19bdb0
3c17496
2060bca
0e84537
101bff2
1b280ad
631e46a
39be974
c742e1d
ac49681
40001f8
5e79ae8
df9aa7f
50867a4
797583c
da6399f
dfc5cbe
2ec3372
6765620
bcb8bb6
5d52fff
61cb179
0e4f4e8
9c8bfa8
04677dd
801c019
298bbf2
7055c80
6ffcf3b
fc37edf
abffcfe
8bc7577
2cf9b80
ebc2e0f
6811f71
4424c48
eff1b63
763dc42
ec23499
7aba082
594e5f6
269fc80
f006744
d7471bd
7954709
6df2e04
2fe66bd
40d7746
f863dd9
22b1774
05242f0
ca2e2c7
d09e64d
8cac2df
8a834b6
d59c40b
da6418f
118daf2
3b8908f
ad78f86
590abaf
8796372
a4e4c2b
c9da0b5
5168055
6d7b357
75f4064
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,41 +1,44 @@ | ||||||||||||||
| --- | ||||||||||||||
| name: Bug report | ||||||||||||||
| about: Report a bug in cliproxyapi++ | ||||||||||||||
| title: '[BUG] ' | ||||||||||||||
| labels: 'bug' | ||||||||||||||
| about: Create a report to help us improve | ||||||||||||||
| title: '' | ||||||||||||||
| labels: '' | ||||||||||||||
| assignees: '' | ||||||||||||||
|
|
||||||||||||||
| --- | ||||||||||||||
|
|
||||||||||||||
| **Is it a request payload issue?** | ||||||||||||||
| [ ] Yes, this is a request payload issue. I am using a client/cURL to send a request payload, but I received an unexpected error. | ||||||||||||||
| [ ] No, it's another issue. | ||||||||||||||
| [ ] Yes, this is a request payload issue. I am using a client/cURL to send a request payload, but I received an unexpected error. | ||||||||||||||
| [ ] No, it's another issue. | ||||||||||||||
|
|
||||||||||||||
| **If it's a request payload issue, you MUST know** | ||||||||||||||
| To help us diagnose the problem, please provide as much detail as possible, including request logs or `curl` payloads. | ||||||||||||||
| To help us diagnose the problem, please provide as much detail as possible, including the request log or curl payload. | ||||||||||||||
|
|
||||||||||||||
| **Describe the bug** | ||||||||||||||
| A clear and concise description of what the bug is. | ||||||||||||||
|
|
||||||||||||||
| **cliproxyapi++ Configuration** | ||||||||||||||
| What provider and model are you using? (e.g. Kiro, Claude, Gemini) | ||||||||||||||
| **CLI Type** | ||||||||||||||
| What type of CLI account do you use? (gemini-cli, gemini, codex, claude code or openai-compatibility) | ||||||||||||||
|
|
||||||||||||||
| **LLM Client** | ||||||||||||||
| What LLM Client are you using? (e.g. Roo Code, Claude Code, Cursor, etc.) | ||||||||||||||
| **Model Name** | ||||||||||||||
| What model are you using? (example: gemini-2.5-pro, claude-sonnet-4-20250514, gpt-5, etc.) | ||||||||||||||
|
|
||||||||||||||
| **Environment Information** | ||||||||||||||
| - **cliproxyapi++ Version**: (e.g., v6.0.0-++.1) | ||||||||||||||
| - **Deployment Method**: (e.g., Docker, Binary) | ||||||||||||||
| - **OS**: (e.g. macOS, Ubuntu 22.04) | ||||||||||||||
| **LLM Client** | ||||||||||||||
| What LLM Client are you using? (example: roo-code, cline, claude code, etc.) | ||||||||||||||
|
|
||||||||||||||
| **Request Information** | ||||||||||||||
| Please provide the `curl` command or the logs from `config.yaml` with `request-log: true`. | ||||||||||||||
| The best way is to paste the cURL command of the HTTP request here. | ||||||||||||||
| Alternatively, you can set `request-log: true` in the `config.yaml` file and then upload the detailed log file. | ||||||||||||||
|
|
||||||||||||||
| **Expected behavior** | ||||||||||||||
| A clear and concise description of what you expected to happen. | ||||||||||||||
|
|
||||||||||||||
| **Screenshots** | ||||||||||||||
| If applicable, add screenshots to help explain your problem. | ||||||||||||||
|
|
||||||||||||||
| **OS Type** | ||||||||||||||
| - OS: [e.g. macOS] | ||||||||||||||
| - Version [e.g. 15.6.0] | ||||||||||||||
|
Comment on lines
+39
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normalize OS section formatting for consistent prompts. Line 41 is missing a colon after Suggested fix- - Version [e.g. 15.6.0]
+ - Version: [e.g. 15.6.0]📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
| **Additional context** | ||||||||||||||
| Add any other context about the problem here. | ||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # To get started with Dependabot version updates, you'll need to specify which | ||
| # package ecosystems to update and where the package manifests are located. | ||
| # Please see the documentation for all configuration options: | ||
| # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
|
||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "" # See documentation for possible values haha | ||
| directory: "/" # Location of package manifests | ||
| schedule: | ||
| interval: "weekly" | ||
|
Comment on lines
+8
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat .github/dependabot.ymlRepository: KooshaPari/cliproxyapi-plusplus Length of output: 601 🏁 Script executed: #!/bin/bash
# Run the verification script from the review
python - <<'PY'
import sys
from pathlib import Path
p = Path(".github/dependabot.yml")
text = p.read_text(encoding="utf-8")
bad = []
for i, line in enumerate(text.splitlines(), start=1):
if "package-ecosystem:" in line:
value = line.split(":", 1)[1].strip().split("#", 1)[0].strip().strip('"').strip("'")
if not value:
bad.append(i)
if bad:
print(f"Invalid empty package-ecosystem at lines: {bad}")
sys.exit(1)
print("OK: no empty package-ecosystem values found")
PYRepository: KooshaPari/cliproxyapi-plusplus Length of output: 120 🌐 Web query:
💡 Result: In This matches the published JSON schema used by many editors/linters (SchemaStore) [1] and GitHub’s own Dependabot options reference (same set, with notes about supported tool versions) [2]. Notes:
Sources: [1], [2], [3] Dependabot config is invalid due to empty ecosystem value. Line 8 sets 🔧 Proposed fix version: 2
updates:
- - package-ecosystem: "" # See documentation for possible values haha
+ - package-ecosystem: "gomod"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Approved external endpoint hosts. | ||
| # Matching is exact host or subdomain of an entry. | ||
|
|
||
| accounts.google.com | ||
| aiplatform.googleapis.com | ||
| ampcode.com | ||
| api.anthropic.com | ||
| api.api.githubcopilot.com | ||
| api.deepseek.com | ||
| api.fireworks.ai | ||
| api.github.com | ||
| api.groq.com | ||
| api.kilo.ai | ||
| api.kimi.com | ||
| api.minimax.chat | ||
| api.minimax.io | ||
| api.mistral.ai | ||
| api.novita.ai | ||
| api.openai.com | ||
| api.roocode.com | ||
| api.siliconflow.cn | ||
| api.together.xyz | ||
| apis.iflow.cn | ||
| auth.openai.com | ||
| chat.qwen.ai | ||
| chatgpt.com | ||
| claude.ai | ||
| cloudcode-pa.googleapis.com | ||
| cloudresourcemanager.googleapis.com | ||
| generativelanguage.googleapis.com | ||
| github.com | ||
| golang.org | ||
| iflow.cn | ||
| integrate.api.nvidia.com | ||
| oauth2.googleapis.com | ||
| openrouter.ai | ||
| platform.iflow.cn | ||
| platform.openai.com | ||
| portal.qwen.ai | ||
| raw.githubusercontent.com | ||
| serviceusage.googleapis.com | ||
| www.googleapis.com |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # workflow_file|job_name | ||
| pr-test-build.yml|go-ci | ||
| pr-test-build.yml|quality-ci | ||
| pr-test-build.yml|quality-staged-check | ||
| pr-test-build.yml|fmt-check | ||
| pr-test-build.yml|golangci-lint | ||
| pr-test-build.yml|route-lifecycle | ||
| pr-test-build.yml|test-smoke | ||
| pr-test-build.yml|pre-release-config-compat-smoke | ||
| pr-test-build.yml|distributed-critical-paths | ||
| pr-test-build.yml|changelog-scope-classifier | ||
| pr-test-build.yml|docs-build | ||
| pr-test-build.yml|ci-summary |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # workflow_file|job_name | ||
| pr-test-build.yml|go-ci | ||
| pr-test-build.yml|quality-ci | ||
| pr-test-build.yml|quality-staged-check | ||
| pr-test-build.yml|fmt-check | ||
| pr-test-build.yml|golangci-lint | ||
| pr-test-build.yml|route-lifecycle | ||
| pr-test-build.yml|provider-smoke-matrix | ||
| pr-test-build.yml|provider-smoke-matrix-cheapest | ||
| pr-test-build.yml|test-smoke | ||
| pr-test-build.yml|pre-release-config-compat-smoke | ||
| pr-test-build.yml|distributed-critical-paths | ||
| pr-test-build.yml|changelog-scope-classifier | ||
| pr-test-build.yml|docs-build | ||
| pr-test-build.yml|ci-summary | ||
| pr-path-guard.yml|ensure-no-translator-changes |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| policy_file=".github/policies/approved-external-endpoints.txt" | ||
| if [[ ! -f "${policy_file}" ]]; then | ||
| echo "Missing policy file: ${policy_file}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| mapfile -t approved_hosts < <(grep -Ev '^\s*#|^\s*$' "${policy_file}" | tr '[:upper:]' '[:lower:]') | ||
| if [[ "${#approved_hosts[@]}" -eq 0 ]]; then | ||
| echo "No approved hosts in policy file" | ||
| exit 1 | ||
| fi | ||
|
|
||
| matches_policy() { | ||
| local host="$1" | ||
| local approved | ||
| for approved in "${approved_hosts[@]}"; do | ||
| if [[ "${host}" == "${approved}" || "${host}" == *."${approved}" ]]; then | ||
| return 0 | ||
| fi | ||
| done | ||
| return 1 | ||
| } | ||
|
|
||
| mapfile -t discovered_hosts < <( | ||
| rg -No --hidden \ | ||
| --glob '!docs/**' \ | ||
| --glob '!**/*_test.go' \ | ||
| --glob '!**/node_modules/**' \ | ||
| --glob '!**/*.png' \ | ||
| --glob '!**/*.jpg' \ | ||
| --glob '!**/*.jpeg' \ | ||
| --glob '!**/*.gif' \ | ||
| --glob '!**/*.svg' \ | ||
| --glob '!**/*.webp' \ | ||
| 'https?://[^"\047 )\]]+' \ | ||
| cmd pkg sdk scripts .github/workflows config.example.yaml README.md README_CN.md 2>/dev/null \ | ||
| | awk -F'://' '{print $2}' \ | ||
| | cut -d/ -f1 \ | ||
| | cut -d: -f1 \ | ||
| | tr '[:upper:]' '[:lower:]' \ | ||
| | sort -u | ||
| ) | ||
|
|
||
| unknown=() | ||
| for host in "${discovered_hosts[@]}"; do | ||
| [[ -z "${host}" ]] && continue | ||
| [[ "${host}" == *"%"* ]] && continue | ||
| [[ "${host}" == *"{"* ]] && continue | ||
| [[ "${host}" == "localhost" || "${host}" == "127.0.0.1" || "${host}" == "0.0.0.0" ]] && continue | ||
| [[ "${host}" == "example.com" || "${host}" == "www.example.com" ]] && continue | ||
| [[ "${host}" == "proxy.com" || "${host}" == "proxy.local" ]] && continue | ||
| [[ "${host}" == "api.example.com" ]] && continue | ||
| if ! matches_policy "${host}"; then | ||
| unknown+=("${host}") | ||
| fi | ||
| done | ||
|
|
||
| if [[ "${#unknown[@]}" -ne 0 ]]; then | ||
| echo "Found external hosts not in ${policy_file}:" | ||
| printf ' - %s\n' "${unknown[@]}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "external endpoint policy check passed" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| echo "[distributed-critical-paths] validating filesystem-sensitive paths" | ||
| go test -count=1 -run '^(TestMultiSourceSecret_FileHandling|TestMultiSourceSecret_CacheBehavior|TestMultiSourceSecret_Concurrency|TestAmpModule_OnConfigUpdated_CacheInvalidation)$' ./pkg/llmproxy/api/modules/amp | ||
|
|
||
| echo "[distributed-critical-paths] validating ops endpoint route registration" | ||
| go test -count=1 -run '^TestRegisterManagementRoutes$' ./pkg/llmproxy/api/modules/amp | ||
|
|
||
| echo "[distributed-critical-paths] validating compute/cache-sensitive paths" | ||
| go test -count=1 -run '^(TestEnsureCacheControl|TestCacheControlOrder|TestCountOpenAIChatTokens|TestCountClaudeChatTokens)$' ./pkg/llmproxy/runtime/executor | ||
|
|
||
| echo "[distributed-critical-paths] validating queue telemetry to provider metrics path" | ||
| go test -count=1 -run '^TestBuildProviderMetricsFromSnapshot_FailoverAndQueueTelemetry$' ./pkg/llmproxy/usage | ||
|
|
||
| echo "[distributed-critical-paths] validating signature cache primitives" | ||
| go test -count=1 -run '^(TestCacheSignature_BasicStorageAndRetrieval|TestCacheSignature_ExpirationLogic)$' ./pkg/llmproxy/cache | ||
|
|
||
| echo "[distributed-critical-paths] all targeted checks passed" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| patterns=( | ||
| 'sk-[A-Za-z0-9]{20,}' | ||
| 'ghp_[A-Za-z0-9]{20,}' | ||
| 'AKIA[0-9A-Z]{16}' | ||
| 'AIza[0-9A-Za-z_-]{20,}' | ||
| '-----BEGIN (RSA|OPENSSH|EC|DSA|PRIVATE) KEY-----' | ||
| ) | ||
|
|
||
| allowed_context='\$\{|\{\{.*\}\}|<[^>]+>|\[REDACTED|your[_-]?|example|dummy|sample|placeholder' | ||
|
|
||
| tmp_hits="$(mktemp)" | ||
| trap 'rm -f "${tmp_hits}"' EXIT | ||
|
|
||
| for pattern in "${patterns[@]}"; do | ||
| rg -n --pcre2 --hidden \ | ||
| --glob '!docs/node_modules/**' \ | ||
| --glob '!**/*.min.*' \ | ||
| --glob '!**/*.svg' \ | ||
| --glob '!**/*.png' \ | ||
| --glob '!**/*.jpg' \ | ||
| --glob '!**/*.jpeg' \ | ||
| --glob '!**/*.gif' \ | ||
| --glob '!**/*.webp' \ | ||
| --glob '!**/*.pdf' \ | ||
| --glob '!**/*.lock' \ | ||
| --glob '!**/*.snap' \ | ||
| -e "${pattern}" docs README.md README_CN.md examples >> "${tmp_hits}" || true | ||
| done | ||
|
|
||
| if [[ ! -s "${tmp_hits}" ]]; then | ||
| echo "docs secret sample check passed" | ||
| exit 0 | ||
| fi | ||
|
|
||
| violations=0 | ||
| while IFS= read -r hit; do | ||
| line_content="${hit#*:*:}" | ||
| if printf '%s' "${line_content}" | rg -qi "${allowed_context}"; then | ||
| continue | ||
| fi | ||
| echo "Potential secret detected: ${hit}" | ||
| violations=1 | ||
| done < "${tmp_hits}" | ||
|
|
||
| if [[ "${violations}" -ne 0 ]]; then | ||
| echo "Secret sample check failed. Replace with placeholders or redact." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "docs secret sample check passed" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| report="${REPORT_PATH:-docs/reports/fragmented/OPEN_ITEMS_VALIDATION_2026-02-22.md}" | ||
| if [[ ! -f "$report" ]]; then | ||
| echo "[FAIL] Missing report: $report" | ||
| exit 1 | ||
| fi | ||
|
|
||
| section="$(awk ' | ||
| BEGIN { in_issue=0 } | ||
| /^- Issue #258/ { in_issue=1 } | ||
| in_issue { | ||
| if ($0 ~ /^- (Issue|PR) #[0-9]+/ && $0 !~ /^- Issue #258/) { | ||
| exit | ||
| } | ||
| } | ||
| ' "$report")" | ||
|
|
||
| if [[ -z "$section" ]]; then | ||
| echo "[FAIL] $report missing Issue #258 section." | ||
| exit 1 | ||
| fi | ||
|
|
||
| status_line="$(echo "$section" | awk 'BEGIN{IGNORECASE=1} /- (Status|State):/{print; exit}')" | ||
| if [[ -z "$status_line" ]]; then | ||
| echo "[FAIL] $report missing explicit status line for #258 (expected '- Status:' or '- State:')." | ||
| exit 1 | ||
| fi | ||
|
|
||
| status_lower="$(echo "$status_line" | tr '[:upper:]' '[:lower:]')" | ||
|
|
||
| if echo "$status_lower" | rg -q "\b(partial|partially|not implemented|todo|to-do|pending|wip|in progress|open|blocked|backlog)\b"; then | ||
| echo "[FAIL] $report has non-implemented status for #258: $status_line" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if ! echo "$status_lower" | rg -q "\b(implemented|resolved|complete|completed|closed|done|fixed|landed|shipped)\b"; then | ||
| echo "[FAIL] $report has unrecognized completion status for #258: $status_line" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if ! rg -n "pkg/llmproxy/translator/codex/openai/chat-completions/codex_openai_request.go" "$report" >/dev/null 2>&1; then | ||
| echo "[FAIL] $report missing codex variant fallback evidence path." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "[OK] fragmented open-items report parity checks passed" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" | ||
| cd "$ROOT" | ||
|
|
||
| # Guard against unresolved generator placeholders in planning reports. | ||
| # Allow natural-language "undefined" mentions; block explicit malformed token patterns. | ||
| PATTERN='undefinedBKM-[A-Za-z0-9_-]+|undefined[A-Z0-9_-]+undefined' | ||
|
|
||
| if rg -n --pcre2 "$PATTERN" docs/planning/reports -g '*.md'; then | ||
| echo "[FAIL] unresolved placeholder-like tokens detected in docs/planning/reports" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "[OK] no unresolved placeholder-like tokens in docs/planning/reports" | ||
|
Comment on lines
+11
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check the actual file and its content
file=".github/scripts/check-phase-doc-placeholder-tokens.sh"
if [ -f "$file" ]; then
echo "=== File exists. Checking lines 11-16: ==="
sed -n '11,16p' "$file" | cat -n
echo
echo "=== Full file content with line numbers: ==="
cat -n "$file"
else
echo "File not found: $file"
fiRepository: KooshaPari/cliproxyapi-plusplus Length of output: 1133 🌐 Web query:
💡 Result:
Important exception with Citations:
Handle Line 11 currently treats both Distinguish exit codes explicitly: 0 = match found, 1 = no match, 2+ = error requiring failure. The proposed fix using a case statement correctly handles all three outcomes. 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| violations=0 | ||
| allowed_write_keys='security-events|id-token|pages' | ||
|
|
||
| for workflow in .github/workflows/*.yml .github/workflows/*.yaml; do | ||
| [[ -f "${workflow}" ]] || continue | ||
|
|
||
| if rg -n '^permissions:\s*write-all\s*$' "${workflow}" >/dev/null; then | ||
| echo "${workflow}: uses permissions: write-all" | ||
| violations=1 | ||
| fi | ||
|
|
||
| if rg -n '^on:' "${workflow}" >/dev/null && rg -n 'pull_request:' "${workflow}" >/dev/null; then | ||
| while IFS= read -r line; do | ||
| key="$(printf '%s' "${line}" | sed -E 's/^[0-9]+:\s*([a-zA-Z-]+):\s*write\s*$/\1/')" | ||
| if [[ "${key}" != "${line}" ]] && ! printf '%s' "${key}" | grep -Eq "^(${allowed_write_keys})$"; then | ||
| echo "${workflow}: pull_request workflow grants '${key}: write'" | ||
| violations=1 | ||
| fi | ||
| done < <(rg -n '^\s*[a-zA-Z-]+:\s*write\s*$' "${workflow}") | ||
| fi | ||
| done | ||
|
|
||
| if [[ "${violations}" -ne 0 ]]; then | ||
| echo "workflow token permission check failed" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "workflow token permission check passed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: KooshaPari/cliproxyapi-plusplus
Length of output: 1741
🏁 Script executed:
Repository: KooshaPari/cliproxyapi-plusplus
Length of output: 240
🌐 Web query:
GitHub-flavored markdown task list syntax requirements checkbox rendering💡 Result:
GFM task list item syntax (what’s required to render a checkbox)
To render as a checkbox in GitHub Flavored Markdown (GFM), the checkbox marker must be in a list item (ordered or unordered), and it must appear at the start of the first paragraph in that list item: the paragraph must begin with the marker and have at least one whitespace character after it before any other content. [1]
Marker format: optional leading spaces, then:
[ ](unchecked) — the middle character is a whitespace character[x]or[X](checked) [1]Examples (render as checkboxes):
Rendering behavior (what you should expect)
When rendered, the marker is replaced with a semantic checkbox element (HTML output is typically an
<input type="checkbox">). If the marker is[ ]it’s unchecked; if it’s[x]/[X]it’s checked. [1]GitHub’s UI commonly renders these as clickable checkboxes in issues/PRs/comments, letting you toggle them to complete/incomplete. [2]
Common “why didn’t it render?” causes:
-/*/1.prefix) [1]](e.g.,- [ ]todo) [1]Sources: [1] GFM Spec – Task list items, [2] GitHub Docs – tasklists/task list creation.
Fix task-list syntax so checkboxes render in GitHub issues.
Lines 11–12 use
[ ]without list markers. GitHub requires- [ ]format to render interactive checkboxes; plain text[ ]will not render as selectable checkboxes and prevents users from properly triaging the issue.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents