Current behaviour
While trying to extract the public key from a descriptor I might have walked into this bug. My thought was passing a pk(xpub) descriptor would return either an error or a pubkey to push instead it returned the p2pkh address. This is IMO inconsistent and frankly not very useful because the PK is behind the hash.
Note there are both pk and pkh types.
0[bitcoin@qrsnaps0 ~]$ bitcoin-cli deriveaddresses "pk([deadbeef/48'/0'/0'/2']xpub ... /0/*)#deadbeef" 0
1[
2 "1address..."
3]
Expected behaviour
Error or return compressed pubkey