Skip to content

test(mutation): bind ai-core shard to direct tests - #458

Merged
qnbs merged 1 commit into
mainfrom
fix/stryker-ai-core-test-selection
Aug 22, 2026
Merged

test(mutation): bind ai-core shard to direct tests#458
qnbs merged 1 commit into
mainfrom
fix/stryker-ai-core-test-selection

Conversation

@qnbs

@qnbs qnbs commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bind the services-ai-core Stryker shard to six explicit direct unit-test files.
  • Keep the mapping in authoritative stryker-scope.json and enforce it with the workflow policy test.
  • Prove the hosted shard selects and executes the intended tests without changing production behavior or thresholds.

Why

The Copilot and services-commands calibration runs showed that explicit module test selection is needed where related-test discovery is too narrow. This applies the same bounded approach to the Tier-A AI-core targets.

Validation

  • pnpm exec vitest run tests/unit/tooling/strykerWorkflowPolicy.test.ts — 3 passed.
  • node scripts/stryker-scope.mjs --selector services-ai-core — 6 targets validated.
  • pnpm run ci:prepush — passed sequentially.
  • Cloud force run 32568888182 on 68de883a: six test files discovered, 93 tests executed, 422 mutants; 302 killed, 101 survived, 1 timeout, 18 no-coverage, 34 ignored, 0 pending/errors; score 71.8%.
  • The force run produced a valid report and fail-closed aggregation. The red result is a genuine mutation-quality signal below the unchanged 75% threshold, not a missing-report, selection, or aggregation failure. Survivor hardening is a separate follow-up mutation-quality workstream.

Scope and non-goals

  • No production-code behavior changes.
  • No threshold, suppression-baseline, or mutation-scope expansion.
  • Full mutation execution remains cloud-only on the constrained workstation.
  • This PR proves deterministic test selection and report plumbing; it does not claim complete AI-core mutation quality.

Uncertainty

  • Survivor equivalence versus missing assertions requires the follow-up Tier-A mutation-quality analysis; this PR does not classify all 101 survivors.
  • The manual force workflow is intentionally separate from the ordinary PR CI graph.

Review coverage

  • CodeRabbit: rate-limited; no technical review comments returned.
  • CodeAnt AI: quality/SAST/SCA/SCR/Test Coverage passed.
  • Amazon Q Developer: approval/comment with no findings.
  • Graphite: check passed; no findings returned.
  • Sourcery: rate-limited; review guide present.
  • Outside-diff REST comments: 0.
  • GraphQL unresolved review threads: 0.

Definition of Done

  • Explicit services-ai-core test mapping is present and policy-tested.
  • Hosted execution proves all six mapped test files are selected.
  • Valid report and fail-closed aggregation are proven.
  • No threshold or suppression-baseline changes.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@codeant-ai

codeant-ai Bot commented Aug 22, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 68de883 Aug 22, 2026 · 10:55 10:58

@codeant-ai

codeant-ai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @qnbs, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldscript-studio Ready Ready Preview Aug 22, 2026 10:55am

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Your free Security trial is over. An organization admin can activate billing to continue.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in: 11 minutes

Limit details: You’ve used the included review currently available. Your 84 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0bf3ed52-4b25-4f26-80c3-5c33d9af77eb

📥 Commits

Reviewing files that changed from the base of the PR and between 9a56f90 and 68de883.

📒 Files selected for processing (2)
  • stryker-scope.json
  • tests/unit/tooling/strykerWorkflowPolicy.test.ts

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds an explicit Stryker mutation-test mapping for the services-ai-core shard to its six direct unit-test files and enforces this mapping via the existing workflow policy test so selection remains bounded and deterministic for Tier-A AI-core targets.

File-Level Changes

Change Details Files
Define and persist explicit test-file bindings for the services-ai-core Stryker shard.
  • Add services-ai-core entry to the Stryker scope configuration with a fixed list of six direct unit-test files.
  • Keep the mapping in the canonical mutation-scope JSON to drive selector behavior and future automation.
stryker-scope.json
Extend the Stryker workflow policy test suite to assert the new services-ai-core mapping.
  • Add an expectation that the services-ai-core selector returns a single mutation module.
  • Verify that the services-ai-core mutation module is bound to the six specified unit-test files, preventing fallback to weak related-test discovery.
  • Maintain existing assertions for tier-a and services-commands selectors to confirm there is no regression in other shard policies.
tests/unit/tooling/strykerWorkflowPolicy.test.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codeant-ai codeant-ai Bot added the size:S This PR changes 10-29 lines, ignoring generated files label Aug 22, 2026
@codeant-ai

codeant-ai Bot commented Aug 22, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 68de883a
Scan Time: 2026-08-22 11:07:04 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED Rating S: No issues

View Full Results

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR correctly binds the services-ai-core Stryker shard to its six direct unit test files. The implementation follows the established pattern used for services-commands and copilot modules, with proper test validation to prevent configuration drift. All specified test files exist and correctly map to their corresponding source files under mutation.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@qnbs
qnbs merged commit fded1e2 into main Aug 22, 2026
34 of 36 checks passed
@qnbs
qnbs deleted the fix/stryker-ai-core-test-selection branch August 22, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant