Skip to content

feat(signals): add MinerGoalSpec type contract - #2392

Closed
Helios531 wants to merge 1 commit into
JSONbored:mainfrom
Helios531:feat/miner-goal-spec-2293
Closed

feat(signals): add MinerGoalSpec type contract#2392
Helios531 wants to merge 1 commit into
JSONbored:mainfrom
Helios531:feat/miner-goal-spec-2293

Conversation

@Helios531

Copy link
Copy Markdown
Contributor

Summary

This PR implements #2293 by adding the initial type surface for .gittensory-miner.yml.
It defines the foundation-phase MinerGoalSpec contract and a safe DEFAULT_MINER_GOAL_SPEC, covering:

  • minerEnabled
  • wantedPaths
  • blockedPaths
  • preferredLabels
  • maxConcurrentClaims
  • issueDiscoveryPolicy

This PR is intentionally types-only. It does not add parsing, file discovery, or CLI wiring yet.

Related Issue

Closes: #2293

Change Type

  • New feature
  • Type contract
  • Foundation work
  • Test update
  • Bug fix
  • Database migration
  • Docs-only change

Real Behavior Proof

Before

  • There was no dedicated type contract for .gittensory-miner.yml
  • Miner-goal config fields and defaults were not defined in a single typed module

After

  • The repo has a dedicated MinerGoalSpec type
  • The repo has a safe DEFAULT_MINER_GOAL_SPEC
  • The issue-discovery policy reuses the same semantic vocabulary as the existing focus-manifest side
  • Every field has a co-located default documented in JSDoc

Validation

  • Focused unit tests passed
  • Repo typecheck passed

Commands Run

npx vitest run test/unit/miner-goal-spec.test.ts
npm run typecheck

Key Files

  • src/signals/miner-goal-spec.ts
  • test/unit/miner-goal-spec.test.ts

Checklist

  • MinerGoalSpec type added
  • DEFAULT_MINER_GOAL_SPEC added
  • Safe defaults documented
  • Focused tests added
  • Validation completed
  • Branch pushed

@Helios531
Helios531 requested a review from JSONbored as a code owner July 1, 2026 14:58
@dosubot dosubot Bot added the size:M label Jul 1, 2026
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 1, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@loopover-orb

loopover-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Important

🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪

🔍 Gittensory is reviewing…

AI analysis is in progress. This comment will update when the review is complete.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing

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

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.71%. Comparing base (17d70b2) to head (c4ec90b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2392   +/-   ##
=======================================
  Coverage   95.71%   95.71%           
=======================================
  Files         222      223    +1     
  Lines       24661    24662    +1     
  Branches     8949     8949           
=======================================
+ Hits        23605    23606    +1     
  Misses        433      433           
  Partials      623      623           
Files with missing lines Coverage Δ
src/signals/miner-goal-spec.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Helios531

Copy link
Copy Markdown
Contributor Author

@JSONbored Could u plz review my PR?

@JSONbored

Copy link
Copy Markdown
Owner

@JSONbored Could u plz review my PR?

Stop tagging me for reviews, next time you'll wait +5 days for a review or be auto-closed.

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is a problem, closing.

The main maintainability risk is that the exported default contains mutable arrays, which future consumers can accidentally mutate as shared process state.

@JSONbored JSONbored closed this Jul 2, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

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

2 participants