I wouldn't call it a swerve, moreso a "the eagles are coming" moment of convenient writing. The main reason Sansa didn't tell Jon about LF/Vale is because the writers wanted a surprise 3-4 episodes later, after casual viewers forgot the detail. Then you add in a giant Vale army somehow managing to get past Moat Cailin without A) the Bolton force stopping them B) a raven being sent to Winterfell.
Furthermore the competence of characters fluctuates depending on when the show needs them to lose, die, etc. It's very similar to Walking Dead in that sense. I haven't seen the episode but I heard Jon acts stubborn, dismisses basic military strategy and walks into a trap. Just as Stannis was defeated by "20 good men"/surprised by an attack due to no outriders, Unsullied forget their military formation and fight man to man, Barristan gets murked by goons, etc. Need someone to die, turn them into a jobber.
That btw is the exact opposite of good characterization. And the opposite of Martin's style. Ned's character gets him killed, and his character is quite consistent. Dany's arrogance makes her a pretty good conqueror but a terrible ruler, and she fails pretty hard in Dance/S5-S6. Robb and Jon make fatal mistakes in an attempt to do what they believe is the honorable/right thing, like Ned. Meanwhile some characters improve after learning from a low point. Jaime being the best example.