What does replaceSectionAtRev do? Let me guess, it lets you replace a specific section in a specific revision of a page? Is there something specific we plan to use this functionality for?
Is there something specific we plan to use this functionality for?
Yes, this is for the parent task.
Right now if you start editing a section in source mode, it loads only that section's wikitext. This means the editor doesn't have access to the rest of the page; consequently, it can't let the user switch to editing visually (which requires access to the whole page for contextual information like access to references and categories, link numbering, and a bunch of other page-wide features).
When you submit a wikitext section edit, the content transmitted is the new wikitext plus the revision and section reference sufficient to locate and replace said section's content (which is how it knows when you edit conflict, amongst other things). But this call is made inside MediaWiki and not available through the API, so we can't use this tool to get the "new" page-wide wikitext from which to edit visually.
Consequently, switching from source mode to visual mode whilst editing a section is currently a destructive act, which is irritating for users and shouldn't be needed. Yet another example of MW's APIs being insufficient for client-equivalence to the "real" (desktop) interface, and how we've had to build it as we've gone along.