feat(miner-discovery): goal model — translate MinerGoalSpec into ranker weights - #2787
Merged
JSONbored merged 4 commits intoJul 3, 2026
Merged
Conversation
Contributor
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-03 21:40:44 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 1 non-blocking
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.
|
RenzoMXD
added a commit
to RenzoMXD/gittensory
that referenced
this pull request
Jul 3, 2026
Switch the denominator from total list entries to active dimensions (one for wantedPaths, one for preferredLabels). A spec with wantedPaths containing multiple globs and a candidate matching one of them now returns 1.0 instead of 0.5, matching the boolean matching semantics. Add 3 regression tests for multi-entry wantedPaths, multi-entry preferredLabels, and both-multi-entry-with-match cases. Resolves the Gittensory Orb Review blocker on PR JSONbored#2787.
RenzoMXD
force-pushed
the
feat/goal-model-miner-goal-spec-2304
branch
from
July 3, 2026 21:13
97dbcc6 to
69e3341
Compare
…er weights Add GoalModelInput and computeLaneFit to packages/gittensory-engine/src/goal-model.ts. Given a candidate issue's paths/labels and a parsed MinerGoalSpec, returns a [0, 1] lane-fit score: - 0 immediately if any candidatePath matches a blockedPath glob (short-circuit, mirrors focus-manifest blockedPaths-precedence convention) - 0 immediately if any candidateLabel matches a blockedLabel (case-insensitive) - 0 if wantedPaths/preferredLabels are set but neither matches - 0.5 when wantedPaths and preferredLabels are both empty (neutral default) - matched-criteria / total-criteria fractional ratio otherwise Includes a minimal scoped glob helper for path matching — the existing matchesManifestPath in src/signals/focus-manifest.ts lives outside the engine package's rootDir, so a self-contained glob matcher is defined here per the issue's note about the import gap. Re-exports from packages/gittensory-engine/src/index.ts so the ranker's laneFit parameter can consume the score via the shared package. Adds 10 unit tests covering: blockedPath short-circuit, blockedLabel hit, empty-preferences neutral default, no-match zero, full-match one, partial-match fraction, path-only and label-only match, case-insensitive label matching. Closes JSONbored#2304
Switch the denominator from total list entries to active dimensions (one for wantedPaths, one for preferredLabels). A spec with wantedPaths containing multiple globs and a candidate matching one of them now returns 1.0 instead of 0.5, matching the boolean matching semantics. Add 3 regression tests for multi-entry wantedPaths, multi-entry preferredLabels, and both-multi-entry-with-match cases. Resolves the Gittensory Orb Review blocker on PR JSONbored#2787.
RenzoMXD
force-pushed
the
feat/goal-model-miner-goal-spec-2304
branch
from
July 3, 2026 21:27
69e3341 to
c793f40
Compare
Signed-off-by: Renzo <170978465+RenzoMXD@users.noreply.github.com>
JSONbored
approved these changes
Jul 3, 2026
2 tasks
RealDiligent
added a commit
to RealDiligent/gittensory
that referenced
this pull request
Jul 3, 2026
…2824) Main dropped the export opener in packages/gittensory-engine/src/index.ts (JSONbored#2787), breaking tsc for every backend PR including this one. Co-authored-by: Cursor <cursoragent@cursor.com>
20 tasks
JSONbored
added a commit
that referenced
this pull request
Jul 3, 2026
…util import (#2855) Two independently-merged PRs (#2787, #2795) landed a build-breaking state on main: a spliced-in export block ate the opening brace of the adjacent contributor-fit re-export (TS1005/TS1109), and governor-ledger.ts imports node:util under this package's types:[] tsconfig, which never resolves the module's type declarations. Both broke `tsc --noEmit` and `build:miner` for every contributor. Replaced isDeepStrictEqual with a small local structural-equality check scoped to the JSON-safe values this one call site actually compares.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2304.
What changed: Added \GoalModelInput\ and \computeLaneFit\ to \packages/gittensory-engine/src/goal-model.ts. Given a candidate issue's paths/labels and a parsed \MinerGoalSpec, returns a [0, 1] lane-fit score:
Re-exports from the engine barrel so the ranker's laneFit parameter can consume the score via the shared package.
Files changed:
Validation:
pm run test\ (engine package) — 54/54 pass (44 original + 10 new)
px vitest run test/unit/plan-templates.test.ts test/unit/miner-goal-spec-parser.test.ts test/unit/miner-goal-lane-fit.test.ts\ — 29/29 pass
pm run typecheck\ — clean
Linked issue: Closes #2304