Humans wrote bitcoin. The only objective things a bitcoin node knows are what its devs and users tell it.
A Core node doesn't know what a valid tx is, except it does because a human told it via the consensus rules
A Knots node doesn't know what a spam tx is, except it does because a human told it via the mempool policy