Zero-config startup (Phase 0.7)#75
Merged
mattleaverton merged 7 commits intodanshapiro:mainfrom Apr 1, 2026
Merged
Conversation
When modeldb.openrouter_model_info_path is not configured, skip catalog path validation and fall back to the embedded catalog at bootstrap time. This enables running without a config file while still getting model ID validation from the pinned catalog. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Scan builtin provider specs for API keys in the environment. For providers with a CLI spec, prefer the CLI backend when the binary is on PATH. Includes unit tests for detection logic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Constructs a RunConfigFile from CWD (must be a git repo) with version 1, real CLI profile, and empty ModelDB/CXDB sections. The bootstrap path already handles empty ModelDB by falling back to the embedded catalog. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When --config is not provided, build a default config from CWD (must be a git repo), auto-detect providers from environment, and validate that graph provider requirements are met. Log detected providers to stderr. Detach mode also works without --config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Runs a tool-command-only graph with no model catalog configured, verifying the zero-config path through bootstrap with embedded catalog fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Graph provider validation already happens in bootstrapRunWithConfig (lines 185-189) during the normal run path. The separate ValidateGraphProviders was a redundant second graph parse. Let bootstrap handle it — it produces better errors with full context. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CXDB is already skipped when config fields are empty — the bootstrap checks cxdbConfigured before attempting startup. Verified both in test and manual run without --no-cxdb. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--configis now optional —kilroy attractor run --graph pipeline.dotworks with no config fileANTHROPIC_API_KEY,OPENAI_API_KEY,GEMINI_API_KEY, etc.) and prefers CLI backend when the binary is on PATHmodeldb.openrouter_model_info_pathconfigured--no-cxdbneeded)Changes
internal/attractor/engine/config.go— makemodeldb.openrouter_model_info_pathvalidation conditionalinternal/attractor/engine/run_with_config.go— fall back to embedded catalog when no catalog path configuredinternal/attractor/engine/autodetect.go— provider auto-detection from env vars + PATHinternal/attractor/engine/config_defaults.go—DefaultRunConfig()builds config from CWDcmd/kilroy/main.go—--configoptional,loadOrBuildConfighelper, updated usagecmd/kilroy/detach_paths.go— config path optional in detach modeKnown rough edges (not blocking)
GOOGLE_API_KEYfallback is hardcoded in autodetect rather than in providerspec schemaloadOrBuildConfig(engine-level is tested)Test plan
go build ./...— clean compilego test ./internal/attractor/engine/...— full suite passes (219s)TestToolGraph_ZeroConfig— tool-command graph with no catalog, no CXDB, no DisableCXDB flagTestDetectProviders_*— unit tests for env scanning, CLI preference, Google fallback, no-keys caseTestApplyDetectedProviders_DoesNotOverwrite— existing config preservedkilroy attractor run --graph test.dotfrom a git repo withANTHROPIC_API_KEYset, no--config, no--no-cxdb🤖 Generated with Claude Code