# Globe Operator Runbook

## Purpose

Use this runbook to verify the `Globe` operator surface after UI, route-graph, scenario-strip, or QA-pipeline changes.

Primary scope:

- historical corridor focus
- scenario strip surface contract
- scenario strip runtime state transitions
- compact Scenario Desk ops summary with updated timestamp cue
- graph-health and prewarm freshness cues

## Canonical command

Local HTTPS with host header:

```bash
BASE='https://127.0.0.1/topos/api' \
BASE_URL='https://127.0.0.1/topos' \
HOST_HEADER='Host: shipinfo.net' \
CURL_INSECURE=1 \
bash /var/www/shipinfo.net/topos/scripts/qa/globe_operator_regression.sh
```

This is the recommended single command for Globe QA in the sandbox.

## What it runs

`scripts/qa/globe_operator_regression.sh` runs:

1. `scripts/qa/globe_corridor_regression.sh`
2. `scripts/qa/globe_scenario_strip_regression.sh`
3. `scripts/qa/globe_scenario_strip_runtime_regression.sh`
4. lightweight `Scenario Desk` ops-status endpoint check
5. diagnostic freshness cue checks on `globe-graph-health` and `globe-prewarm-status`

## Expected pass markers

Successful run should end with:

- `globe_corridor_regression: passed`
- `globe_scenario_strip_regression: passed`
- `globe_scenario_strip_runtime_regression: passed`
- `ok status=ready ... latest_asset=... UTC` or another valid Globe operator status line
- `globe_operator_regression: passed`

## When to run

Run the Globe operator smoke after changes to:

- `globe_page.php`
- `globe_graph_health_page.php`
- `globe_prewarm_status_page.php`
- `api/experimental/globe-operator-status.php`
- `api/experimental/globe-route-graph.php`
- `data/strategic_connector_packs.php`
- `scripts/qa/globe_*`
- flow corridor presets or freshness logic
- scenario strip controls, playback guards, or reset semantics

## Triage order

### 1. Corridor failure

Run:

```bash
BASE='https://127.0.0.1/topos/api' \
BASE_URL='https://127.0.0.1/topos' \
HOST_HEADER='Host: shipinfo.net' \
CURL_INSECURE=1 \
bash /var/www/shipinfo.net/topos/scripts/qa/globe_corridor_regression.sh
```

Use this when the failure points to:

- missing corridor chips
- route-graph payload mismatch
- stale corridor summary fields

### 2. Strip surface failure

Run:

```bash
BASE_URL='https://127.0.0.1/topos' \
HOST_HEADER='Host: shipinfo.net' \
CURL_INSECURE=1 \
bash /var/www/shipinfo.net/topos/scripts/qa/globe_scenario_strip_regression.sh
```

Use this when the failure points to:

- missing strip controls
- missing operator labels
- missing playback/preset/start/reset tokens in rendered `/topos/globe`

### 3. Strip runtime failure

Run:

```bash
BASE_URL='https://127.0.0.1/topos' \
HOST_HEADER='Host: shipinfo.net' \
CURL_INSECURE=1 \
bash /var/www/shipinfo.net/topos/scripts/qa/globe_scenario_strip_runtime_regression.sh
```

Use this when the failure points to:

- `Start state` vs `Reset base` semantics
- playback pause side effects
- button disabled/title state after strip actions
- history/filter/rebuild side effects in strip runtime logic

## Runtime harness note

This sandbox does not provide `chromium`, `playwright`, `puppeteer`, or `jsdom`.

Because of that, the runtime check uses a lightweight `node/vm` harness:

- fetches `/topos/globe`
- extracts the inline module functions
- executes strip logic with mocked operator state
- asserts real state transitions for `Start state` and `Reset base`

## Scenario Desk ops summary

The Globe page now also exposes a lightweight operator summary through:

```bash
curl -k -H 'Host: shipinfo.net' https://127.0.0.1/topos/api/experimental/globe-operator-status.php
```

It reports:

- runbook presence
- Globe QA script presence
- latest QA/doc asset update time
- links to route-graph diagnostics
- compact summary text used by `Scenario Desk`, including the visible `Updated ... UTC` cue

## Pipeline hook

`scripts/qa/post_change_pipeline.sh` already runs the Globe operator smoke through:

```bash
bash /var/www/shipinfo.net/topos/scripts/qa/globe_operator_regression.sh
```

Use the standalone command when you want fast local Globe-only verification without the rest of the post-change pipeline.
