fix flush_commit
Merge remote-tracking branch 'origin/wip-7999' into wip-sam-testing-2