{
  "schema_version": "1.0",
  "topic_id": "D08-F07-A17",
  "title": "Inside/Outside Bar Structure",
  "purpose": "machine-readable publication-contract verification",
  "data_class": "synthetic teaching input",
  "selected_formula": "inside: H_t<=H_prev and L_t>=L_prev; outside: H_t>=H_prev and L_t<=L_prev, with equality policy",
  "canonical_question": "Is the current range contained by, or does it contain, the previous range?",
  "input_contract": "ordered OHLC observations, explicit lookbacks and thresholds, and pivots confirmed without future leakage",
  "scenario_assertions": [
    {
      "name": "canonical",
      "expected_state": "calculated",
      "assertion": "valid and sufficiently warm synthetic input reaches calculation"
    },
    {
      "name": "boundary",
      "expected_state": "waiting",
      "assertion": "one missing observation or unresolved equality is not coerced to zero"
    },
    {
      "name": "failure",
      "expected_state": "invalid",
      "assertion": "non-finite, misordered, future-dated, or basis-mixed input is withheld"
    }
  ],
  "timing_rule": "A state at t may use only observations available through t; confirmed swings retain their confirmation timestamp and are never relabeled as known at the pivot bar.",
  "expected_non_claims": [
    "not historical market data",
    "not a forecast",
    "not a trading instruction",
    "not evidence of profitability"
  ],
  "implementation_status": "Python canonical runtime and audited Node/TypeScript adapter released with topic-owned fixtures and tests"
}
