Skip to content

feat(review): surface generate-tests command inline in the review comment - #4586

Merged
JSONbored merged 1 commit into
mainfrom
feat/e2e-testgen-review-comment-cta
Jul 10, 2026
Merged

feat(review): surface generate-tests command inline in the review comment#4586
JSONbored merged 1 commit into
mainfrom
feat/e2e-testgen-review-comment-cta

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Epic Epic: AI-generated E2E test coverage for pull requests #4189 (AI-generated E2E test coverage) is code-complete — @gittensory generate-tests and the
    manifest_missing_tests auto-trigger both work — but nothing in ORB's own review comment ever told a
    maintainer the command exists. A maintainer would have to already know it from documentation.
  • CodeRabbit's own equivalent avoids this exact gap: their "Generate unit tests" affordance is a
    checkbox inside their own PR walkthrough comment, not a separate dashboard toggle — discoverable at
    the point a maintainer is already looking.
  • publicSafeManifestPolicyFinding (src/queue/processors.ts) now accepts an optional
    { e2eTestGenAvailable } and, only for the manifest_missing_tests finding and only when the
    e2eTests converged feature is actually enabled for the repo, appends a short CTA to that finding's
    rendered action text: "Maintainers can also comment @gittensory generate-tests for an AI-generated
    Playwright test."
  • The gating check (resolveConvergedFeature(env, manifest, "e2eTests", repoFullName)) is hoisted once
    and reused by the existing feat(review): auto-trigger E2E test generation on the manifest_missing_tests signal #4196 auto-trigger if immediately below it, rather than computed twice.
  • No new UI surface, no dashboard — text-only, inline in the comment ORB already posts. Byte-identical
    output for every repo that doesn't have e2eTests enabled.

Fixes #4583

Test plan

  • test/unit/public-safe-manifest-finding.test.ts: 2 new cases — CTA appended when
    e2eTestGenAvailable: true on manifest_missing_tests; CTA never leaks onto an unrelated finding
    code even when e2eTestGenAvailable: true — plus the 2 pre-existing cases (redaction, pass-through)
    continue to cover the default/omitted-options path unchanged
  • Full test/unit/queue.test.ts (768 tests, including the existing manifest_missing_tests auto-trigger (#4196) describe block) — all pass, confirming the hoisted e2eTestGenAvailable
    const is behavior-preserving for the auto-trigger
  • Verified via lcov branch data (BRDA) that both branches of the new if are exercised and no
    branch introduced by this diff is left uncovered
  • npx tsc --noEmit clean on this diff (a pre-existing, unrelated typecheck failure in
    test/unit/miner-attempt-log.test.ts predates this branch — confirmed via git diff origin/main
    showing zero changes to that file)
  • git diff --check clean; no drift against origin/main at push time
  • No generated artifacts invalidated (no API/OpenAPI, wrangler binding, Drizzle schema, selfhost
    env-read, or CLI command-surface changes)

…ment (#4583)

manifest_missing_tests already renders in ORB's own comment, but nothing there
told a maintainer the @gittensory generate-tests command exists -- mirrors
CodeRabbit's inline "Generate unit tests" walkthrough checkbox instead of a
separate dashboard toggle, gated on the same e2eTests feature check the
#4196 auto-trigger already uses so an unconfigured repo never sees a command
that would just bounce.

Fixes #4583
@JSONbored JSONbored self-assigned this Jul 10, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored
JSONbored merged commit dcf41b9 into main Jul 10, 2026
7 checks passed
@JSONbored
JSONbored deleted the feat/e2e-testgen-review-comment-cta branch July 10, 2026 06:17
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.12%. Comparing base (6e1493a) to head (1bfac9a).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4586   +/-   ##
=======================================
  Coverage   94.12%   94.12%           
=======================================
  Files         430      430           
  Lines       38167    38173    +6     
  Branches    13917    13919    +2     
=======================================
+ Hits        35924    35930    +6     
  Misses       1585     1585           
  Partials      658      658           
Files with missing lines Coverage Δ
src/queue/processors.ts 95.31% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat(review): surface @gittensory generate-tests inline in the review comment when tests are missing

1 participant