{"record":{"id":"95ba04a7750edf7d","repo":"rohitg00/ai-engineering-from-scratch","slug":"unknown-performative-self-performative","errorCode":null,"errorMessage":"unknown performative: {self.performative}","messagePattern":"unknown performative: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"phases/16-multi-agent-and-swarms/02-fipa-acl-heritage/code/main.py","lineNumber":36,"sourceCode":"    \"subscribe\", \"cancel\", \"failure\",\n}\n\n\n@dataclass\nclass ACLMessage:\n    performative: str\n    sender: str\n    receiver: str\n    content: Any\n    language: str = \"SL0\"\n    ontology: str = \"default\"\n    protocol: Optional[str] = None\n    conversation_id: Optional[str] = None\n    reply_with: Optional[str] = None\n\n    def __post_init__(self) -> None:\n        if self.performative not in PERFORMATIVES:\n            raise ValueError(f\"unknown performative: {self.performative}\")\n\n    def render(self) -> str:\n        fields = [\n            f\":sender       {self.sender}\",\n            f\":receiver     {self.receiver}\",\n            f\":content      {self.content!r}\",\n            f\":language     {self.language}\",\n            f\":ontology     {self.ontology}\",\n        ]\n        if self.protocol:\n            fields.append(f\":protocol     {self.protocol}\")\n        if self.conversation_id:\n            fields.append(f\":conversation-id {self.conversation_id}\")\n        if self.reply_with:\n            fields.append(f\":reply-with   {self.reply_with}\")\n        inner = \"\\n  \".join(fields)\n        return f\"({self.performative}\\n  {inner}\\n)\"\n","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/rohitg00/ai-engineering-from-scratch/blob/39ea8a1c6d0b61f071226eff7ede4d4105fed820/phases/16-multi-agent-and-swarms/02-fipa-acl-heritage/code/main.py#L18-L54","documentation":"Constructor guard on ACLMessage.__post_init__: the message's performative is not in the FIPA ACL performative set (inform, request, subscribe, cancel, failure, ...). Because the performative drives how the message renders and is interpreted, an unknown one is rejected at construction time rather than downstream.","triggerScenarios":"Thrown at phases/16-multi-agent-and-swarms/02-fipa-acl-heritage/code/main.py:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the constants from the PERFORMATIVES set","Check for typos and case — the set is lowercase and exact","Extend PERFORMATIVES deliberately if modeling additional FIPA communicative acts","Validate agent-generated performatives before constructing ACLMessage instances"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"39ea8a1c6d0b61f071226eff7ede4d4105fed820","analyzedAt":"2026-08-26T03:13:46.626Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}