Knock, Knock Said the Ship by Rati Mehrotra

Knock, Knock Said the Ship by Rati Mehrotra (F&SF, July-August 2020) opens with Kaalratri, a spaceship AI, asking Deenu a knock-knock joke on a neural link that no-one else can overhear. We then learn that Deenu is on the bridge of the ship trying to work out a course to their destination beyond the asteroid belt (Captain Miral likes to train his crew in various skills). Then, as Captain Miral needles Deenu about her performance, we learn she has been bonded for three years after one of the Kaalatri’s drones rescued her from the wreckage of the colony on Luna.
Deenu is spared further torment when a Peace ship hails them, and its commander, Captain Zhao, tells Miral that they intend to board his ship. When Zhao and his party do so, Miral quickly realises that they are imposters—and he is shot for his trouble. Then, after some backchat, Miral is shot again, but not before he puts the ship into lockdown:

“Override the ship,” snapped Zhao. “You’re next in command, aren’t you?”
“That would be me,” said Lieutenant Saksha, straightening and speaking with an effort. “But I cannot override her. It was the captain’s last order before you…before she…” She paused to swallow. “The ship will lift the lockdown only when she deems the threat is over. You could kill us, but it will serve no purpose.”
“Hey, Ship, can you hear me?” shouted Zhao.
“Yes,” said Kaalratri, her voice remote.
“Would you like me to kill the rest of your crew? We can start here, with these officers. Then we’ll break down your door and go for the rest of them. Would you like that, eh?”
“Would you like to hear a joke?” said Kaalratri.
“What?”
“Knock knock,” said the ship.
“The fuck is wrong with you?” screamed Zhao.
“You are supposed to say, who’s there,” said the ship.  p. 17

The rest of the story sees Deenu overhear Zhao talk to the rest of his crew in Lunarian, and she realises they are refugees like herself. Deenu pretends to sympathise with them, and takes the group to the supplies they want. As they walk to the main bay (spoiler), Deenu hatches a plan with Kaalatri on her neural link and the latter organises an ambush. They are successful, the Captain and First Officer are still alive and are treated, and Deenu is rewarded by having her debt written off.
The plot of this is too straightforward, and the story also tries to have its violence cake and eat it (the gunshot injuries to the Captain and First Officer are severe but both recover), but, that said, the interaction between Deenu and the joke-telling computer is quite entertaining, and the story has an interesting setting.
*** (Good). 5,700 words.