Gluing Alexandrov spaces along parts of boundary

I'm familiar with the Petrunin gluing theorem that states that gluing two Alexandrov spaces $M_1,M_2\in Alex(k)$ along their boundaries via an isometry $:\partial M_1\rightarrow \partial M_2$ results in an Alexandrov space of the same lower curvature bound.

I'm wondering for what "parts" of the boundary we may restrict such a gluing and still obtain an Alexandrov space. For example, two eighth-spheres of $S^2$ (geodesic triangles with three right angles) can be glued along a single edge, resulting in a quarter-sphere, and all three are $Alex(1)$.

I think in this example, the two eighth-spheres could be open and the gluing could be done along the interior of a boundary edge, but I'm interested in what other type of restrictions are possible. That is, under what conditions is it true that if $E_1\subset \partial M_1$ and $E_2\subset \partial M_2$ are isometric, gluing along this isometry produces an $Alex(k)$ space?

Of particular interest to me is if $E_1, E_2$ are themselves isometric $Alex(k)$ spaces with non-empty boundary. Does gluing along their interiors produce an $Alex(k)$ space?

This question is migrated from SE.

In your specific question, the answer is no. Take two triangles, as two 2-dimensional Alexandrov surfaces. Suppose they each have a side of a given length. Then these sides can be your $E_1$ and $E_2$ and the glued space is in general a quadrilateral. It is only an Alexandrov space if and only if it is convex.

In general, as mentioned by Zimbrón, if you glue along a boundary face, in the sense that it is a codimension one extremal subset, this does work. This covers your spherical example. However, it is not a necessary condition. This is clear from the triangle gluing problem. Nan Li has though a lot about these questions: see http://arxiv.org/pdf/1110.5498v7.pdf

You could also check out Woerner's paper in G&T, at http://msp.org/gt/2012/16-4/gt-v16-n4-p12-p.pdf

This paper by A. Mitsuishi considers self-gluings along codimension one extremal subsets admitting an isometric involution.