feat(miner-hands): CodingAgentDriver factory + provider-style config resolution (#4289) - #4624
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-10 08:17:42 UTC
⏸️ Suggested Action - Manual Review
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 #4624 +/- ##
=======================================
Coverage ? 94.10%
=======================================
Files ? 430
Lines ? 38305
Branches ? 13967
=======================================
Hits ? 36048
Misses ? 1600
Partials ? 657
🚀 New features to boost your workflow:
|
JSONbored
left a comment
There was a problem hiding this comment.
merge conflicts:
This branch has conflicts that must be resolved
Use the command line to resolve conflicts before continuing.
test/unit/queue.test.ts
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.