aboutsummaryrefslogtreecommitdiff
path: root/scripts/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-13 23:05:00 -0500
committerCraig Jennings <c@cjennings.net>2026-07-13 23:05:00 -0500
commit1b98a9ed2acff1605895700302ff276ba88baa5b (patch)
tree77a25a0c4b2ce2f6b318de914a34de0f3b4fad8f /scripts/tests
parent21d14e0752fa8438a7ea299402e6680c3bc25062 (diff)
downloadrulesets-1b98a9ed2acff1605895700302ff276ba88baa5b.tar.gz
rulesets-1b98a9ed2acff1605895700302ff276ba88baa5b.zip
feat(launcher): wire the local runtime — codex --oss over ollama
ai --runtime local now launches codex against the machine's ollama (explicit --local-provider=ollama, model from AI_LOCAL_MODEL, default gpt-oss:120b). Verified end to end with a codex exec completion through the local model. The dependency check probes AGENT_BIN now that AGENT_CMD carries flags. This makes codex-over-ollama the de-facto answer to the runtime spec's first-supported-local-CLI blocker.
Diffstat (limited to 'scripts/tests')
-rw-r--r--scripts/tests/ai-launcher-runtime.bats13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/tests/ai-launcher-runtime.bats b/scripts/tests/ai-launcher-runtime.bats
index 4ec24bf..b93f778 100644
--- a/scripts/tests/ai-launcher-runtime.bats
+++ b/scripts/tests/ai-launcher-runtime.bats
@@ -38,10 +38,17 @@ teardown() {
[[ "$output" == codex\ * ]]
}
-@test "--runtime local is reserved and says why it is not wired" {
+@test "--runtime local launches codex --oss over ollama with the default local model" {
run bash "$AI" --runtime local --print-launch "$PROJ"
- [ "$status" -eq 2 ]
- [[ "$output" == *"not wired"* ]]
+ [ "$status" -eq 0 ]
+ [[ "$output" == "codex --oss --local-provider=ollama -m gpt-oss:120b "* ]]
+ [[ "$output" == *"protocols.org"* ]]
+}
+
+@test "AI_LOCAL_MODEL overrides the local runtime's model" {
+ AI_LOCAL_MODEL=qwen3-coder:30b run bash "$AI" --runtime local --print-launch "$PROJ"
+ [ "$status" -eq 0 ]
+ [[ "$output" == "codex --oss --local-provider=ollama -m qwen3-coder:30b "* ]]
}
@test "an unknown runtime errors and names the valid ones" {