Abstract-The paper considers the problem of single-link failure localization in all-optical mesh networks. Our study follows a generic monitoring approach using supervisory lightpaths (SLPs), in which a set of bi-directional monitoring trails (bmtrails) are defined and closely monitored, such that the network controller can achieve unambiguous failure localization (UFL) for any single link by collecting the flooded alarms from the affected bm-trails. With a target of minimizing the number of bm-trails (or the length of alarm codes) required for singlelink UFL, the paper provides optimal (or essentially optimal) solutions to the bm-trail allocation problem on a number of well known topologies. First we demonstrate that the theoretical lower bound of log 2 (|E| + 1) bm-trails can be achieved in any 2 · log 2 (|E| + 1) connected graph, where |E| is the number of links. Next, we prove an essentially optimal solution for 1-by-N grid topologies (also known as chocolate bar graphs), where 0.42 + log 2 (|E| + 2) bm-trails can be achieved. Based on the solution for chocolate bars, we further investigate bm-trail solutions to general 2-dimensional (2D) grid topologies, and the developed solution requires no more than 3 + log 2 (|E| + 1) bm-trails for UFL. Such an optimal (or essentially optimal) logarithmic behavior, although has been well observed in general topologies in our previous studies [1], [2], is formalized for the first time in this paper via a suite of polynomial-time deterministic constructions that consume less than a few seconds of running time in topologies of thousands of nodes.