gh-112320: Implement on-trace confidence tracking for branches (#112321)

We track the confidence as a scaled int.
6 files changed