Show the selected bot profile and add OpenRouter fallback #18

Merged
temeddix merged 1 commits from codex-claude-opencode into main 2026-09-24 01:39:50 +00:00
Owner

Uses Codex first, then Claude, then OpenCode through OpenRouter when quota is exhausted.

Every generated comment and review now identifies the selected profile and model in a final quote. The dependent action interface remains one master key.

Verified formatting, lint, type checks, encrypted profile decryption, current OpenCode CLI flags, and 45 tests.

Uses Codex first, then Claude, then OpenCode through OpenRouter when quota is exhausted. Every generated comment and review now identifies the selected profile and model in a final quote. The dependent action interface remains one master key. Verified formatting, lint, type checks, encrypted profile decryption, current OpenCode CLI flags, and 45 tests.
Author
Owner

@bot please review the current head for approval, especially profile attribution, credential isolation, and quota-only fallback.

@bot please review the current head for approval, especially profile attribution, credential isolation, and quota-only fallback.
Author
Owner

@bot please re-review the current head. OpenCode now streams live output, post-processing failures receive the attributed generic failure, and provider credentials are withheld from setup subprocesses.

@bot please re-review the current head. OpenCode now streams live output, post-processing failures receive the attributed generic failure, and provider credentials are withheld from setup subprocesses.
temeddix force-pushed codex-claude-opencode from 54f704b660 to e2af609845 2026-09-24 01:22:04 +00:00 Compare
Author
Owner

@bot please re-review the current head. Transport-level Gitea failures are now classified and preserved without a second posting attempt; the regression suite is 49 tests.

@bot please re-review the current head. Transport-level Gitea failures are now classified and preserved without a second posting attempt; the regression suite is 49 tests.
temeddix added 1 commit 2026-09-24 01:23:35 +00:00
Show profile and add OpenRouter fallback
Check / deno (pull_request) Successful in 1m24s
41f7d6e64f
temeddix force-pushed codex-claude-opencode from e2af609845 to 41f7d6e64f 2026-09-24 01:23:35 +00:00 Compare
bot approved these changes 2026-09-24 01:31:14 +00:00
bot left a comment
Owner

✅ Approved

Profile attribution, credential isolation, quota-only fallback, and Gitea failure classification all check out.

Verification
  • deno fmt --check, deno lint, deno check src/*.ts: clean
  • deno test --allow-all: 49/49 pass, matching the claimed count
  • Required CI check ("Check / deno") is green on head 41f7d6e
  • Confirmed against the real opencode-ai@1.18.32 binary: run --format json --auto --model are real flags, and JSON events use {type:"text", part:{type:"text", text}}, matching parseOpenCodeEvents
  • Confirmed npx skills add ... --agent opencode succeeds, validating the prepareProfile agent-name change
  • agentEnvironment scopes OPENROUTER_API_KEY/CLAUDE_CODE_OAUTH_TOKEN/OPENAI_API_KEY to only the active profile; prepareProfile's setup subprocesses (git config, skills install) receive no token
  • GiteaRequestError cleanly separates transport/HTTP failures (no duplicate FAILURE comment, per post_test.ts) from post-processing bugs (which still get the attributed generic failure)
  • withProfile footer applied consistently to issue comments, review bodies, and inline comments
Declined to judge
  • Unguarded JSON.parse per line in parseOpenCodeEvents if OpenCode ever emits a non-JSON line despite --format json: matches the existing unguarded pattern already used for Claude's stream-json output in runClaude, so not a new risk introduced by this change.
✅ Approved Profile attribution, credential isolation, quota-only fallback, and Gitea failure classification all check out. <details><summary>Verification</summary> - `deno fmt --check`, `deno lint`, `deno check src/*.ts`: clean - `deno test --allow-all`: 49/49 pass, matching the claimed count - Required CI check ("Check / deno") is green on head `41f7d6e` - Confirmed against the real `opencode-ai@1.18.32` binary: `run --format json --auto --model` are real flags, and JSON events use `{type:"text", part:{type:"text", text}}`, matching `parseOpenCodeEvents` - Confirmed `npx skills add ... --agent opencode` succeeds, validating the `prepareProfile` agent-name change - `agentEnvironment` scopes `OPENROUTER_API_KEY`/`CLAUDE_CODE_OAUTH_TOKEN`/`OPENAI_API_KEY` to only the active profile; `prepareProfile`'s setup subprocesses (git config, skills install) receive no token - `GiteaRequestError` cleanly separates transport/HTTP failures (no duplicate `FAILURE` comment, per `post_test.ts`) from post-processing bugs (which still get the attributed generic failure) - `withProfile` footer applied consistently to issue comments, review bodies, and inline comments </details> <details><summary>Declined to judge</summary> - Unguarded `JSON.parse` per line in `parseOpenCodeEvents` if OpenCode ever emits a non-JSON line despite `--format json`: matches the existing unguarded pattern already used for Claude's `stream-json` output in `runClaude`, so not a new risk introduced by this change. </details>
temeddix merged commit ea20f6d629 into main 2026-09-24 01:39:50 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: commons/bot-agents#18