Skip to content

feat(miner-governor): build production CodingAgentDriver construction (#5131) - #5138

Merged
loopover-orb[bot] merged 1 commit into
mainfrom
feat/miner-driver-construction-5131
Jul 12, 2026
Merged

feat(miner-governor): build production CodingAgentDriver construction (#5131)#5138
loopover-orb[bot] merged 1 commit into
mainfrom
feat/miner-driver-construction-5131

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (Closes Build production CodingAgentDriver construction + wire into the create phase #5131).

Validation

  • git diff --check
  • npm run actionlint — not run (no workflow files touched)
  • npm run typecheck
  • npm run test:coverage (targeted to the new/related files: test/unit/miner-coding-agent-construction.test.ts 12/12 passing, 100% statement/branch/function/line coverage; also re-ran miner-coding-agent-house-rules.test.ts and miner-attempt-runner.test.ts for regression)
  • npm run test:workers — not run (this PR touches only packages/gittensory-miner, no Workers runtime code)
  • npm run build:mcp / npm run test:mcp-pack — not run (no MCP server changes)
  • npm run ui:openapi:check / npm run ui:lint / npm run ui:typecheck / npm run ui:build — not run (no UI changes)
  • npm audit --audit-level=moderate — no new dependencies added
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries (spawn success/stderr/spawn-error/timeout paths; provider-unconfigured/unknown-name fail-closed paths; house-rules hooks wired-by-default + config/options threading; construction-without-invoking-spawn)

If any required check was skipped, explain why:

  • This PR is scoped entirely to packages/gittensory-miner/lib/ (a Node CLI package with its own node --check-only build/typecheck convention, not the root TS project or the UI workspace) plus one new root test/unit/ file — the UI/Workers/MCP-pack checks above have no surface this diff touches, and were skipped on that basis rather than run and ignored.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. — N/A, no such changes.
  • API/OpenAPI/MCP behavior is updated and tested where needed. — N/A, no API/OpenAPI/MCP changes.
  • UI changes use live API data or real empty/error/loading states. — N/A, no UI changes.
  • UI Evidence — N/A, no visible UI change.
  • Public docs/changelogs are updated where needed. — N/A, no user-facing docs affected; changelog is release-prep only.

Notes

…#5131)

Closes the gap coding-agent-house-rules.js's own header names explicitly:
nothing in packages/gittensory-miner ever constructs a coding-agent driver
in production, only test doubles exist. Adds a real child_process-backed
spawn (CliSubprocessSpawnFn) and a real driver-construction call site that
resolves MINER_CODING_AGENT_PROVIDER and wires house-rule enforcement
(#2343) in by default via buildHouseRulesAgentSdkHooks.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 016e061 Commit Preview URL

Branch Preview URL
Jul 12 2026, 04:12 AM

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.32%. Comparing base (d1cb4e5) to head (016e061).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5138   +/-   ##
=======================================
  Coverage   94.32%   94.32%           
=======================================
  Files         471      471           
  Lines       39837    39837           
  Branches    14535    14535           
=======================================
  Hits        37576    37576           
  Misses       1583     1583           
  Partials      678      678           
Flag Coverage Δ
shard-1 46.34% <ø> (-0.01%) ⬇️
shard-2 34.29% <ø> (-0.37%) ⬇️
shard-3 31.05% <ø> (+0.08%) ⬆️
shard-4 33.10% <ø> (+0.23%) ⬆️
shard-5 33.49% <ø> (-0.18%) ⬇️
shard-6 45.17% <ø> (+0.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 12, 2026
@loopover-orb

loopover-orb Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-12 04:17:54 UTC

4 files · 2 AI reviewers · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
Adds a new packages/gittensory-miner/lib/coding-agent-construction.js module providing createRealCliSubprocessSpawn (a resolve-never-reject child_process wrapper matching the engine's CliSubprocessSpawnFn contract) and constructProductionCodingAgentDriver (resolves MINER_CODING_AGENT_PROVIDER, fails closed with no provider configured, and wires house-rule PreToolUse hooks in by default via buildHouseRulesAgentSdkHooks). The spawn wrapper correctly clears its timer on both error/close and treats timeout as a resolved timedOut result rather than a rejection; the driver constructor correctly defaults spawn/hooks while letting explicit options override. Notably, the new functions are exported but not called from any production entry point in this diff (no change to bin/gittensory-miner.js or attempt-runner.js), so this closes the sub-issue's construction half of the epic without yet wiring a driver into a live run — consistent with the PR calling itself "sub-issue A" of a larger epic.

Nits — 6 non-blocking
  • The PR description claims the driver 'fails closed... when a CLI provider is picked without a real spawn available,' but coding-agent-construction.js:83 always defaults to `options.spawn ?? createRealCliSubprocessSpawn()`, so that failure path is never actually triggered by this code — the description overstates what's implemented here.
  • No production call site invokes constructProductionCodingAgentDriver yet (bin/gittensory-miner.js and attempt-runner.js are untouched), so despite the title this doesn't yet make the miner construct a driver at runtime — only a follow-up wiring step would.
  • The heavy multi-paragraph JSDoc/file-header commentary (coding-agent-construction.js:1-8, 15-22, 62-71) is far more verbose than the terse-comment convention typically expected; consider trimming to the non-obvious rationale only.
  • The external analysis flags depth-5 nesting in the child.on('error'/'close') callbacks (coding-agent-construction.js:45) — cosmetic, but could be flattened with named handler functions if reviewers want lower nesting.
  • Consider linking or scheduling the follow-up PR that actually wires constructProductionCodingAgentDriver into attempt-runner.js's deps.driver, since until then this primitive is unreachable from any real run.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
Signal Result Evidence
Code review ✅ No blockers 2 reviewers, synthesized
Linked issue ✅ Linked #5131
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 45 registered-repo PR(s), 37 merged, 414 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 45 PR(s), 414 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence. LLM value judgment: moderate — The change adds a well-tested, correctly-scoped construction primitive that closes half of the stated epic goal (build the driver constructor) but leaves the other half (wiring it into a live run) for a later PR, so it's real forward progress but not yet functionally impactful on its own.
Linked issue satisfaction

Partially addressed
The PR adds a real driver-construction module (constructProductionCodingAgentDriver/createRealCliSubprocessSpawn) with solid unit test coverage, directly addressing the missing call site the issue describes, but the diff shown contains no change to attempt-runner.js or any CLI dispatch path actually invoking this new function — so the construction logic exists but is still not wired into a live pr

Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, Ruby, Go, JavaScript, MDX, Shell, Solidity
  • Official Gittensor activity: 45 PR(s), 414 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

🟩 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.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build production CodingAgentDriver construction + wire into the create phase

1 participant