feat(miner-config): parse a feasibilityGate policy block from .gittensory-miner.yml (#4275) - #4433
Conversation
…sory-miner.yml (JSONbored#4275) Add a feasibilityGate field to MinerGoalSpec (packages/gittensory-engine/src/ miner-goal-spec.ts) so a maintainer can tune the miner feasibility gate per repo. It is a policy BLOCK (an object, so it can grow), today carrying suppressReasons - feasibility-verdict avoid/raise reason codes the gate should ignore for this repo. Default: an empty block (suppress nothing). Wired through the canonical tolerant parser exactly like the existing six fields: a normalizeFeasibilityGate helper (reusing normalizeStringList for suppressReasons, degrading a non-object/list value to the empty block with a warning, never throwing), the DEFAULT_MINER_GOAL_SPEC entry + deep clone, and hasConfiguredGoalFields (so a spec that sets ONLY feasibilityGate is still detected as present). The non-exported miner-goal-spec-parse.ts sibling is deliberately left untouched (no real caller). Updates the JSON Schema mirror + docs to match. The gate's actual consumer is separate, maintainer-owned wiring (JSONbored#4270); this defines the config surface only. 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:06:07 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. |
Adds a
feasibilityGatefield toMinerGoalSpecso a maintainer can tune the miner feasibility gate per repo, extending the existing tolerant.gittensory-miner.ymlparser (packages/gittensory-engine/src/miner-goal-spec.ts).Design
feasibilityGateis an object (so it can grow), today carrying a single field:suppressReasons, the feasibility-verdict avoid/raise reason codes the gate should ignore for this repo. Default: an empty block (suppress nothing). This implements the "suppress specific avoid/raise reasons per-repo" option the issue names.normalizeFeasibilityGatehelper (reusingnormalizeStringListforsuppressReasons, degrading a non-object/list value to the empty block with a warning, never throwing), theDEFAULT_MINER_GOAL_SPECentry + deep clone, andhasConfiguredGoalFields(so a spec that sets onlyfeasibilityGateis still detected aspresent).miner-goal-spec-parse.tssibling (no real caller — per the issue's caution).docs/miner-goal-spec.mdto match (kept in sync with the drift test), and re-exports the newMinerFeasibilityGatePolicytype from the package barrel.Tests
New
test/unit/miner-goal-spec-feasibility-gate.test.tscovers absent (default, bare spec stays not-present), a set block (marks present), suppressReasons de-dup/non-string skipping, and non-object + list degradation with targeted warnings — 100% branch coverage on the new code. Updated the engine's node:test contract/parser suites (exact field-surface + full-spec assertions) and the docs/schema drift test's field list; the whole engine suite (311 tests) and typecheck are green.Closes #4275