Facts
The appellant, represented by Caritas Genève, was the subject of a decision of the Service des prestations complémentaires of the Republic and Canton of Geneva (hereinafter: SPC) dated 14 January 2015, confirmed on objection on 10 April 2015. This decision recalculated her entitlement to cantonal supplementary benefits for families and required the restitution of 22'832 francs paid in error for the period from 1 May 2013 to 31 December 2014.
The appellant challenged this decision on 18 May 2015 before the Court of Justice of the Republic and Canton of Geneva, Social Insurance Chamber. At a personal appearance hearing on 6 July 2015, she undertook to withdraw her appeal if the SPC waived the restitution. By decision of 8 July 2015, the SPC granted a complete waiver of the obligation to repay. On 13 July 2015, invited to confirm the withdrawal, the appellant indicated that the matter had become moot and requested costs.
By judgment of 21 July 2015, the cantonal court found that the proceedings had become moot, struck the case from the roll and refused to award costs, on the ground that the request for costs had only been made after notification of the waiver decision and that the appellant had stated at her appearance that she would immediately withdraw her appeal.
The appellant filed an appeal in public law matters and, in the alternative, a subsidiary constitutional appeal, seeking an award of costs or the remittal of the case to the cantonal court. The SPC and the Federal Social Insurance Office did not submit observations.
The sole issue in dispute is whether the appellant is entitled to costs for the cantonal proceedings.
Considerations
As to the available remedy, an appeal against a decision on costs in cantonal proceedings follows the same route as that available against the merits of the dispute (ATF 134 V 138 consid. 3). The decision striking the case from the roll is a final decision (art. 90 FSCA) rendered in public law matters (art. 82 let. a FSCA) by a cantonal authority of last instance (art. 86 para. 1 let. d FSCA). The appeal in public law matters is therefore open and the subsidiary constitutional appeal is inadmissible (art. 113 FSCA).
The Federal Supreme Court applies the law of its own motion (art. 106 para. 1 FSCA). Cantonal provisions cannot be challenged as such (art. 95 FSCA a contrario), but their application may be contested under the angle of arbitrariness (art. 9 Cst.) or other constitutional rights (ATF 138 V 67 consid. 2.2). The award of costs falls in principle within cantonal law, the federal rules of the GSSLA applying here as supplementary cantonal law (art. 1A para. 2 CISA/GE; ATF 138 I 232 consid. 2.4). The cantonal interpretation is therefore reviewed only under the restricted angle of arbitrariness (ATF 141 I 49 consid. 3.4).
The first ground, based on arbitrariness, good faith, the right to be heard and excessive formalism, is upheld. The cantonal court wrongly held that the appellant had not requested costs in her appeal brief. This finding amounts to a manifest oversight constituting an arbitrary finding of fact (judgment 5A_399/2012 consid. 4), since the brief contained clear requests "with costs and…