Skip to content

Config defaults & environment fixes (Phase 0.9, items 1-3)#77

Merged
mattleaverton merged 4 commits intodanshapiro:mainfrom
mattleaverton:impl/config-defaults
Apr 2, 2026
Merged

Config defaults & environment fixes (Phase 0.9, items 1-3)#77
mattleaverton merged 4 commits intodanshapiro:mainfrom
mattleaverton:impl/config-defaults

Conversation

@mattleaverton
Copy link
Copy Markdown
Collaborator

Summary

  • Auto-detection fills gaps in partial configs: loadOrBuildConfig() now runs provider auto-detection for all configs, not just zero-config. A config file that omits providers no longer disables auto-detection — config-file values still take precedence.
  • require_clean defaults to false: Kilroy creates its own worktree, so the parent repo's cleanliness is irrelevant. Dirty repos no longer block startup. Users can still opt in with require_clean: true.
  • KILROY_RUN_ID injected into tool nodes: Tool nodes now receive KILROY_RUN_ID, KILROY_LOGS_ROOT, KILROY_WORKTREE_DIR, and other stage runtime env vars, matching agent/codergen nodes. Fixes the .ai/runs/$KILROY_RUN_ID/ data-passing convention.

Test plan

  • TestToolGraph_PartialConfigAutoDetectsProviders — partial config + env key → provider detected, run succeeds
  • TestToolGraph_DirtyRepoSucceedsWithDefaultConfig — dirty repo, no require_clean in config → run succeeds
  • TestToolGraph_RunIDInjected — tool node echoes $KILROY_RUN_ID → matches expected run ID
  • TestRun_FailsWhenRepoIsDirty — updated to explicitly opt in to RequireClean: true
  • Full engine test suite passes
  • Manual end-to-end: built binary, ran partial config on dirty repo, confirmed auto-detection + env injection in stdout

🤖 Generated with Claude Code

mattleaverton and others added 4 commits April 1, 2026 16:28
When a user provides a --config file that doesn't mention providers,
auto-detection was completely skipped, causing "missing provider backend"
errors even with API keys in the environment. Now auto-detection always
runs and fills in missing providers — config-file values still take
precedence via ApplyDetectedProviders.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Kilroy creates its own worktree for each run, so the parent repo's
cleanliness is irrelevant. The old default of true caused runs to fail
before starting whenever the repo had untracked or modified files.
Users who need the old behavior can set require_clean: true in config.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Tool nodes (shape=parallelogram with tool_command) were missing
KILROY_RUN_ID, KILROY_LOGS_ROOT, KILROY_WORKTREE_DIR, and other
stage runtime env vars that agent nodes receive. This broke the
.ai/runs/$KILROY_RUN_ID/ data-passing convention between tool and
agent nodes.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The previous commit changed the unconditional assignment from true to
false, but it still overwrote any value the caller passed. Remove the
unconditional assignment (bool zero value is already false) and fix
the test that relies on require_clean=true to explicitly opt in.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@mattleaverton mattleaverton merged commit 424d612 into danshapiro:main Apr 2, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant