Skip to content

feat(signals): multiplier-aware opportunity ranking + maintainer-intent issue quality (#699, closes #186) - #706

Merged
JSONbored merged 2 commits into
mainfrom
feat/issue-watch-opportunities
Jun 14, 2026
Merged

feat(signals): multiplier-aware opportunity ranking + maintainer-intent issue quality (#699, closes #186)#706
JSONbored merged 2 commits into
mainfrom
feat/issue-watch-opportunities

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

What

Issue-watch path A (slice of #699) + the #186 fix, in one PR because both hinge on reading an issue's author association + labels to classify its reward-multiplier tier and whether it's a real outside-contributor target.

Multiplier-aware opportunity ranking (#699)

ContributorOpportunity now carries:

  • multiplierTier: maintainer_created | community — maintainer-CREATED issues typically carry the biggest Gittensor reward multiplier, so a miner should grab them before anyone else.
  • availability: ready | maintainer_wip — a maintainer's own in-progress/internal-labelled issue is not an open target.

Ranking behaviour in buildContributorOpportunities:

  • Grabbable maintainer-created issue → +12 score boost, a "highest contribution multiplier" reason, and a confirm-scope warning. It now outranks an equivalent community issue with the same labels/lane.
  • Maintainer-WIP/internal issue → -45 penalty, forced fit: "hold", and a "not a recommended outside-contributor target" warning.

Maintainer-intent issue quality (closes #186)

buildIssueQualityReport previously ignored authorAssociation, so a maintainer-authored issue could silently read "ready". Now:

  • Every maintainer-authored issue gets a confirm-scope warning.
  • A maintainer-authored WIP/internal issue can never read ready (downgraded to needs_proof).
  • A clean maintainer-created issue still reads ready — it's the prime high-multiplier target, just flagged to confirm intent.

Shared MAINTAINER_WIP_LABELS + isMaintainerWipIssue() helper back both paths; OpenAPI ContributorOpportunity schema extended with the two new enums.

Why

Miners need to spot and grab maintainer-created issues early (biggest multiplier) without being steered onto a maintainer's own active work. This is the deterministic, gittensor-native signal a miner's harness can't compute itself — it flows through the existing decision-pack + gittensory_get_decision_pack MCP surface automatically.

Tests

  • signals.test.ts: maintainer-created > community > WIP ranking, tier/availability, reasons/warnings, forced hold.
  • issue-quality.test.ts: confirm-warning on maintainer-authored; maintainer-WIP never ready.
  • Full suite + 97% branch coverage gate green; typecheck + workers tests pass.

Advances #699 (path A: the pull surface). Delivery (gittensory_watch_issues + push via #535) remains for the rest of #699.

…nt issue quality (#699, closes #186)

Issue-watch path A: enrich cross-repo contributor opportunities so miners can
grab the highest-value issues first, and stop steering them at a maintainer's
own work.

- ContributorOpportunity gains `multiplierTier` (maintainer_created | community)
  and `availability` (ready | maintainer_wip). Maintainer-CREATED grabbable
  issues carry the biggest Gittensor reward multiplier, so they get a score
  boost + a "highest contribution multiplier" reason and rank above equivalent
  community issues; a maintainer's own WIP/internal-labelled issue is heavily
  penalised, forced to `hold`, and flagged not-recommended.
- buildIssueQualityReport now reads authorAssociation (#186): every
  maintainer-authored issue gets a confirm-scope warning, and maintainer-WIP
  issues can never read "ready" (downgraded to needs_proof). A clean
  maintainer-created issue still reads ready — it's the prime target.
- New MAINTAINER_WIP_LABELS + isMaintainerWipIssue() helper shared by both.
- OpenAPI ContributorOpportunity schema extended with the two new enums.
- Tests: ranking (maintainer-created > community > WIP) and the #186
  confirm-warning / never-ready-WIP invariants.
@ghost

ghost commented Jun 14, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #706 is no longer open. No action.

💰 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.

@ghost ghost added the gittensory:reviewed label Jun 14, 2026
@ghost

ghost commented Jun 14, 2026

Copy link
Copy Markdown

gittensory · advisory review

Reviewed 6 changed file(s) — two independent AI reviewers.

Suggested action: 🔍 Manual review. The changed route's preview could not be captured — review the rendered page manually before merging.

Reviewer A · gpt-oss-120b — recommends ✅ merge
The PR introduces multiplier‑aware private context by adding multiplierTier and availability to contributor opportunities, updates the scoring logic, OpenAPI schema, and adds comprehensive tests. The implementation is clean, respects the public‑private boundary, and all new behavior is covered by tests.

Suggestions

  • Document the new fields in the API changelog and consider a minor version bump for downstream consumers.
  • Update any UI components that consume ContributorOpportunity to handle the new properties gracefully.
  • Add a test case verifying that the multiplierBoost correctly influences the final score (e.g., a maintainer‑created issue scores higher than a comparable community issue).

Worth double-checking

  • Existing API clients may break if they do not expect the new required fields; ensure versioning or backward compatibility handling.
  • Score adjustments (boost/penalty) could push scores outside expected ranges; confirm clamping works as intended across edge cases.

Reviewer B · mistral-small-3.1-24b-instruct — recommends ✅ merge
This PR introduces a new private context system for contributor opportunities based on maintainer intent and issue quality. It adds new fields to the ContributorOpportunity type and updates the scoring logic to prioritize maintainer-created issues while downgrading maintainer WIP issues. The changes are well-documented and include comprehensive tests.

Suggestions

  • Consider adding a comment to explain the rationale behind the specific multiplier values (e.g., 12 for multiplierBoost and 45 for maintainerWipPenalty).
  • Ensure that the new fields multiplierTier and availability are properly documented in the API documentation.

Worth double-checking

  • Verify that the new scoring logic does not introduce any regressions in the private context of issues.
  • Check that the new fields are correctly handled in all parts of the codebase that interact with ContributorOpportunity.
  • Ensure that the tests cover all edge cases, especially those involving maintainer-authored issues with various labels.

Warning

Could not capture a preview of the changed route(s) — review the rendered page manually before merging.

Before = production · After = this PR's preview deploy.

Route Viewport Before After
/ desktop before desktop after desktop
mobile before mobile after mobile

@ghost ghost added the gittensory-review label Jun 14, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 14, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 0a1e2da Commit Preview URL

Branch Preview URL
Jun 14 2026, 09:59 AM

@JSONbored
JSONbored merged commit 21bb0f3 into main Jun 14, 2026
12 checks passed
@JSONbored
JSONbored deleted the feat/issue-watch-opportunities branch June 14, 2026 10:00
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 14, 2026
JSONbored added a commit that referenced this pull request Jun 14, 2026
…sues (#699 path B) (#735)

Miners subscribe to repos for NEW grabbable, high-multiplier issues; when one
opens, the watchers are notified through the #535 pipeline. Completes the active
half of #699 (path A shipped the pull surface in #706).

- issue_watch_subscriptions table (migration 0036) + repositories CRUD (upsert
  idempotent on login+repo, list-for-login, delete, list-watchers-for-repo);
  labels lowercased for case-insensitive filtering.
- engine: export isGrabbableHighMultiplierIssue (open + maintainer-created + not
  WIP) — the exact condition path A ranks up.
- notifications/service: detectIssueWatchEvents fans out one event per matching
  watcher (label filter; skips the issue's own author), DB-backed so it sits
  alongside the pure detectNotificationEvents; buildIssueWatchNotification
  (public-safe "open to grab" copy). New eventType issue_watch_match (its
  pullNumber field carries the issue number).
- processors: the issue-opened webhook path detects watch events and fans them
  into the existing notify-evaluate enqueue loop.
- MCP gittensory_watch_issues (watch/unwatch/list, self-scoped) — the miner
  surface; matches surface through gittensory_list_notifications.

Tests: grabbable-issue logic, subscription CRUD, fan-out detection (label filter
/ author-skip / no-author edge), public-safe copy, the dispatch, the MCP tool
(incl. self-scope), and the webhook end-to-end. 97% coverage held.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Maintainer-authored issues can be scored ready for outside contributors

1 participant