I've decided to go ahead and rewrite sp_item_write_transform() into a form that doesn't write to reprs -- leaving SPObjectClass::write soley responsible for repr writing.
Since the existing write_transform code was only writing to attributes for their side-effects (updating other member variables -- better done directly), this shouldn't be too hard.
I'm not going to commit anything obviously broken, but just a heads up to look out for transform breakage in case I miss something along the way.
A side-effect of the change is going to be that sp_item_write_transform will need to be followed by an explicit call to sp_object_invoke_write(). sp_item_write_transform() will probably become sp_item_set_transform(), also.
Part of the reason for doing this is that I plan to remove the requirement for explicit writes (during editing) altogether, in favor of a per-document "dirty list" that gets written out automatically before the transaction is finalized with sp_document_done().
We'll see how this goes...
-mental