fix(ci): repair PR-Agent model routing
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / Lint + typecheck (pull_request) Successful in 1m8s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 7s
PR Check / Dependency audit (pull_request) Successful in 8s
PR Check / Dockerfile lint (droast) (pull_request) Successful in 5s
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / Lint + typecheck (pull_request) Successful in 1m8s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 7s
PR Check / Dependency audit (pull_request) Successful in 8s
PR Check / Dockerfile lint (droast) (pull_request) Successful in 5s
OpenCode Go rejects requests without x-opencode-session, and LiteLLM needs the openai/ prefix on the fallback model. Supply the header through LITELLM__EXTRA_HEADERS, keep the prefixed fallback, and stop auto-running /improve so a PR gets one review plus /describe.
This commit is contained in:
1 parent
3eac73255f
commit
a43134ad83
4 files changed
+25
-3
No files matched your search
@@ -82,6 +82,9 @@ provider rejects the request before it reaches the model.
|
|||||||
* The webhook sends `push`, `issues`, `pull_request` and `issue_comment`
|
* The webhook sends `push`, `issues`, `pull_request` and `issue_comment`
|
||||||
events. Only the last two change behaviour today; `push` is kept because
|
events. Only the last two change behaviour today; `push` is kept because
|
||||||
PR-Agent may handle push commands in a later configuration.
|
PR-Agent may handle push commands in a later configuration.
|
||||||
|
* Auto commands are `/describe` and `/review`. `/improve` stays available
|
||||||
|
on demand; the default auto list would add a second model call and a
|
||||||
|
second comment to every PR.
|
||||||
* Secrets live only in `/home/noel/self-hosted/pr-agent/.env` (mode 600) on
|
* Secrets live only in `/home/noel/self-hosted/pr-agent/.env` (mode 600) on
|
||||||
`server0`. The repository contains the compose file and an example env
|
`server0`. The repository contains the compose file and an example env
|
||||||
file, never the token or webhook secret.
|
file, never the token or webhook secret.
|
||||||
@@ -89,8 +92,10 @@ provider rejects the request before it reaches the model.
|
|||||||
# Not verified
|
# Not verified
|
||||||
|
|
||||||
* The OpenCode Go API key was not present when this was committed, so no
|
* The OpenCode Go API key was not present when this was committed, so no
|
||||||
model call and no real review have run. The first PR after the key is set
|
model call has completed. A dummy-key call now reaches the provider's
|
||||||
is the verification.
|
authentication check instead of failing on the missing session header,
|
||||||
|
so the remaining blocker is the credential. The first PR after the key is
|
||||||
|
set is the real verification.
|
||||||
* Whether `glm-5.3-flash` handles PR-Agent's structured review output well
|
* Whether `glm-5.3-flash` handles PR-Agent's structured review output well
|
||||||
enough. `glm-5.3` is configured as the fallback.
|
enough. `glm-5.3` is configured as the fallback.
|
||||||
* Whether two gunicorn workers and the 1 GB memory limit hold under
|
* Whether two gunicorn workers and the 1 GB memory limit hold under
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# Update Log
|
# Update Log
|
||||||
|
|
||||||
|
## 2026-10-30 (PR #28: lockfile and PR-Agent routing repaired)
|
||||||
|
|
||||||
|
* **Fix**: `pnpm-lock.yaml` - merging `main` left the lockfile at `@nuxt/icon` 2.6.0 while `package.json` asked for 2.6.2, so `pnpm install --frozen-lockfile` aborted in CI. The lockfile now resolves 2.6.2.
|
||||||
|
* **Fix**: `pnpm-workspace.yaml` - `seroval` 1.6.9 was the two moderate audit findings (GHSA-f86p-h4j2-7qgj, GHSA-9wx9-5pv9-3349). The patched 1.6.11 is forced through `overrides`; the blocking audit now reports only two low-severity advisories and passes the moderate gate.
|
||||||
|
* **Fix**: PR-Agent model routing - OpenCode Go rejects requests without `x-opencode-session`; `LITELLM__EXTRA_HEADERS` now supplies it, and the fallback keeps the `openai/` prefix. Auto commands are `/describe` and `/review`; `/improve` is on demand. A dummy-key call reaches the provider's auth check instead of failing on the missing header.
|
||||||
|
* **State**: the OpenCode Go API key is still unset, so no real review has run. The next step is the credential, then a `/review` comment on PR #28.
|
||||||
|
|
||||||
## 2026-10-30 (PR-Agent replaces the opencode review job)
|
## 2026-10-30 (PR-Agent replaces the opencode review job)
|
||||||
|
|
||||||
* **Decision**: [PR-Agent for Gitea reviews](decisions/pr-agent.md) - a pinned `pragent/pr-agent:0.49.0-gitea_app` container on `server0` reviews PRs through the Gitea bot user `pr-agent`; the endpoint stays on the `gitea_gitea` Docker network.
|
* **Decision**: [PR-Agent for Gitea reviews](decisions/pr-agent.md) - a pinned `pragent/pr-agent:0.49.0-gitea_app` container on `server0` reviews PRs through the Gitea bot user `pr-agent`; the endpoint stays on the `gitea_gitea` Docker network.
|
||||||
|
|||||||
@@ -26,3 +26,7 @@ OPENAI__KEY=
|
|||||||
|
|
||||||
# OpenCode Go requires a session id header; a stable id is enough here.
|
# OpenCode Go requires a session id header; a stable id is enough here.
|
||||||
LITELLM__EXTRA_HEADERS={"x-opencode-session":"pr-agent"}
|
LITELLM__EXTRA_HEADERS={"x-opencode-session":"pr-agent"}
|
||||||
|
|
||||||
|
# Auto commands on PR open. /improve remains available as a comment command;
|
||||||
|
# leaving it in the auto list adds a second model call to every PR.
|
||||||
|
GITEA__PR_COMMANDS=["/describe","/review"]
|
||||||
@@ -15,6 +15,10 @@ endpoint is not published to the internet.
|
|||||||
| Status | `ssh … agent@server0 status` |
|
| Status | `ssh … agent@server0 status` |
|
||||||
| Upgrade | edit the root-owned compose file, then run `deploy` |
|
| Upgrade | edit the root-owned compose file, then run `deploy` |
|
||||||
|
|
||||||
|
The table describes the target state. The live stack is still at
|
||||||
|
`/home/noel/self-hosted/pr-agent` and is managed with `noel`'s SSH key until
|
||||||
|
`setup-agent-access.sh` has been run.
|
||||||
|
|
||||||
## Gitea side
|
## Gitea side
|
||||||
|
|
||||||
1. The bot user `pr-agent` is a collaborator on `CV_Website/CV_Site_Nuxt` with
|
1. The bot user `pr-agent` is a collaborator on `CV_Website/CV_Site_Nuxt` with
|
||||||
@@ -85,7 +89,9 @@ sudo /usr/local/sbin/pr-agent-deploy
|
|||||||
|
|
||||||
Open a pull request in `CV_Website/CV_Site_Nuxt`. The server runs `/describe`
|
Open a pull request in `CV_Website/CV_Site_Nuxt`. The server runs `/describe`
|
||||||
and `/review` on open/reopen; comment commands such as `/review`, `/improve`
|
and `/review` on open/reopen; comment commands such as `/review`, `/improve`
|
||||||
and `/ask` are handled from the PR conversation. If nothing appears:
|
and `/ask` are handled from the PR conversation. `/improve` is deliberately
|
||||||
|
on demand: adding it to the auto list would make a second model call and a
|
||||||
|
second comment for every PR. If nothing appears:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
ssh -i ~/.ssh/pr_agent_control -o IdentitiesOnly=yes agent@91.99.207.62 logs
|
ssh -i ~/.ssh/pr_agent_control -o IdentitiesOnly=yes agent@91.99.207.62 logs
|
||||||
|
|||||||
Reference in new issue
Block a user