Trellis deployment and branch confusion

Has anyone run into issues where it seems as though trellis deploys (using the default build-before.yml and sage) don’t seem to be building from the specified branch’s remote? I’m not suggesting there are any bugs here but I’m wondering whether I’m operating in a way which is an unwritten “don’t do that”.

Scenario: I’ve got a “staging” branch checked out, I review, approve and merge a PR for a colleague going into that “staging” branch, and then run a deploy after the remote merge completes. I’m fairly consistently finding that what gets deployed in this scenario will contain not up-to-date code (styles in particular). I’m just wondering whether others have experienced this and caught on to scenarios that should be avoided.

For instance, I’ll sometimes run that deployment while I’ve still got a bud/yarn process running on my theme and I’m curious whether this is something that should be avoided and a mangled deploy/build would be expected because of multiple processes running on the same directory or something?

I’m on OSX and have actually seen this or similar results for a while with Trellis so I don’t think it’s isolated to anything recent or version-specific.

Just looking for thoughts and advice from those who better understand what how ansible is working with the directories and the branch/repo archives that the local processes are run on.