Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

append_forecast

Append a supplied forecast after validating its lifecycle and evidence.

Contract

The initial forecast has no predecessor. Subsequent forecasts must identify the current predecessor, increase as_of, and preserve a nonregressing cutoff. A manual probability is accepted as a declared estimate, not as proof of its method.

Fields

FieldTypeRequired
forecastForecastYes
keyKeyYes
op"append_forecast"Yes

Setup

Start a fresh --memory process and send these requests, one per line, before the example. The same sequence also works with a new SQLite database.

{"version":1,"id":"setup-1","command":{"op":"create_question","question":{"id":"doc-launch","version":1,"proposition":"Release before timestamp 100","opens_at":0,"deadline":100,"resolve_after":110,"yes_rule":"Archive confirms release strictly before 100","no_rule":"Complete archive confirms no qualifying release","void_rule":"Archive permanently unavailable","resolution_sources":["official archive"]}}}

Request

Send this object on one line. It is expanded below for readability.

{
  "version": 1,
  "id": "example",
  "command": {
    "op": "append_forecast",
    "key": {
      "question_id": "doc-launch",
      "version": 1
    },
    "forecast": {
      "id": "f1",
      "as_of": 1,
      "evidence_cutoff": 1,
      "probability": 0.3,
      "previous_id": null,
      "change": "initial",
      "method": "empirical outside view",
      "rationale": "12 of 40 comparable attempts",
      "assumptions": [
        "cases are comparable"
      ],
      "next_review_trigger": "readiness test",
      "evidence": []
    }
  }
}

Response

This response is generated by executing the example against the current binary. Commit timestamps, when present, are shown as <runtime UTC seconds>; the actual protocol returns integer UTC seconds.

{
  "version": 1,
  "id": "example",
  "result": {
    "event": {
      "calculation": null,
      "forecast": {
        "as_of": 1,
        "assumptions": [
          "cases are comparable"
        ],
        "change": "initial",
        "evidence": [],
        "evidence_cutoff": 1,
        "id": "f1",
        "method": "empirical outside view",
        "next_review_trigger": "readiness test",
        "previous_id": null,
        "probability": 0.3,
        "rationale": "12 of 40 comparable attempts"
      },
      "kind": "forecast"
    },
    "key": {
      "question_id": "doc-launch",
      "version": 1
    },
    "recorded_at": "<runtime UTC seconds>",
    "sequence": 2
  }
}

Verification

The documentation gate executes the setup and request, then checks the following result fields against independently specified expectations:

JSON pointer within resultExpected
/sequence2
/event/forecast/probability0.3

Float comparisons use a 1e-12 tolerance. Request schema validation and cross-record validation still apply. See errors and recovery for failure handling.