# Reverse Engineering Lab

> For **Use Case 9**. You analyze a scenario and find unhandled edges.

## Goal

- Describe the data flow (5–8 sentences)
- Find **at least 3** issues from the table below
- Propose improvements

## Reference structure (~15 nodes)

Build it **yourself** in the training bot using the scheme below (or use your own capstone Use Case 13 for audit):

```text
Start
  → MessageKeyboard (menu: FAQ / Operator / CRM)
  → [FAQ] WaitForInput → action_fastline_pro
        ├─ success → MessageKeyboard (answer)
        └─ fallback → [MISSING #1 — fix it]
  → [CRM] WaitForInput phone → action_send_request
        ├─ ok → Router → MessageKeyboard
        └─ not_ok → [MISSING #2]
  → [Operator] action operator_panel connect
        ├─ success → MessageKeyboard
        ├─ limit → [MISSING #3 — no client message]
        └─ error → MessageKeyboard
```

## How to use

1. Build the lab scenario in the training bot **or** audit your own capstone (Use Case 13).
2. Fill in the Use Case 9 section in [results-template.md](/en/learn/implementer/training/results-template.md).
3. Self-check: fix the missing edges you found in a copy of the scenario.

## Intentional gaps (for checking)

| # | Node / pattern | Missing / error | Symptom |
|---|----------------|-----------------|---------|
| 1 | action_fastline_pro | fallback | Silence after an unknown question |
| 2 | action_send_request | not_ok | Silence on 404 URL |
| 3 | operator connect | limit | Client has no message while in queue |
| 4 | send-message-keyboard | source-handle → INTEGER CD | Free-text breaks rating write |
| 5 | alias entry | duplicated `exit_csat` | CSAT does not start |
| 6 | Set + Router | Set alias before segment check | Wrong subject |
| 7 | connect blocks | different `chat_closed_alias` | CSAT after close not in all branches |

Find at least **3** issues (1–3 in the basic lab; 4–7 — extended audit).

## Self-check

- [ ] Data flow described (5–8 sentences)
- [ ] At least 3 issues found and documented
- [ ] Fixes verified in Runs
