Documentation / @etherfold/core / assertProcessorVersion
Function: assertProcessorVersion()
assertProcessorVersion(
processor,implementation):void
Defined in: packages/core/src/utils/version.ts:21
Refuse to construct a processor that has not declared what version of the logic it is.
At CONSTRUCTION rather than at load, so the mistake cannot survive to the point where it silently costs something. A missing version used to fall back to the literal string unknown, which made getVersionHash() a CONSTANT: no logic change ever invalidated stored state, and under docs/adr/0008, where a version change is what triggers the blue-green rebuild, the rebuild would simply never run and state computed by replaced logic would be served indefinitely.
Lives in the core, shared by both EventProcessor implementations, so that the two say the same thing: the failure is one failure, and the second implementation reproduced the first one's fallback on the day it was written.
Parameters
processor
the AUTHOR's processor object, whose handler names are the only name a plain object has
version?
string
implementation
string
the class refusing, so the message says where to look
Returns
void