René's URL Explorer Experiment


Title: fix(rerun): send project-relative spec paths to remote on re-run [SDK-7124] by anish353 · Pull Request #1173 · browserstack/browserstack-cypress-cli · GitHub

Open Graph Title: fix(rerun): send project-relative spec paths to remote on re-run [SDK-7124] by anish353 · Pull Request #1173 · browserstack/browserstack-cypress-cli

X Title: fix(rerun): send project-relative spec paths to remote on re-run [SDK-7124] by anish353 · Pull Request #1173 · browserstack/browserstack-cypress-cli

Description: Summary Follow-up to #1157 on the same ticket. That PR made the CLI select the right specs on a TRA "re-run failed tests"; this one makes the remote machines actually run them. BROWSERSTACK_RERUN_TESTS arrives as bare filenames ("FO-E2E-02.ts, FO-E2E-05.ts"). run_settings is forwarded to the BrowserStack machines verbatim (capabilityHelper.js → obj.run_settings = JSON.stringify(bsConfig.run_settings)), and a bare filename does not resolve against the project root there — so Cypress exits having run no spec at all: Cypress could not run any of the specs in the build since an exception occurred. getNumberOfSpecFiles already resolves those entries against cypressProjectDir (it globs with matchBase: true, which is why the machine count is correct), but it only persisted the resolved list back to run_settings.specs under turboScaleSession. For a normal run the remote kept receiving the unresolvable basenames. What lands here File Change bin/helpers/utils.js New isReRunSpecsSession() — the 3-part observability re-run predicate, now shared by setUserSpecs and getNumberOfSpecFiles so the two cannot drift apart. getNumberOfSpecFiles persists the already-resolved, project-relative paths to run_settings.specs on a re-run. test/unit/bin/helpers/utils.js Regression tests: the re-run case rewrites basenames to project-relative paths; a non-re-run session leaves specs untouched. Scoped deliberately: this is an else if on the re-run predicate, not a blanket write-back. A plain --spec glob (e.g. cypress/tests/FlightOffer/*) is still forwarded verbatim rather than being expanded into an explicit file list. Verification Reproduced and verified on real BrowserStack builds with a 5-spec suite (3 passing / 2 failing), using the customer's command shape (--sync --spec "cypress/tests/FlightOffer/*"): Run CLI BROWSERSTACK_RERUN_TESTS Result Build 1 1.36.17 — (baseline) 3 passed / 2 failed 0519457f… 2 1.36.17 absent all 5 re-ran (the reported symptom) 75c45973… 3, 5 1.36.17 basenames 2 machines picked, 0 specs executed — deterministic 2/2 1e9ce9bf…, a6b73ce4… 4 1.36.17 project-relative paths exactly the 2 failed specs ran f5440dfc… 7 this branch basenames (identical input to 3/5) exactly the 2 failed specs ran, Total tests: 2 e0786caf… Runs 3/5 → Run 7 is the broken→fixed transition on identical input. Test plan New regression unit tests on getNumberOfSpecFiles — re-run path rewrites to project-relative paths; non-re-run path unchanged. Full test/unit/bin/helpers/utils.js suite: 393 passing on this branch vs 391 on a clean master checkout. The 5 failing (setLocalArgs / setNodeVersion / getVideoConfig ×3) are pre-existing and unrelated — present on clean master too (verified via git stash). In-process check against the real exported functions, including two control cases: a normal --spec glob is preserved verbatim and still matches all 9 specs; a run with no --spec still yields specs: null. Live build with the patched CLI (Run 7 above). Notes / scope Backward compatible: only the observability re-run path is affected; normal runs and TurboScale are untouched. Windows-safe: separators are normalised to /, matching the existing TurboScale branch. Complements #1157 — that PR normalised the comma+space separator, this one resolves the filenames to paths. Both are needed for a re-run to scope correctly end to end. Related, outside this repo: for GitHub Actions the failed-spec env only reaches the runner if the workflow runs browserstack/github-actions/setup-env (v1.0.2+) with a github-token input — GitHub's native re-run API cannot inject env vars. That is a workflow/docs gap tracked separately on the ticket. Release minor patch — bug fix only. Release notes: Fixed BrowserStack "re-run failed tests" on Cypress running the full suite or failing with "could not run any of the specs" — the failed-spec list is now resolved to project-relative paths before it is sent to the BrowserStack machines. Fixes SDK-7124.

Open Graph Description: Summary Follow-up to #1157 on the same ticket. That PR made the CLI select the right specs on a TRA "re-run failed tests"; this one makes the remote machines actually run them. BROWSERSTA...

X Description: Summary Follow-up to #1157 on the same ticket. That PR made the CLI select the right specs on a TRA "re-run failed tests"; this one makes the remote machines actually run them. BR...

Opengraph URL: https://github.com/browserstack/browserstack-cypress-cli/pull/1173

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:255b84aa-173d-de09-231b-77d57e6648ec
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id89BC:298B00:812CF6:B5B817:6B04822C
html-safe-nonce442af11696e8f88f0e68a95b2555c39a62b8a5adf4346317c37025c7f51dbe65
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUJDOjI5OEIwMDo4MTJDRjY6QjVCODE3OjZCMDQ4MjJDIiwidmlzaXRvcl9pZCI6IjQ3NDU5MzIzMDExNjU0MjkyOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac766c4645c2797a727b64a72dd0038b90dcb9b3b08c3909529af518f60449d1ba
hovercard-subject-tagpull_request:4250283076
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
twitter:imagehttps://avatars.githubusercontent.com/u/239086185?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/239086185?s=400&v=4
og:image:altSummary Follow-up to #1157 on the same ticket. That PR made the CLI select the right specs on a TRA "re-run failed tests"; this one makes the remote machines actually run them. BROWSERSTA...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0366ddfb372682a32e92a5d86155cb08fa83e5bbe79953a968789f2f7e24c511
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/browserstack/browserstack-cypress-cli git https://github.com/browserstack/browserstack-cypress-cli.git
octolytics-dimension-user_id1119453
octolytics-dimension-user_loginbrowserstack
octolytics-dimension-repository_id242935045
octolytics-dimension-repository_nwobrowserstack/browserstack-cypress-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id242935045
octolytics-dimension-repository_network_root_nwobrowserstack/browserstack-cypress-cli
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseed3f2e01f6b7672780c586c8af0e72726374d7b6
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fpull%2F1173%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fpull%2F1173%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=browserstack%2Fbrowserstack-cypress-cli
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
browserstackhttps://github.com/browserstack
browserstack-cypress-clihttps://github.com/browserstack/browserstack-cypress-cli
Codehttps://github.com/browserstack/browserstack-cypress-cli
Issues28 (28)https://github.com/browserstack/browserstack-cypress-cli/issues
Pull requests47 (47)https://github.com/browserstack/browserstack-cypress-cli/pulls
Actionshttps://github.com/browserstack/browserstack-cypress-cli/actions
Projectshttps://github.com/browserstack/browserstack-cypress-cli/projects
Security and quality1 (1)https://github.com/browserstack/browserstack-cypress-cli/security
Insightshttps://github.com/browserstack/browserstack-cypress-cli/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fissues%2Fnew%2Fchoose
rahulpsqhttps://github.com/rahulpsq
masterhttps://github.com/browserstack/browserstack-cypress-cli/tree/master
fix/sdk-7124-rerun-spec-path-resolutionhttps://github.com/browserstack/browserstack-cypress-cli/tree/fix/sdk-7124-rerun-spec-path-resolution
Conversation 2 https://github.com/browserstack/browserstack-cypress-cli/pull/1173
Commits 1 https://github.com/browserstack/browserstack-cypress-cli/pull/1173/commits
Checks 5 https://github.com/browserstack/browserstack-cypress-cli/pull/1173/checks
Files changed https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
fix(rerun): send project-relative spec paths to remote on re-run [SDK-7124] https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#top
Show all changes 1 commit https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
304f9db fix(rerun): send project-relative spec paths to remote on re-run [SDK… anish353 Aug 11, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1173/commits/304f9db93a0f372af36e811d8dfd20a21069695f
Clear filters https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
utils.js https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
utils.js https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-41ff8fc1707dbf392b549c56f015ff286d23c8ae77019b78821c0836de339623
https://github.com/browserstack/browserstack-cypress-cli/blob/master/CODEOWNERS#L18
bin/helpers/utils.jshttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
View file https://github.com/browserstack/browserstack-cypress-cli/blob/304f9db93a0f372af36e811d8dfd20a21069695f/bin/helpers/utils.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1173/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
test/unit/bin/helpers/utils.jshttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-41ff8fc1707dbf392b549c56f015ff286d23c8ae77019b78821c0836de339623
View file https://github.com/browserstack/browserstack-cypress-cli/blob/304f9db93a0f372af36e811d8dfd20a21069695f/test/unit/bin/helpers/utils.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1173/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-41ff8fc1707dbf392b549c56f015ff286d23c8ae77019b78821c0836de339623
https://github.com/browserstack/browserstack-cypress-cli/pull/1173/files#diff-41ff8fc1707dbf392b549c56f015ff286d23c8ae77019b78821c0836de339623
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1173/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.