In 4b53cbd69220c1c786bb23a72c0b26a6f78a38f7 "test: Test for musig() in various miniscript expressions"
It would be helpful to add the test cases where the musig expressions are in the key path along with the script path, while spending both the paths. Consider the following working tests, the first of which is very much related to the one shared in the issue #34076.
diff --git a/test/functional/wallet_musig.py b/test/functional/wallet_musig.py
index 0e3e4377c0..e8c89bd7cb 100755
--- a/test/functional/wallet_musig.py
+++ b/test/functional/wallet_musig.py
@@ -338,6 +338,8 @@ class WalletMuSigTest(BitcoinTestFramework):
self.test_success_case("tr(H,and(pkh(musig/*),after(1)))", "tr($H,and_v(v:pkh(musig($0,$1,$2)/<0;1>/*),after(1)))", scriptpath=True)
self.test_success_case("tr(H,and(pk_h(musig/*),after(1)))", "tr($H,and_v(vc:pk_h(musig($0,$1,$2)/<0;1>/*),after(1)))", scriptpath=True)
self.test_success_case("tr(H,{and(pk(musig/*),after(1)),and(pk(musig/*),after(1))})", "tr($H,{and_v(v:pk(musig($0,$2)/0/*),after(1)),and_v(v:pk(musig($1,$2)/0/*),after(1))})", scriptpath=True)
+ self.test_success_case("tr(musig/*,{and(pk(musig/*),after(3)),and(pk(musig/*),after(2)),and(pk(musig/*),after(5))})", "tr(musig($0,$1,$2)/<0;1>/*,{and_v(v:pk(musig($0,$1)/<0;1>/*),after(3)),{and_v(v:pk(musig($0,$2)/<0;1>/*),after(2)),and_v(v:pk(musig($1,$2)/<0;1>/*),after(5))}})", scriptpath=True, nosign_wallets=[0])
+ self.test_success_case("tr(musig/*,{and(pk(musig/*),older(3)),and(pk(musig/*),older(2)),and(pk(musig/*),older(5))})", "tr(musig($0,$1,$2)/<0;1>/*,{and_v(v:pk(musig($0,$1)/<0;1>/*),older(3)),{and_v(v:pk(musig($0,$2)/<0;1>/*),older(2)),and_v(v:pk(musig($1,$2)/<0;1>/*),older(5))}})")
self.test_failure_case_1("missing participant nonce", "tr(musig($0/<0;1>/*,$1/<1;2>/*,$2/<2;3>/*))")
self.test_failure_case_2("insufficient partial signatures", "rawtr(musig($0/<0;1>/*,$1/<1;2>/*,$2/<2;3>/*))")
For actually testing the script path with older, block(s) would need to be generated but I have not suggested it at the moment.