Skip to content

Fix flaky findings test caused by random request ID - #968

Merged
eizedev merged 1 commit into
eizedev:mainfrom
harshita-jangra:fix-mcp-findings-request-id-regex
Nov 26, 2026
Merged

eizedev merged 1 commit into
eizedev:mainfrom
harshita-jangra:fix-mcp-findings-request-id-regex

Conversation

@harshita-jangra

@harshita-jangra harshita-jangra commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #960

  • Anchor the regex to match only the intended phrases 60 of or 50 of.
  • Prevent random request IDs containing 60 or 50 from causing false test failures.
  • No production code or application behavior changed.

Whole-change check

Code: packages/pivotkit-mcp/test/findings.test.js

  • The changed assertion checks that the response text does not contain the unintended count wording
  • Updated the regex to match the complete intended phrase instead of matching 60 or 50 anywhere in the response.
  • No helper or new function was needed; the existing assertion is sufficient.
  • The rest of the test remains unchanged because the issue is limited to the regex matching logic.

Checklist

Test plan

  • npm test -w pivotkit-mcp — 106 passed, 0 failed
  • npm run lint — passed
  • npm run types — passed
  • git diff --check — passed
  • npm run growth

Neutral review

Not run: a one-line, test-only change. I checked it myself instead: with the change applied to main, npm test -w pivotkit-mcp passed three runs in a row (106 passed, 0 failed), and the new pattern still matches "60 of" and "50 of" but no longer a request id like RKgf9eaE360.

@eizedev
eizedev merged commit 802ef6a into eizedev:main Nov 26, 2026
27 of 28 checks passed
@eizedev

eizedev commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Merged, thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp findings test fails when the random request id contains 60

2 participants