Why was this transaction allowed on testnet? I'm a bit confused on how testing stuff for Bitcoin on the testnet currently works.

For example, bitcoin core 0.10 enables only 40 bytes in OP_RETURN, but I'm not sure if 0.10 is the latest version allowed on the testnet.

I know that there are OP_RETURN transactions in the testnet block chain that are up to 64 bytes, as seen in this transaction:

{
  "transaction_hash": "91615716a4d3c42cafc240b594d79782709c2c359bd0d5a1d30fa2ee8294bcd3",
  "hex": "37356365626362356462366363636537383565633837646134353564373332646162653661313462636362623235393338643465663163373539346232303934",
  "text": "75cebcb5db6ccce785ec87da455d732dabe6a14bccbb25938d4ef1c7594b2094",
  "receiver_addresses": [

  ],
  "sender_addresses": [
    "mmHWy49WWGFQgmeZt7wYKvWSh7Szi9XQAm"
  ]
}


source

Is the code for the testnet differences within the most recent bitcoin github repo, or is it a separate repo I must download, compile, and point towards the testnet?

Some clarification on how this works would be great.
For example, bitcoin core 0.10 enables only 40 bytes in OP_RETURN, but I'm not sure if 0.10 is the latest version allowed on the testnet.


40 bytes in OP_RETURN has always been legal. It was just non-standard, meaning that the standard client wouldn't mine or relay those transactions, but would allow them if they were already in a block.

However, testnet disables all standardness rules.


  Is the code for the testnet differences within the most recent bitcoin github repo, or is it a separate repo I must download, compile, and point towards the testnet?


It's the same program with the -testnet switch passed at the command line. (Or in your bitcoin.conf. Either works.)