feat(miner-hands): add coding-agent dry-run mode and driver seam (#4313) - #4347
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4347 +/- ##
==========================================
+ Coverage 93.94% 93.95% +0.01%
==========================================
Files 397 402 +5
Lines 36760 36836 +76
Branches 13432 13455 +23
==========================================
+ Hits 34535 34611 +76
Misses 1569 1569
Partials 656 656
🚀 New features to boost your workflow:
|
d1aecd3 to
321562c
Compare
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-09 11:41:47 UTC
✅ Suggested Action - Approve/Merge
Review summary Blockers
Nits — 5 non-blocking
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.
|
Summary
packages/gittensory-engine/src/miner/coding-agent-driver.ts: the#4262CodingAgentDriverinterface seam — singlerun(task)method, provider-agnostic task/result types, fake/noop drivers for contract tests (mirrorsSelfHostAiatsrc/selfhost/ai.ts:60-63).coding-agent-mode.ts: three-state execution mode (paused|dry_run|live) structurally mirroringAgentActionMode(src/settings/agent-execution.ts:23-48) — deny-toward-safety precedence (global/per-config pause beats dry-run beats live), pluscodingAgentModeExecutes()as the single boolean gate.dry_run; the attempt log recordsattempt_shadowwithmode=dry_runso the shadow path stays auditable. (Worktree run-but-no-commit deferred to feat(miner-hands): git-worktree-per-attempt isolation primitive #4269.)coding-agent-invoke.ts:invokeCodingAgentDriver()— the mode-gated call site (paused→ abort,dry_run→ shadow result,live→ delegate to driver).driver-factory.ts(feat(miner-hands): CodingAgentDriver factory + provider-style config resolution #4289 minimal): provider-name resolution (noopstub today, deny-by-default on unknown names) andrunCodingAgentAttempt()end-to-end entry.attempt-log.ts(feat(miner-hands): driver-level structured attempt log (JSONL event trace per attempt) #4294 minimal): pure event vocabulary +normalizeAttemptLogEvent/ JSONL export — every event carriesmode.codingAgentModethroughpreparePlanTemplate(packages/gittensory-engine/src/plan-templates.ts:84) andrawPlanStepSchema(src/mcp/server.ts) so a dry-run attempt is distinguishable on the plan DAG.Closes #4313.
Part of Miner Wave 2. Includes the
#4262interface foundation this issue depends on; concrete CLI/SDK drivers (#4266/#4267) and SQLite persistence for the attempt log (#4294 IO layer) are follow-ups.Scope
AgentActionMode(not a boolean) with documented dry-run tradeoffCodingAgentDriverinterface + fake/noop driversinvokeCodingAgentDriver) —paused/dry_runnever calldriver.run()runCodingAgentAttemptattempt_shadowfor dry-run) withmodeon every rowcodingAgentModevisible on the prepare-phasecoding-agentplan step + MCPrawPlanStepSchemapackages/gittensory-engine/src/index.tsresolveAgentActionModebar), invoke branches, factory, attempt log, plan-template wiringChanged files
packages/gittensory-engine/src/miner/coding-agent-mode.tsCodingAgentExecutionMode,resolveCodingAgentExecutionMode,codingAgentModeExecutes, global pause helperpackages/gittensory-engine/src/miner/coding-agent-driver.tsCodingAgentDriverinterface, task/result types, fake/noop driverspackages/gittensory-engine/src/miner/coding-agent-invoke.tsinvokeCodingAgentDriver— mode gating + attempt-log writespackages/gittensory-engine/src/miner/driver-factory.tscreateCodingAgentDriver,runCodingAgentAttemptpackages/gittensory-engine/src/miner/attempt-log.tspackages/gittensory-engine/src/index.tspackages/gittensory-engine/src/plan-templates.tsPlanTemplateContext.codingAgentMode+ prepare-step wiringpackages/gittensory-engine/test/coding-agent-mode.test.tspackages/gittensory-engine/test/coding-agent-driver.test.tspackages/gittensory-engine/test/coding-agent-invoke.test.tspackages/gittensory-engine/test/driver-factory.test.tspackages/gittensory-engine/test/attempt-log.test.tssrc/mcp/server.tscodingAgentModetorawPlanStepSchematest/unit/plan-templates.test.tscodingAgentModeround-trip through schemaValidation
Ran locally (all green):