Skip to content

test(miner-discovery): end-to-end Phase 1 pipeline fixture (#2311)#3756

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kiannidev:test/miner-discovery-pipeline-2311
Jul 6, 2026
Merged

test(miner-discovery): end-to-end Phase 1 pipeline fixture (#2311)#3756
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kiannidev:test/miner-discovery-pipeline-2311

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Adds test/integration/miner-discovery-pipeline.test.ts exercising the composed Phase-1 discovery path: AI-policy hard-skip, metadata fan-out, goal-model lane fit, freshness decay, and duplicate-title dupRisk through rankCandidateIssuesWithSummary.
  • Pins exact ranked owner/repo#issueNumber order with literal array equality and asserts the banned repo costs exactly one policy-doc fetch (no issue listing).
  • Doc comment at file top clarifies this is cross-module regression protection; per-module edge cases stay in the unit test siblings.

Closes #2311

Conflict avoidance

Touches only test/integration/miner-discovery-pipeline.test.ts — no overlap with open PRs (#3754 signals, #3753 enrichment, #3752 selfhost, #3741 deps, #3724 dart, #3721 processors, #3712 visual, #3704 calibration, #3698 queue).

Test plan

  • npx vitest run test/integration/miner-discovery-pipeline.test.ts
  • npm run typecheck

Made with Cursor

…ONbored#2311)

Pin composed fan-out, AI-policy skip, goal-model lane fit, freshness, and dupRisk ordering in one integration test.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev requested a review from JSONbored as a code owner July 6, 2026 07:40
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 6, 2026
@loopover-orb

loopover-orb Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-06 08:02:57 UTC

1 file · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This diff adds a single new integration test file exercising the composed Phase-1 discovery pipeline (AI-policy hard-skip → fan-out → goal-model lane fit → freshness → dupRisk) through the real fetchCandidateIssuesWithSummary and rankCandidateIssuesWithSummary implementations, only stubbing global fetch and the engine package. It pins exact ranked owner/repo#issue ordering and asserts the banned repo incurs exactly one policy-doc fetch and zero issue-listing calls, which is a meaningful regression guard against silent policy-skip regressions. CI passed (including this test), so the referenced fixtures (banned-ai-usage.md, allowed-silent.md) and the exact ordering/laneFit/freshness/dupRisk values are already verified against the real production code paths rather than fabricated.

Nits — 5 non-blocking
  • The freshness comparison at the bottom (`ranked.issues[4]?.freshness ?? 1) < (ranked.issues[1]?.freshness ?? 0`) uses mismatched fallback defaults (1 vs 0), so if either index were ever undefined the assertion could pass/fail for the wrong reason instead of throwing — consider asserting both entries are defined first.
  • The single `it` block packs five distinct concerns (hard-skip, fan-out order, lane fit, freshness, dupRisk) into one test with ~10 assertions; splitting into a couple of scoped `it`s would make future failures easier to localize.
  • Literal array-equality pinning of ranked order (as the doc comment acknowledges) is inherently brittle to ranker tuning changes — worth a one-line comment noting that intentional ranker changes should update this fixture rather than being treated as a regression.
  • Add a brief comment near the final assertions clarifying why index 2 (`acme/widgets#50`, the first of the duplicate-titled pair) rather than index 3 is expected to carry the dupRisk credit, since duplicate-detection order isn't otherwise obvious from the test body.
  • Consider extracting the repeated `url.includes(...)` fetch-routing block into a small named fixture/table if more integration tests will follow this same mocking pattern, to keep future additions DRY.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2311
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 (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 1505 registered-repo PR(s), 790 merged, 47 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 1505 PR(s), 47 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: TypeScript, MDX, C++, HTML, Rust
  • Official Gittensor activity: 1505 PR(s), 47 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.30%. Comparing base (9c39db2) to head (f0b3d32).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3756   +/-   ##
=======================================
  Coverage   93.30%   93.30%           
=======================================
  Files         317      317           
  Lines       32365    32365           
  Branches    11874    11874           
=======================================
  Hits        30197    30197           
  Misses       1537     1537           
  Partials      631      631           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 5cbc5aa into JSONbored:main Jul 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(miner-discovery): end-to-end fixture-driven discovery scenario across the full Phase 1 pipeline

1 participant