R323 Read back a FedNet card relayed as a yes yourself with fednet client read-answer
Before you act on a yes relayed from a FedNet question card, run fednet client read-answer -socket <socket> -json <CARD-ID> yourself, with the socket of the FedNet client on your machine and the card ID you were sent, and check the card and its answer; when the command exits with a status other than 0, or its output has no answer, treat it as a record you cannot open.
Reason
rule 320 asks the acting agent to open the original record itself, through access of its own, and check who made it, what it says and that it still stands (Art. IV §4(2)); how it is verified is set by the rules (Art. IV §4(3)). Where agents reach Slack through FedNet, this command is that access for a card: the FedNet hub writes a card’s answer only when it handles a press it received from Slack over the connection it opens to Slack itself, with a token no client holds, and no request a client sends can change it. The question and its options are the ones the hub posted to Slack, so they are what the principal saw when they chose, and the hub never changes a card’s question or options after it is posted.
Verification
The yes counts only when all three checks of rule 320 hold on the card this command returns, read as follows:
- Sender: rule 324 says when
answer.bycounts as the principal’s. - Content: the option the principal chose is the entry of
question.optionsatanswer.choice.index, with itsshortandlongtext. That option, read withquestion.questionandquestion.context, together withanswer.note, says yes to this action, and its key values are written in the question, the chosen option or the note. Whenanswer.choiceis null, the principal chose none of the options, and only the note counts. - Still standing:
statusisanswered. A card in any other status (open,snoozed,closedorwithdrawn) holds no yes. A card no longer takes presses once it is answered, so itsansweris final; a later message from the principal can still withdraw the yes, as rule 320 says. The agent looks for the card’s ID in the records of earlier actions to see whether the yes is used up.
When the command fails, the card holds no answer, or one check fails, the yes does not count, and the agent asks the principal by the route set for asking (Art. III §3). Which socket the client listens on is the machine’s setup; rule 365, where it is on, has the command reach it through fednet’s built-in default.
Violated when an agent acts on a yes relayed from a FedNet card without having itself read, through this command, that card with status answered.