xonecas.io
60255
Zn

Zoea-Nova / commit c9ecef0

test: standardize API key name to opencode_zen in tests

Updates test files to use consistent opencode_zen credential key:
- internal/integration/mysis_creation_zen_nano_test.go
- internal/provider/registry_bug_test.go

This aligns test code with production config convention where
OpenCode Zen providers use opencode_zen API key identifier.

xonecas2026-02-07 c9ecef02cf33da980f4833cedddf97df83dfcde2 parent 54ccb70

21 files changed

documentation/archive/2026-02-04-captains-log-bug.md+0−0
documentation/archive/2026-02-04-context-compaction-plan.md+0−0
documentation/archive/2026-02-04-remove-tool-payload-bloat.md+0−0
documentation/archive/2026-02-05-broadcast-sender-tracking.md+0−0
documentation/archive/2026-02-05-context-size-logging.md+0−0
documentation/archive/2026-02-06-goroutine-cleanup-fixes.md+0−0
documentation/archive/2026-02-07-loop-context-README.md+0−0
documentation/archive/2026-02-07-loop-context-checklist.md+0−0
documentation/archive/2026-02-07-loop-context-composition.md+0−0
documentation/archive/2026-02-07-loop-context-parallel-workflow.md+0−0
documentation/archive/2026-02-07-loop-context-workflow-diagram.md+0−0
documentation/archive/AGENT6_REAL_PROVIDER_RACE_INVESTIGATION.md+0−0
documentation/archive/AGENT7_GOROUTINE_CLEANUP_VERIFICATION.md+0−0
documentation/archive/AGENT_3_RACE_REPRODUCTION_REPORT.md+0−0
documentation/archive/OPENCODE_ZEN_API_TESTS_2026-02-06.md+0−0
documentation/archive/OPENCODE_ZEN_BUG_VERDICT_2026-02-06.md+0−0
documentation/archive/RESTART_BUG_INDEX.md+0−0
documentation/archive/STATE_MACHINE_TEST_REPORT.md+0−0
documentation/archive/TIMING_TEST_REPORT.md+0−0
internal/integration/mysis_creation_zen_nano_test.go+3−3
@@ -42,7 +42,7 @@ func TestCreateMysisWithZenNano(t *testing.T) {
4242
4343 // Mock credentials with API key
4444 creds := &config.Credentials{}
45- creds.SetAPIKey("opencode", "test-api-key-12345")
45+ creds.SetAPIKey("opencode_zen", "test-api-key-12345")
4646
4747 // Run EXACT initProviders logic
4848 for name, provCfg := range cfg.Providers {
@@ -53,8 +53,8 @@ func TestCreateMysisWithZenNano(t *testing.T) {
5353 registry.RegisterFactory(name, factory)
5454 t.Logf(" ✓ Registered as Ollama: %s", name)
5555 } else if provCfg.Endpoint == "https://opencode.ai/zen/v1" {
56- apiKey := creds.GetAPIKey("opencode")
57- t.Logf(" API key for opencode: %s", apiKey)
56+ apiKey := creds.GetAPIKey("opencode_zen")
57+ t.Logf(" API key for opencode_zen: %s", apiKey)
5858 if apiKey != "" {
5959 factory := provider.NewOpenCodeFactory(provCfg.Endpoint, apiKey, provCfg.RateLimit, provCfg.RateBurst)
6060 registry.RegisterFactory(name, factory)
internal/provider/registry_bug_test.go+2−2
@@ -31,7 +31,7 @@ func TestZenNanoRegistration(t *testing.T) {
3131 // Simulate initProviders logic from main.go
3232 registry := NewRegistry()
3333 creds := &config.Credentials{}
34- creds.SetAPIKey("opencode", "test-api-key")
34+ creds.SetAPIKey("opencode_zen", "test-api-key")
3535
3636 // This is EXACTLY what initProviders does
3737 for name, provCfg := range cfg.Providers {
@@ -40,7 +40,7 @@ func TestZenNanoRegistration(t *testing.T) {
4040 registry.RegisterFactory(name, factory)
4141 t.Logf("Registered Ollama provider: %s", name)
4242 } else if strings.Contains(provCfg.Endpoint, "opencode.ai") {
43- apiKey := creds.GetAPIKey("opencode")
43+ apiKey := creds.GetAPIKey("opencode_zen")
4444 if apiKey != "" {
4545 factory := NewOpenCodeFactory(provCfg.Endpoint, apiKey, provCfg.RateLimit, provCfg.RateBurst)
4646 registry.RegisterFactory(name, factory)