feat(miner-config): parse a feasibility-gate policy block from .gittensory-miner.yml - #4439
Conversation
…nsory-miner.yml Adds a `feasibilityGate` block to MinerGoalSpec so a maintainer can tune the miner's feasibility gate per-repo. It is additive and inert by default (score floor 0, nothing suppressed), so a repo that omits it behaves exactly as before. Two tolerant sub-fields: minFeasibilityScore (a [0,1] floor; out-of-range/non-finite input clamps with a warning) and suppressedAvoidReasons (a free-form string list of avoid-reason keys to downgrade). Wired through the canonical parseMinerGoalSpec + hasConfiguredGoalFields (a gate-only config is correctly present), exported from the engine barrel, mirrored in the JSON Schema and the docs, and covered by present/absent/malformed/clamp tests. Per the issue, only miner-goal-spec.ts is extended; the non-exported, uncalled miner-goal-spec-parse.ts sibling is left untouched. Closes JSONbored#4275
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
❌ 6 Tests Failed:
View the top 2 failed test(s) by shortest run time
View the full list of 4 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-09 18:52:49 UTC
🛑 Suggested Action - Fix Blockers
Review summary Nits — 1 non-blocking
CI checks failing
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 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.
|
|
Gittensory is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-code)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
Adds a
feasibilityGateblock toMinerGoalSpec(packages/gittensory-engine/src/miner-goal-spec.ts) so a maintainer can tune the miner's feasibility gate per-repo via.gittensory-miner.yml. It is additive and inert by default (score floor0, nothing suppressed), so a repo that omits the block behaves exactly as before.Two tolerant sub-fields (the tolerant "degrade, don't throw" convention of the existing parser):
minFeasibilityScore— a[0, 1]floor a candidate must reach; out-of-range or non-finite input clamps into[0, 1]with a warning. Default0.suppressedAvoidReasons— a free-form string list of feasibility avoid-reason keys to downgrade from blocking to advisory. Default[].Wired through the canonical
parseMinerGoalSpec+hasConfiguredGoalFields(a gate-only config is correctlypresent: true), exported from the engine barrel, mirrored in the JSON Schema and the docs, and covered by present / absent / malformed / clamp tests. Per the issue's caution, onlyminer-goal-spec.tsis extended — the non-exported, uncalledminer-goal-spec-parse.tssibling is left untouched.buildFeasibilityVerdict(the gate's composer) does not exist yet, so this is purely the config surface, following the repo's config-before-consumer pattern; the block's shape is documented as the issue requested.Closes #4275
Scope
CONTRIBUTING.md; nosite/,CNAME, VitePress.Validation
git diff --checknpm run typecheck(green)npm run build:miner(engine + miner build/typecheck, green)test/unit/miner-goal-spec-feasibility-gate.test.ts(6 tests) + extended engine node:test parser/contract tests + the doc/schema parity test now assert the new field. The existingMinerGoalSpecliteral sites in threetest/unitopportunity tests were updated for the new required field.maxConcurrentClaimsgrep) so everyMinerGoalSpecliteral in the repo now includesfeasibilityGate.If any required check was skipped, explain why:
npm run test:ciwas not run in the local Windows dev environment (several self-host suites require Linux/bash/Docker/Postgres). This change is confined topackages/gittensory-engine+packages/gittensory-minerconfig/docs/schema (pure parsing, nosrc/app, API/OpenAPI, MCP, binding, DB, or migration surface); typecheck, the engine+miner build, and all affected unit tests are green locally, and the remaining CI runs on this PR.Safety
UI Evidence
N/A - backend config parsing; no UI, frontend, or extension change.