* fix: check mismatch error after recusive * fix: add tests * format --------- Co-authored-by: liuqiang <liuqiang.06@bytedance.com>