Skip to content

feat(scoring): explain issue-discovery validity floor in score breakdown#2003

Closed
bohdansolovie wants to merge 4 commits into
JSONbored:mainfrom
bohdansolovie:feat/score-breakdown-issue-discovery-history
Closed

feat(scoring): explain issue-discovery validity floor in score breakdown#2003
bohdansolovie wants to merge 4 commits into
JSONbored:mainfrom
bohdansolovie:feat/score-breakdown-issue-discovery-history

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

Supersedes #1979 and #1984.

Test plan

  • npx vitest run test/unit/score-breakdown.test.ts (18 tests)
  • Unobserved history → neutral breakdown
  • Meets floor → full band with actionable lever
  • Below floor → blocked band, highest-leverage lever surfaced
  • Inactive linked-issue mode with history supplied → neutral
  • Partial history (valid solved only / credibility only) → neutral with distinct copy

Made with Cursor

@bohdansolovie bohdansolovie requested a review from JSONbored as a code owner July 1, 2026 07:43
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 1, 2026
@gittensory-orb

gittensory-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - reject/close recommended

Review updated: 2026-07-01 11:38:43 UTC

5 files · 1 AI reviewer · 1 blocker · readiness 73/100 · CI green · dirty

🛑 Suggested Action - Reject/Close

  • AI reviewers agree on a likely critical defect: .github/workflows/ci.yml:151 makes the coverage upload best-effort for fork PRs, but .github/workflows/ci.yml:223-239 shows the only required aggregate `validate` job depends on `validate-code` rather than the external Codecov status, so a fork PR can pass the required gate without patch coverage data
  • keep `fail_ci_if_error: true` here or make `validate` fail when the coverage upload cannot complete. — Resolve the flagged defect, or override if the AI reviewers are mistaken, then re-run the gate.

Review summary
The score-breakdown addition follows the preview invariants by keeping the new issue-discovery history component neutral until linked-issue mode and both history fields are present, and it sanitizes the public summaries through the existing explainScoreBreakdown path. The PR also changes CI policy in the same diff, and that part breaks the repository’s documented coverage gate by allowing the required aggregate check to pass after a fork coverage upload failure. The scoring tests cover the main new branches, but the workflow change is unrelated to the stated feature and weakens a hard gate.

Blockers

  • .github/workflows/ci.yml:151 makes the coverage upload best-effort for fork PRs, but .github/workflows/ci.yml:223-239 shows the only required aggregate `validate` job depends on `validate-code` rather than the external Codecov status, so a fork PR can pass the required gate without patch coverage data; keep `fail_ci_if_error: true` here or make `validate` fail when the coverage upload cannot complete.
Nits — 6 non-blocking
  • nit: test/unit/codecov-policy.test.ts:59 now only checks that the expression contains `fork` and `pull_request`, which is too weak to lock the intended CI policy; assert the exact expression or the fail-closed behavior instead.
  • nit: test/unit/score-breakdown.test.ts:174 and test/unit/score-breakdown.test.ts:186 have over-indented object literals in the `buildScorePreview` calls, which makes the new test block harder to scan.
  • nit: src/services/score-breakdown.ts:160 returns `leverageScore: 8` for the passing issue-discovery history floor while merged history uses `5`; align these neutral/full floor scores unless there is a reason this lever should outrank the older history floor.
  • Revert the `.github/workflows/ci.yml` `fail_ci_if_error` relaxation in this PR; if fork Codecov behavior needs a policy change, split it into a separate CI PR with an aggregate-gate design that still fails closed on missing patch data.
  • In `test/unit/codecov-policy.test.ts`, replace the substring checks with an exact assertion for the required upload policy so future edits cannot accidentally preserve the words while changing the behavior.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.

Why this is blocked

  • .github/workflows/ci.yml:151 makes the coverage upload best-effort for fork PRs, but .github/workflows/ci.yml:223-239 shows the only required aggregate `validate` job depends on `validate-code` rather than the external Codecov status, so a fork PR can pass the required gate without patch coverage data; keep `fail_ci_if_error: true` here or make `validate` fail when the coverage upload cannot complete.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ✅ Linked #1984
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (size label size:M; 1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 139 registered-repo PR(s), 73 merged, 20 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 139 PR(s), 20 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: bohdansolovie
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: Python, C++, JavaScript
  • Official Gittensor activity: 139 PR(s), 20 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

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

  • Re-run Gittensory review

@gittensory-orb gittensory-orb Bot added gittensor Gittensor contributor context gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 1.25x multiplier. labels Jul 1, 2026
bohdansolovie and others added 3 commits July 1, 2026 10:26
Surface the upstream MIN_VALID_SOLVED_ISSUES / MIN_ISSUE_CREDIBILITY gate
in explainScoreBreakdown with the same neutral/full/blocked pattern used for
merged-PR history, so linked-issue previews show an actionable lever.

Co-authored-by: Cursor <cursoragent@cursor.com>
Handle inactive linked-issue mode and partial history inputs explicitly
so breakdown wording matches upstream gating in preview.ts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fork workflows cannot read CODECOV_TOKEN, so protected-branch uploads fail
with "Token required". Only fail CI on upload errors for trusted runs
(main pushes and upstream-repo PRs).

Co-authored-by: Cursor <cursoragent@cursor.com>
Tie score-breakdown expectations to the same sanitizer used at export
time so raw "credibility" multiplier copy and public "private context"
output are tested as one contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 0.00%. Comparing base (5e82d8e) to head (7b9f892).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #2003       +/-   ##
==========================================
- Coverage   95.69%       0   -95.70%     
==========================================
  Files         222       0      -222     
  Lines       24584       0    -24584     
  Branches     8923       0     -8923     
==========================================
- Hits        23526       0    -23526     
+ Misses        433       0      -433     
+ Partials      625       0      -625     

see 222 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

See blockers as well as merge conflicts, closing.

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

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 1.25x multiplier. gittensor Gittensor contributor context size:M This PR changes 30-99 lines, ignoring generated files.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants