I work in CT and live in NY, how will my state tax looks like?

I live in NY , my wife also works and lives in NY. I work in CT and rent an apartment there. I back home when it is holiday or weekend.

I did search online to see what will my state tax looks like? It is said I should file CT state tax as nonresident, while get credit for my resident tax of my home state NY.

But my concern is when talking about 183 days rule, CT will turns out to be resident state( but I do not view it as my resident state, because my permanent home is still in NY and my wife is there.)  So in this case which rule is in control? 183 days or domicile ?

Thanks