What is a writ of mandamus?
Mandamus is a lawsuit in federal court that asks a judge to make an agency — usually USCIS, sometimes the State Department — do a duty it already has: decide your application. Not approve it; decide it. Its legal footing is the Administrative Procedure Act: an agency that owes you a decision owes it within a reasonable time. Because the court is never asked to judge the merits, the only real question is whether the wait itself has become unreasonable — and that is a question the review can answer before you spend anything.