Skip to content

test(enrichment): cover actions-pin analyzer#2396

Merged
JSONbored merged 2 commits into
JSONbored:mainfrom
Florcitaq:actions-pin-tests-2101
Jul 2, 2026
Merged

test(enrichment): cover actions-pin analyzer#2396
JSONbored merged 2 commits into
JSONbored:mainfrom
Florcitaq:actions-pin-tests-2101

Conversation

@Florcitaq

Copy link
Copy Markdown
Contributor

Closes #2101.

Summary

  • Add dedicated REES unit coverage for the GitHub Actions pin analyzer.
  • Cover mutable third-party tag/branch refs, full-SHA and official-action exclusions, quoted uses keys, ignored unchanged/removed/non-uses lines, line citations, and workflow-file filtering through scanActionPins.

Validation

  • npm ci --prefer-offline --no-audit --no-fund
  • npm run build
  • npx prettier --check test/actions-pin.test.ts
  • node --test --experimental-strip-types "test/actions-pin.test.ts"
  • npm run validate:sourcemaps
  • git diff --check

Known baseline: node scripts/generate-analyzer-metadata.mjs --check reports review-enrichment/analyzer-metadata.json stale on current main; this PR is test-only and does not update generated analyzer metadata.

@Florcitaq
Florcitaq requested a review from JSONbored as a code owner July 1, 2026 15:55
@dosubot dosubot Bot added the size:XS label Jul 1, 2026
@loopover-orb

loopover-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-02 04:23:43 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This test-only change adds focused coverage for the GitHub Actions pin analyzer, including mutable third-party refs, official/full-SHA exclusions, quoted `uses` keys, hunk line accounting, and workflow path filtering through `scanActionPins`. The assertions match the current analyzer implementation and exercise the real exported functions rather than fabricated wrapper behavior. I do not see a reachable correctness or contract break in the visible diff.

Nits — 2 non-blocking
  • review-enrichment/test/actions-pin.test.ts:75 could add a `scanActionPins` case for `files` being omitted or `undefined`, since the production entrypoint explicitly supports `req.files ?? []`.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2101
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:XS; 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: 0 registered-repo PR(s), 0 merged, 0 issue(s).
Contributor context ❌ No public Gittensor match Florcitaq; not a blocker.
Gate result ✅ Passing No configured blocker found.
Review context
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
  • Check active issues and PRs before submitting.
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

@Florcitaq

Copy link
Copy Markdown
Contributor Author

Addressed the Gittensory nit by adding a positive .github/workflows/*.yml fixture to the scanActionPins entrypoint coverage, alongside the existing .yaml fixture.

Re-ran:

  • npm run build
  • npx prettier --check test/actions-pin.test.ts
  • node --test --experimental-strip-types "test/actions-pin.test.ts"
  • git diff --check

@dosubot dosubot Bot added the lgtm label Jul 2, 2026
@JSONbored
JSONbored merged commit e30cd23 into JSONbored:main Jul 2, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

test(enrichment): unit coverage for the actions-pin workflow scanner

2 participants