Skip to content

test(enrichment): cover extractFunctionParams multi-line and TS param shapes - #3407

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
dhgoal:test/doc-comment-drift-coverage
Jul 5, 2026
Merged

test(enrichment): cover extractFunctionParams multi-line and TS param shapes#3407
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
dhgoal:test/doc-comment-drift-coverage

Conversation

@dhgoal

@dhgoal dhgoal commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Hardens unit coverage for the doc-comment-drift analyzer's pure extractFunctionParams helper. Its two existing tests only feed single-line signatures, leaving several real branches uncovered — this adds four:

  • a multi-line signature (exercises extractParamSource's line-walking) → params still extracted
  • a rest parameter (...rest) → the ... marker is stripped, the name kept
  • TS type annotations and default values (a: string, b = 5) → stripped down to the plain names
  • a TS this pseudo-parameter → skipped, keeping the real args

Test-only, against the compiled dist/, in the analyzer's own test file. No source or shared-registry change.

No linked issue — branch-coverage hardening of a pure function; no runtime behavior change.

Scope

  • Conventional Commit; focused; touches only review-enrichment/test/doc-comment-drift.test.ts. No site//CNAME/**/lovable/**; no CHANGELOG.md.

Validation

  • npm --prefix review-enrichment test — full suite green (build + sourcemap validate + metadata --check + node tests; exactly CI). Each new assertion was traced against extractParamSource/parseFunctionParams and confirmed.
  • git diff --check clean.

Safety

  • Test-only, no runtime change. No secrets/wallets/hotkeys/trust/reward terms.

… shapes

The two existing tests only fed single-line signatures. Adds the uncovered
branches: a multi-line signature (extractParamSource's line walk), a rest
parameter (`...` stripped), TS type annotations and default values stripped to
names, and a `this` pseudo-parameter skipped. Test-only.
@dhgoal
dhgoal requested a review from JSONbored as a code owner July 5, 2026 06:26
@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

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 06:24:59 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This is a focused test-only change that adds end-to-end coverage for `extractFunctionParams` over multi-line signatures, rest params, TS annotations/defaults, and the `this` pseudo-parameter. The new assertions exercise the helper through the compiled analyzer entry point and align with the existing `parseFunctionParams` expectations already present in this file. No runtime code, schema, or wiring changes are introduced, and the added cases are coherent with the PR description.

Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
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 (no linked issue context).
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: 69 registered-repo PR(s), 42 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor dhgoal; Gittensor profile; 69 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: dhgoal
  • 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: 69 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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

@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 92bc42f into JSONbored:main Jul 5, 2026
6 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.

1 participant