After some research and reading others people situations I concluded that I should be filling the form as a resident alien (since the W-4 should reflect my state for end of the year)
Resident Aliens
If you are a resident alien, the rules for filing income, estate, and gift tax returns and paying estimated tax are generally the same whether you are in the United States or abroad. Your worldwide income is subject to U.S. income tax the same way as an U.S. citizen. You are a resident alien of the United States for tax purposes if you meet either the green card test or the substantial present test for the calendar year.
I pass the presence test, given the condition:
- 2016: 244 days since arrival
- 2015: 120 days in US (counts 1/3)
- Total presence: 284 which is more than 183 required
Substantial Presence Test
You will be considered a United States resident for tax purposes if you meet the substantial presence test for the calendar year. To meet this test, you must be physically present in the United States (U.S.) on at least: 31 days during the current year, and 183 days during the 3-year period that includes the current year and the 2 years immediately before that, counting: All the days you were present in the current year, and 1/3 of the days you were present in the first year before the current year, and 1/6 of the days you were present in the second year before the current year.
https://www.irs.gov/Individuals/International-Taxpayers/Substantial-Presence-Test
Giving that situation, I can fill jointly with my wife, either she's being a non-resident or resident. Let's aim for the worst case, where she would not be a resident by that time, we have this alternative.
Nonresident Spouse Treated as a Resident
Election to File Joint Return
If, at the end of your tax year, you are married and one spouse is a U.S. citizen or a resident alien and the other is a nonresident alien, you can choose to treat the nonresident as a U.S. resident. This includes situations in which one of you is a nonresident alien at the beginning of the tax year, but a resident alien at the end of the year, and the other is a nonresident alien at the end of the year.
https://www.irs.gov/Individuals/International-Taxpayers/Resident-Aliens
Other resources: