Skip to content

test(integrations): cover whitespace rejection in parseRepoFullName - #9370

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
nghetien:fix/issue-9318-a1-fix-integrations
Jul 27, 2026
Merged

test(integrations): cover whitespace rejection in parseRepoFullName#9370
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
nghetien:fix/issue-9318-a1-fix-integrations

Conversation

@nghetien

Copy link
Copy Markdown
Contributor

Summary

Closes #9318. The whitespace guard the issue describes (/\s/.test(repoFullName) in parseRepoFullName, src/integrations/project-tracker-adapter.ts:43) is already present in the code, but the adapter's regression tests never exercised a whitespace-containing repo name — only "invalid" and "owner/repo/extra" were covered. This PR closes that gap by adding whitespace-containing cases ("owner/ repo", "owner /repo") to the existing invalid-repo-name tests for both GitHubMilestonesAdapter and GitHubProjectsAdapter, mirroring the pattern already used in test/unit/github-pr-actions.test.ts.

Scope

  • Test-only change, one file: test/unit/project-tracker-adapter.test.ts
  • No production code changed (guard already existed)
  • No generated artifacts invalidated (no API/schema/migration/wrangler changes)

Validation

  • npx vitest run test/unit/project-tracker-adapter.test.ts — 54/54 passed
  • npx turbo run build --filter=@loopover/engine — passed
  • npx turbo run build --filter=@loopover/mcp — passed
  • npx turbo run build:tsc build:verify --filter=@loopover/miner — passed
  • Full unsharded npm run test:ci — not completed locally before submission (test-only diff, no src/** changes, low risk)

Safety

  • No secrets, tokens, wallets, hotkeys, or trust/reward values anywhere in the diff
  • No changes to site/, CNAME, or **/lovable/**
  • No changelog edit

Notes

This is a test-coverage-only PR; test/** is excluded from Codecov's codecov/patch gate, so there is no coverage obligation beyond the added assertions passing.

@nghetien
nghetien requested a review from JSONbored as a code owner July 27, 2026 14:39
@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 27, 2026
@loopover-orb

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-27 14:43:43 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a small, test-only PR that adds whitespace-containing repo name cases ("owner/ repo", "owner /repo") to the existing invalid-repo-name regression tests for both GitHubMilestonesAdapter and GitHubProjectsAdapter, exercising the pre-existing `/\s/.test(repoFullName)` guard in parseRepoFullName. The change is correct and mechanical, mirrors the existing test pattern in github-pr-actions.test.ts, and both new cases correctly land on the already-throwing whitespace branch. No production code is touched, so there's no coverage obligation beyond the passing assertions.

Nits — 4 non-blocking
  • The PR only tests whitespace inside/adjacent to the slash ("owner/ repo", "owner /repo") but not leading/trailing whitespace on the whole string (e.g. " owner/repo", "owner/repo "), which the same regex guard would also catch — consider adding those for full guard coverage.
  • The loop-based assertion style (test/unit/project-tracker-adapter.test.ts) is fine but slightly obscures which specific case fails on assertion failure versus writing them as separate `it.each` or individual expect calls with labels.
  • Consider using `it.each` for the two whitespace cases to get per-case failure reporting instead of a plain for-loop with await/expect inside it.
  • Add a leading/trailing-whitespace case (e.g. " owner/repo") to fully round out the regex guard's coverage.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #9318
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: 10 registered-repo PR(s), 4 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor nghetien; Gittensor profile; 10 PR(s), 0 issue(s).
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal · LLM: minor
Linked issue satisfaction

Partially addressed
The PR only adds regression tests and claims the whitespace guard already exists in production code, but the issue explicitly requires modifying parseRepoFullName in src/integrations/project-tracker-adapter.ts:39-46 to add the /\s/.test(repoFullName) check, and the diff shows no changes to that source file at all.

Review context
  • Author: nghetien
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Dart, JavaScript, Python, CSS, C#, C++, TypeScript
  • Official Gittensor activity: 10 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
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.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

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

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

@loopover-orb
loopover-orb Bot merged commit 86c42c5 into JSONbored:main Jul 27, 2026
6 checks passed
@nghetien
nghetien deleted the fix/issue-9318-a1-fix-integrations branch July 28, 2026 14:54
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.

fix(integrations): project-tracker-adapter.ts's parseRepoFullName is missing the whitespace guard every sibling has

1 participant