Skip to content

feat(miner-foundation): MinerGoalSpec type definitions for .gittensory-miner.yml #2293

Description

@JSONbored

Define the TypeScript type surface for the MinerGoalSpec — the per-repo config a maintainer/repo-owner drops as .gittensory-miner.yml to tell a miner what to look for and how to behave when targeting their repo. This issue is types-only (the parser is a separate follow-up issue), analogous to how src/signals/focus-manifest.ts's FocusManifest type is defined ahead of/alongside its parser. Scope the fields to what the phase's existing .gittensory.yml already models for the REVIEW side (wantedPaths, blockedPaths, preferredLabels, linkedIssuePolicy, issueDiscoveryPolicy) plus miner-specific additions the roadmap implies are needed (a max-concurrent-claims-per-repo cap, an opt-in/opt-out flag since a repo owner may not want autonomous miners targeting them at all, and a pointer to which lanes/labels a miner should prefer) — keep the field list intentionally small for this foundation phase; it is easy to add fields later, hard to remove ones a contributor already started relying on.

Deliverables

  • packages/gittensory-engine/src/miner-goal-spec.ts (or src/signals/miner-goal-spec.ts if the team prefers keeping config-schema types alongside focus-manifest.ts rather than in the engine package — pick whichever the reviewing maintainer confirms, defaulting to the engine package per the phase's "shared logic lives in gittensory-engine" principle) exporting a MinerGoalSpec type with: minerEnabled: boolean (default true — explicit opt-out, not opt-in, since a public repo with no file should still be minable by default, mirroring .gittensory.yml's own "safe by default" stance), wantedPaths: string[], blockedPaths: string[], preferredLabels: string[], maxConcurrentClaims: number (a sane default, e.g. 1), issueDiscoveryPolicy: "encouraged" | "neutral" | "discouraged".
  • A DEFAULT_MINER_GOAL_SPEC constant with the safe defaults, analogous to how focus-manifest.ts documents each field's default in a comment.
  • JSDoc on every field, matching the density and "Default: X" comment convention used throughout .gittensory.yml.example.
  • No parsing logic yet — this issue is the type contract only; a unit test simply asserts DEFAULT_MINER_GOAL_SPEC type-checks against MinerGoalSpec and that every field has a documented default in a co-located comment (a lightweight "every field is documented" lint-style test, not full parser coverage).

References

  • src/signals/focus-manifest.ts (FocusManifest type family, and its gate/features/review sub-configs) — the type-shape precedent to mirror in spirit (small typed config object with an explicit defaults constant).
  • .gittensory.yml.example (wantedPaths, blockedPaths, preferredLabels, linkedIssuePolicy, issueDiscoveryPolicy fields, lines 30-80) — the exact field names/semantics to carry over from the review-side manifest where they overlap.
  • New path: .gittensory-miner.yml (the file this type models) and its type-definition module (path TBD per the note above).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions