-
Notifications
You must be signed in to change notification settings - Fork 856
feat(catalog): durable auto_review_model config override #2041
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
base: dev
Are you sure you want to change the base?
Changes from all commits
7979903
1f4e047
286cbd2
c49fed6
879dbb0
0013b23
e2d4621
f60a045
19986ca
110ef57
e97fb26
e246024
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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { describe, expect, test } from "bun:test"; | ||
| import { readRootTomlString } from "../src/codex/paths"; | ||
|
|
||
| describe("auto_review_model config key (#1225)", () => { | ||
| test("readRootTomlString resolves the root-level key next to approvals_reviewer", () => { | ||
| const config = [ | ||
| 'approvals_reviewer = "auto_review"', | ||
| 'auto_review_model = "opencode-go/deepseek-v4-flash"', | ||
| "", | ||
| "[profiles.test]", | ||
| 'model = "gpt-5.6-luna"', | ||
| ].join("\n"); | ||
| expect(readRootTomlString(config, "auto_review_model")).toBe("opencode-go/deepseek-v4-flash"); | ||
| // Keys inside tables must not leak into root resolution. | ||
| expect(readRootTomlString(config, "model")).toBeNull(); | ||
| }); | ||
|
|
||
| test("a config without the key resolves null (override stays untouched)", () => { | ||
| expect(readRootTomlString('model = "gpt-5.6-luna"\n', "auto_review_model")).toBeNull(); | ||
| }); | ||
| }); | ||
|
Comment on lines
+4
to
+21
Contributor
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. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Add an integration regression test for catalog serialization. These tests prove that
As per path instructions, a behavior change in 🤖 Prompt for AI AgentsSource: Path instructions |
||
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.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 50376
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 19843
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 186
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 50377
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 14047
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 50376
Fix the unresolved configuration helper before using the override. At
src/codex/catalog/sync.ts:1543,configuredAutoReviewModelhas no declaration or import, so the sync path raisesReferenceError. Define or import the helper, passowningCodexHome, and read that home’sconfig.tomlinstead of a process-default path.🧰 Tools
🪛 ast-grep (0.45.1)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🤖 Prompt for AI Agents