### Task 3: 방향 문구 — 앞/뒤 명시 + 선언 relation 렌더

프롬프트 문구 `"back toward the camera"` 는 부사("다시 카메라 쪽으로")와
신체부위("등을 카메라로")로 갈리는 중의성이 있다. 마네킹은 얼굴이 없어
앞/뒤 명시가 특히 중요하다. 그리고 T1·T2 로 선언 relation 이 좌표와
정합함이 보장되므로, 심도 문구는 eps 추론이 아니라 **검증 통과한
선언값**에서 렌더한다.

**Files:**
- Modify: `backend/app/modules/pipeline/outdoor_marker_map.py:837-865`
  (`_facing_screen_text`), `:889-` (`build_geometry_text_lines`)
- Test: `backend/tests/pipeline/test_outdoor_marker_map.py`

**Interfaces:**
- Consumes: T1 의 `facing_camera_depth`, `CAMERA_FACING_RELATIONS`
- Produces: `_facing_screen_text(cam, pl)` 가 선언 relation 을 우선
  사용하고 `unspecified`/부재 시 기존 eps 경로를 유지

- [ ] **Step 1: 실패하는 테스트를 쓴다**

```python
def test_facing_text_states_front_or_back_explicitly():
    from app.modules.pipeline.outdoor_marker_map import (
        _facing_screen_text,
    )

    g = _fixture_geometry(facing=(0.80, 0.95))  # dep < -eps
    txt = _facing_screen_text(g["camera"], g["entity_placements"][0])
    assert "from the front" in txt
    assert "back toward the camera" not in txt  # 중의성 어구 제거

    g2 = _fixture_geometry(facing=(0.70, 0.20))  # dep > +eps
    txt2 = _facing_screen_text(g2["camera"], g2["entity_placements"][0])
    assert "from behind" in txt2


def test_facing_text_prefers_declared_relation():
    """선언 relation 이 있으면 eps 추론이 아니라 그것을 문장화한다."""
    from app.modules.pipeline.outdoor_marker_map import (
        _facing_screen_text,
    )

    # dep 는 0 근처(eps 미달)지만 선언은 profile — 침묵하지 않고 서술
    g = _fixture_geometry(relation="profile", evidence="뒷모습",
                          facing=(0.88, 0.52))
    txt = _facing_screen_text(g["camera"], g["entity_placements"][0])
    assert "side-on to the camera" in txt

    # unspecified 는 기존 eps 경로 — dep 미달이면 심도 문구 없음
    g2 = _fixture_geometry(relation="unspecified", facing=(0.88, 0.52))
    txt2 = _facing_screen_text(g2["camera"], g2["entity_placements"][0])
    assert "side-on to the camera" not in txt2
    assert "from behind" not in txt2 and "from the front" not in txt2
```

- [ ] **Step 2: 실패 확인**

Run: `cd backend && python -m pytest tests/pipeline/test_outdoor_marker_map.py -q -k "facing_text"`
Expected: FAIL — `assert "from the front" in txt`

- [ ] **Step 3: `_facing_screen_text` 를 고친다**

`outdoor_marker_map.py:853-865` 의 `depth` 계산부터 반환까지를 교체한다:

```python
    horiz = (
        "toward the RIGHT of the frame" if lat > _SCREEN_EPS
        else "toward the LEFT of the frame" if lat < -_SCREEN_EPS
        else ""
    )
    # v14/v4 (2026-07-26): 앞/뒤를 명시한다. 구 문구 "back toward the
    # camera" 는 부사("다시 카메라 쪽으로")와 신체부위("등을 카메라로")로
    # 갈려 읽혔다 — 마네킹은 얼굴이 없어 몸통 방향이 유일한 신호라
    # 앞/뒤 오독이 곧 반전이다.
    rel = pl.get("camera_facing_relation")
    if rel in ("toward_camera", "away_from_camera", "profile"):
        # 선언값은 validator 가 좌표와 정합을 확인한 뒤에만 도달한다
        # (Task 1) — eps 추론보다 이것이 권위다.
        depth = _FACING_RELATION_PHRASES[rel]
    elif dep > _SCREEN_EPS:
        depth = (
            "away from the camera, into the depth of the shot, so the "
            "camera sees this subject from behind"
        )
    elif dep < -_SCREEN_EPS:
        depth = (
            "toward the camera, so the camera sees this subject from "
            "the front"
        )
    else:
        depth = ""
    if horiz and depth:
        return f"{horiz} and {depth}"
    return horiz or depth or "across the frame"
```

`_SCREEN_EPS` 정의(`:797`) 아래에 매핑을 추가한다:

```python
# 선언 relation → 화면 서술 (렌더링 전용 매핑, 의미 판단 아님)
_FACING_RELATION_PHRASES = {
    "away_from_camera": (
        "away from the camera, into the depth of the shot, so the camera "
        "sees this subject from behind"
    ),
    "toward_camera": (
        "toward the camera, so the camera sees this subject from the front"
    ),
    "profile": (
        "side-on to the camera, neither toward it nor away from it"
    ),
}
```

- [ ] **Step 4: 테스트 통과 확인**

Run: `cd backend && python -m pytest tests/pipeline/test_outdoor_marker_map.py -q`
Expected: PASS

- [ ] **Step 5: 커밋**

```bash
git add backend/app/modules/pipeline/outdoor_marker_map.py \
        backend/tests/pipeline/test_outdoor_marker_map.py
git commit -m "fix(lane): 방향 문구 앞/뒤 명시 + 선언 relation 우선 렌더

'back toward the camera' 중의성 제거(부사 vs 신체부위) — 마네킹은 얼굴이
없어 몸통 방향이 유일한 신호라 앞/뒤 오독이 곧 반전이다. 선언 relation 은
validator 가 좌표 정합을 확인한 값이므로 eps 추론보다 권위."
```

---

