ci: max-effort DeepSeek review with Nuxt/Go-specific prompt
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Successful in 8s
PR Check / AI code review (opencode) (pull_request) Successful in 7s
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Successful in 8s
PR Check / AI code review (opencode) (pull_request) Successful in 7s
- model: opencode/deepseek-v4-pro#max (requires funds on the opencode account; flash fallback documented in a comment) - review prompt rewritten: SSR/hydration/reactivity pitfalls, Nuxt server-route security, runtime config leaks, Go error handling, concurrency and resource hygiene, frontend/backend contract checks - strict output format with [BLOCKER]/[WARN]/[NIT] severities mapped to the approve/request-changes verdict
This commit is contained in:
1 parent
3204fab323
commit
99f6e28ad0
1 file changed
+64
-12
@@ -198,22 +198,74 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
|
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
|
||||||
run: |
|
run: |
|
||||||
# deepseek-v4-pro: DeepSeek's flagship reasoning model - much
|
# deepseek-v4-pro#max: flagship reasoning model at maximum thinking
|
||||||
# cheaper than claude-sonnet while still thorough for reviews.
|
# budget. Requires funds on the opencode account.
|
||||||
|
# Cheaper fallbacks: opencode/deepseek-v4.1-flash, or remove "#max".
|
||||||
opencode run \
|
opencode run \
|
||||||
--model opencode/deepseek-v4.1-flash \
|
--model opencode/deepseek-v4-pro#max \
|
||||||
"You are a strict but pragmatic code reviewer for a pull request.
|
"You are a principal engineer performing a rigorous code review on a
|
||||||
Review ONLY the diff provided in /tmp/pr.diff. Fetch surrounding files
|
pull request. You have tool access: read repo files for context when
|
||||||
if you need context from the repo.
|
the diff alone is ambiguous, but review ONLY code changed in this PR.
|
||||||
|
|
||||||
Look for: security issues (XSS, injection, auth bypass), leaked
|
## Project context
|
||||||
secrets, obvious bugs, breaking changes, performance problems in
|
- Stack: Nuxt 4 (Vue 3, TypeScript) SSR web app in the repo root.
|
||||||
Vue/Nuxt code, and missing error handling. Ignore pure style nits -
|
Backend/API services are being added in Golang.
|
||||||
ESLint already covers those.
|
- Deployment target: a personal production CV website.
|
||||||
|
- Already covered by other CI jobs, do NOT repeat their findings:
|
||||||
|
ESLint (style), vue-tsc (types), gitleaks (secrets in git history),
|
||||||
|
pnpm audit (dependency CVEs), droast (Dockerfile lint).
|
||||||
|
- Your job is everything those tools CANNOT see: logic, security,
|
||||||
|
architecture, correctness.
|
||||||
|
|
||||||
|
## Nuxt / Vue / TypeScript focus
|
||||||
|
- SSR pitfalls: window/document/localStorage access without
|
||||||
|
<ClientOnly> or process.client guards; hydration mismatch risks
|
||||||
|
(Date.now(), Math.random(), locale formatting in render path).
|
||||||
|
- useAsyncData/useFetch: missing or colliding keys, duplicate
|
||||||
|
requests between server and client, wrong caching/refresh setup.
|
||||||
|
- Reactivity bugs: destructuring reactive objects losing reactivity,
|
||||||
|
missing await on async setup, watch on getters vs refs.
|
||||||
|
- Security: v-html with unsanitized data, user input flowing into
|
||||||
|
meta/URLs, open redirects, missing validation in /server/api and
|
||||||
|
Nitro route handlers, auth checks on both page and API level.
|
||||||
|
- Config hygiene: server-only runtime config (no NUXT_PUBLIC_
|
||||||
|
prefix) leaking secrets into the client bundle.
|
||||||
|
|
||||||
|
## Golang focus (when Go code is in the diff)
|
||||||
|
- Errors: unchecked errors, errors discarded, wrapping with %w,
|
||||||
|
sentinel vs typed errors, panic in library code.
|
||||||
|
- Concurrency: goroutine leaks (missing context cancellation),
|
||||||
|
data races (shared state without mutex/channel), WaitGroup
|
||||||
|
misuse, defer in loops.
|
||||||
|
- Resources: unclosed response bodies/files/rows, missing
|
||||||
|
timeouts on http.Client, unbounded buffering.
|
||||||
|
- Correctness: slice aliasing surprises, copy vs reference
|
||||||
|
semantics, nil map writes, integer truncation.
|
||||||
|
|
||||||
|
## Cross-cutting
|
||||||
|
- API contract mismatches between Nuxt frontend and Go backends
|
||||||
|
(field names, nullability, status codes, date formats).
|
||||||
|
- Missing authorization checks on new endpoints or pages.
|
||||||
|
- Secrets/credentials ending up in logs or client-visible output.
|
||||||
|
- Performance on the critical render path (heavy components,
|
||||||
|
unoptimized images, blocking Nitro middleware).
|
||||||
|
|
||||||
|
## Output format (strict)
|
||||||
|
Review the diff at the end of this message. For every finding:
|
||||||
|
[BLOCKER] file:line - what and why + concrete fix suggestion
|
||||||
|
[WARN] file:line - what and why + concrete fix suggestion
|
||||||
|
[NIT] file:line - optional improvement
|
||||||
|
BLOCKER = must fix before merge (security, data loss, broken
|
||||||
|
behavior). WARN = should fix soon. NIT = optional.
|
||||||
|
If a finding cannot be localized to a file, prefix [BLOCKER-GENERAL].
|
||||||
|
No compliments, no summaries of what the diff does, no style nits.
|
||||||
|
Keep it under 400 words unless there are more than 10 findings.
|
||||||
|
If the diff contains no reviewable code (docs/config only), say so
|
||||||
|
in one line.
|
||||||
|
|
||||||
End your response with a final verdict line, exactly one of:
|
End your response with a final verdict line, exactly one of:
|
||||||
VERDICT: APPROVE
|
VERDICT: APPROVE (no BLOCKER findings)
|
||||||
VERDICT: REQUEST_CHANGES" \
|
VERDICT: REQUEST_CHANGES (at least one BLOCKER)" \
|
||||||
"$(cat /tmp/pr.diff)" \
|
"$(cat /tmp/pr.diff)" \
|
||||||
2>&1 | tee /tmp/review.md
|
2>&1 | tee /tmp/review.md
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user