Skip to content

test(signals): extend repo-policy-compiler branch coverage - #3425

Closed
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:test/repo-policy-compiler-coverage-2102
Closed

test(signals): extend repo-policy-compiler branch coverage#3425
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:test/repo-policy-compiler-coverage-2102

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Fixes #2102

Summary

Extends test/unit/repo-policy-compiler.test.ts to cover remaining branches in compileRepoPolicyCompilerOutput:

  • Preferred direct-PR and issue-discovery lane summaries/titles
  • Issue-discovery lane inheriting direct-PR preferred paths
  • Issue-discovery publicNotes filtering lines containing "direct"
  • Default generatedAt when omitted + deterministic output for identical inputs
  • Label policy field shape and public-safe filtering of preferred labels/readiness warnings

Test plan

  • CI validate-code (vitest suite includes repo-policy-compiler.test.ts)

Made with Cursor

…#2102)

Cover preferred lane summaries, path inheritance, direct-note filtering, generatedAt default, and label policy shape.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 5, 2026 06:44
@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 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Caution

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

🛑 Gittensory review result - fixes required

Review updated: 2026-07-05 06:50:58 UTC

1 file · 1 AI reviewer · no blockers · readiness 80/100 · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This is test-only branch coverage for compileRepoPolicyCompilerOutput, covering lane preference summaries, lane note filtering, timestamp defaulting, deterministic fixed-time output, and label-policy shape. The visible tests drive parseFocusManifest and compileRepoPolicyCompilerOutput directly, so the added cases are scoped to the real compiler entrypoint rather than hand-built output objects. I do not see a production correctness defect in the diff itself.

Nits — 4 non-blocking
  • nit: test/unit/repo-policy-compiler.test.ts:121 uses non-null assertions after find(), which makes a missing lane fail with a less direct TypeError-style assertion path than an explicit existence check.
  • nit: test/unit/repo-policy-compiler.test.ts:147 says it proves determinism, but the deterministic equality check only covers the explicit generatedAt path while the defaulted timestamp path is only shape-checked.
  • test/unit/repo-policy-compiler.test.ts:121: split the lane lookup into an explicit expect(directLane).toBeDefined() before asserting title/summary so a lane-regression failure points at the missing lane.
  • test/unit/repo-policy-compiler.test.ts:147: either rename the test to clarify that only explicit generatedAt inputs are compared deterministically, or add a clock stub if you want to prove the default timestamp path deterministically too.

CI checks failing

  • validate
  • validate-code
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2102
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 ❌ 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: 267 registered-repo PR(s), 167 merged, 9 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 267 PR(s), 9 issue(s).
Gate result ✅ Passing No configured 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: not available
  • Official Gittensor activity: 267 PR(s), 9 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • 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

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
8917 1 8916 7
View the top 1 failed test(s) by shortest run time
test/unit/repo-policy-compiler.test.ts > compileRepoPolicyCompilerOutput > reuses direct-PR preferred paths on the issue-discovery lane and filters direct-tagged notes
Stack Traces | 0.0231s run time
AssertionError: expected [ …(3) ] to deeply equal [ 'Keep PRs narrow.' ]

- Expected
+ Received

  [
+   "Focus changes on maintainer-wanted areas: src/core/, lib/.",
+   "Link a tracked issue before opening a pull request.",
    "Keep PRs narrow.",
  ]

 ❯ test/unit/repo-policy-compiler.test.ts:135:35

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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.

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(signals): full-branch coverage for repo-policy-compiler compileRepoPolicyCompilerOutput

1 participant