Skip to content

Wire the per-repo kill-switch pause into real attempt/loop checks #5392

Description

@JSONbored

Problem: resolveMinerGoalSpec (packages/gittensory-miner/lib/miner-goal-spec.js, built for #5255) reads a target repo's real .gittensory-miner.yml — including a killSwitch.paused field — but nothing in the real attempt/loop pipeline ever calls it. buildAttemptGovernorContext (packages/gittensory-miner/lib/attempt-input-builder.js) hardcodes killSwitchRepoPaused: undefined on every call, and loop-cli.js's own kill-switch check (checkMinerKillSwitch) is global-scope only. A repo owner setting killSwitch.paused: true in their own .gittensory-miner.yml today has no effect at all — the miner will keep attempting that repo regardless.

Area: Miner / Governor

Proposal: Wire resolveMinerGoalSpec into attempt-cli.js (it needs the already-cloned worktree path from prepareAttemptWorktree, which is real IO, not a network round trip since the repo is already on disk by that point) and thread its killSwitch.paused value into buildAttemptGovernorContext's killSwitchRepoPaused field. Extend loop-cli.js's own kill-switch check (currently checkMinerKillSwitch({ env }), global-only) to also resolve and check the per-repo pause for whichever repo the loop is about to claim/attempt.

Deliverables:

  • attempt-cli.js resolves and passes a real killSwitchRepoPaused value instead of undefined.
  • loop-cli.js's per-cycle kill-switch check also considers the target repo's own .gittensory-miner.yml pause.

Acceptance criteria:

  • A repo with killSwitch: { paused: true } in its own .gittensory-miner.yml is genuinely skipped by both gittensory-miner attempt and gittensory-miner loop, verified by a real integration-style test (real file on disk, not just a mocked resolver).
  • The existing global env-var kill switch continues to work unchanged (this is additive, not a replacement).

Boundaries:

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions