Skip to content

feat(miner-hands): lint-guarded edit wrapper for coding-agent drivers #4276

Description

@JSONbored

Important correction to a naive assumption: this repo has NO ESLint (or other linter) configured at the src//packages/* level that a generic "lint-guarded" wrapper could shell out to. Confirmed via find . -maxdepth 3 -iname "*eslint*" — the only hit repo-wide is apps/gittensory-ui/eslint.config.js, wired up solely through ui:lint (npm --workspace @jsonbored/gittensory-ui run lint, package.json), which is UI-workspace-scoped. The actual gate the rest of the codebase runs is typecheck (tsc --noEmit) plus tests, composed into test:ci's && chain (package.json), and each package under packages/* has its OWN build-time check instead of a shared linter: gittensory-engine runs tsc -p tsconfig.json (its build script) and tsc -p tsconfig.test.json (its test script); gittensory-mcp/gittensory-miner run node --check <file> per shipped file (their build scripts) since they ship plain JS with no TypeScript build step at all. "Lint-guarded" for a coding-agent driver therefore concretely means: after the driver edits files, run the check appropriate to whichever package those files live in — not an ESLint invocation.

Deliverables

  • A wrapper (composing with the CodingAgentDriver interface, feat(miner-hands): define the CodingAgentDriver interface seam #4262 — e.g. decorating a driver's run() result) that, after the driver reports changed files, runs the correct existing check for each changed file's package: tsc --noEmit/tsc -p tsconfig.json for src/- or gittensory-engine-rooted files, node --check for gittensory-miner/gittensory-mcp JS files, and the UI's own ui:lint/ui:typecheck (package.json) only for files under apps/gittensory-ui/.
  • A clear, structured failure result (not a thrown exception the caller has to parse from stderr) so the self-review loop (maintainer-only issue maintainer: local create->score->self-review iterate-loop orchestrator (the control-flow core) #2333) can distinguish "the coding agent's edit doesn't typecheck" from "the coding agent crashed" from "the coding agent succeeded."
  • Explicitly out of scope: adding a NEW linter/ESLint config to src//packages/* where none exists today — this issue guards with what this repo already runs, it does not introduce a new gate.
  • Tests covering: a changed file that fails typecheck, a changed gittensory-miner JS file with a syntax error (node --check failure), a fully clean change, and a changeset spanning multiple packages (verify each file is checked against the RIGHT package's rule, not just the first one matched).

References

  • find . -maxdepth 3 -iname "*eslint*" → only apps/gittensory-ui/eslint.config.js exists repo-wide
  • package.json: "ui:lint": "npm --workspace @jsonbored/gittensory-ui run lint", "typecheck": "tsc --noEmit", "test:ci" (the full &&-chained gate that composes typecheck + per-package checks)
  • packages/gittensory-engine/package.json: "build": "tsc -p tsconfig.json", "test": "npm run build && tsc -p tsconfig.test.json && node --test ..."
  • packages/gittensory-miner/package.json: "build": "node --check bin/gittensory-miner.js && node --check lib/cli.js && ..." (one node --check per shipped file, no TS build step)
  • packages/gittensory-mcp/package.json: "build": "node --check bin/gittensory-mcp.js && ..."
  • Depends on feat(miner-hands): define the CodingAgentDriver interface seam #4262 (this batch) for the driver result shape this wrapper decorates

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.gittensor:priorityMaintainer-selected Gittensor priority — scores a 1.5x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions