feat(miner-hands): CodingAgentDriver factory + provider-style config resolution (#4289)#4633
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-10 08:40:45 UTC
✅ Suggested Action - Approve/Merge
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4633 +/- ##
=======================================
Coverage 94.11% 94.11%
=======================================
Files 432 432
Lines 38348 38373 +25
Branches 13979 13990 +11
=======================================
+ Hits 36091 36116 +25
Misses 1600 1600
Partials 657 657
🚀 New features to boost your workflow:
|
Closes #4289
Summary
Wires the landed CLI-subprocess (#4266) and Agent-SDK (#4267) backends into
createCodingAgentDriver, mirroringsrc/selfhost/ai-config.tsprovider resolution: comma-separatedMINER_CODING_AGENT_PROVIDER, deny-by-default unknown names, per-provider env config map with every declared key consumed, and primary-then-fallback selection viaresolveFirstConfiguredCodingAgentDriverName.Fixes the gate blocker that closed prior attempts (#4561, #4593) — dry-run/paused attempts no longer require
spawnfor CLI providers.Provider registry
noopclaude-clicreateCliSubprocessCodingAgentDriver("claude")MINER_CODING_AGENT_CLAUDE_MODEL,MINER_CODING_AGENT_TIMEOUT_MScodex-clicreateCliSubprocessCodingAgentDriver("codex")MINER_CODING_AGENT_CODEX_MODEL,MINER_CODING_AGENT_TIMEOUT_MSagent-sdkcreateAgentSdkCodingAgentDriverDeliberately not declared: max-turns (task-level
CodingAgentDriverTask.maxTurns) and agent-sdk model (driver exposes no model option).Key design choices
unconfigured_coding_agent_driver:<name>; CLI withoutspawn→unconfigured_coding_agent_driver_missing_spawn:<name>.--model <value>ontodefaultCliSubprocessArgs; timeout env setstimeoutMswhen a positive integer.runCodingAgentAttemptusescreateNoopCodingAgentDriver()when!codingAgentModeExecutes(mode), so dry-run/paused attempts withclaude-cli/codex-clinever require spawn/query deps (matchescoding-agent-driver.mdlifecycle).child_processwiring stays in the miner package; tests always inject fakes.Changes
packages/gittensory-engine/src/miner/driver-factory.tspackages/gittensory-engine/src/miner/cli-subprocess-driver.tsdefaultCliSubprocessArgsfor factory argv prefixingpackages/gittensory-engine/src/index.tspackages/gittensory-miner/docs/coding-agent-driver.mdtest/unit/coding-agent-miner.test.ts,packages/gittensory-engine/test/driver-factory.test.tsTest plan
resolveFirstConfiguredCodingAgentDriverNamerunCodingAgentAttemptdry_run with claude-cli, no spawn — shadow event, no throwrunCodingAgentAttemptlive claude-cli end-to-end with model envnpm run test:cibefore pushtscNotes
claude-cli/codex-cli(notcli-subprocess) to mirror self-host'sclaude-code/codexnaming..gittensory-miner.yml) remain a follow-up — env-only for now;firstConfiguredEnvValuehelper is in place for when that lands.