IsWitnessStandard has three policy rules for Taproot spends: annexes are nonstandard, tapscript stack items are limited to 80 bytes, and an empty control block is rejected. None of them is covered by a test that ties the bad-witness-nonstandard reject reason to a Taproot cause.
All nine existing assertions of that reject reason are for other output types: seven in p2p_segwit.py for P2WSH and P2SH-P2WSH, one in mempool_accept.py for P2A, and one in txpackage_tests.cpp. feature_taproot.py does exercise annexes and oversized stack items, but it checks standardness with assert_raises_rpc_error(-26, None, ...), so it never asserts which rule rejected the spend. MAX_STANDARD_TAPSCRIPT_STACK_ITEM_SIZE has three references in the whole repository, none of them in tests.
This adds three cases to mempool_accept.py. The reference transaction the file already builds spends a P2TR output through the script path, so each case only has to mutate its witness stack: append an annex, insert an 81-byte stack item, or empty the control block.
To make sure each case hits the rule it claims to cover, I disabled the three branches in src/policy/policy.cpp one at a time and reran the test. Each case fails with its branch disabled and passes with it back in place.
Tested with:
build/test/functional/mempool_accept.py