## Not linear: 10's merge base is not in 8's history.
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=72'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=72
status: 200
{
  "state": "absent",
  "reason": "not_linear",
  "number": 72,
  "base_ref": "topic",
  "head_ref": "guide-more",
  "open": true,
  "members": [
    {
      "number": 10,
      "place": 1,
      "title": "WIP: draft the next page",
      "state": "draft",
      "author": "maintainer",
      "avatar": null,
      "base": "<topic>",
      "head": "<draft_head>",
      "in_top": null,
      "pending": false,
      "fetching": false
    },
    {
      "number": 8,
      "place": 2,
      "title": "Say more in the guide",
      "state": "merged",
      "author": "maintainer",
      "avatar": null,
      "base": "<base>",
      "head": "<merged_head>",
      "in_top": null,
      "pending": false,
      "fetching": false
    }
  ],
  "pending": [],
  "lacking": [],
  "states": {
    "open": 0,
    "draft": 1,
    "merged": 1,
    "closed": 0
  },
  "opened_at": "2026-09-16T10:57:23Z",
  "updated_at": "2026-09-16T17:39:01Z",
  "authors": [
    {
      "login": "maintainer",
      "avatar": null
    }
  ],
  "mergers": [
    {
      "login": "octo",
      "avatar": null
    }
  ],
  "fetched_at": "2026-09-17T12:00:00Z",
  "labels": [
    {
      "name": "shared design",
      "color": "0e8a16",
      "description": null
    },
    {
      "name": "earnings analysis",
      "color": "5319e7",
      "description": null
    },
    {
      "name": "bugfix",
      "color": "d73a4a",
      "description": null
    }
  ],
  "commits": 2,
  "size": null,
  "comparison": null,
  "totals": null,
  "truncated": false,
  "files": [],
  "guide": null,
  "github_url": null,
  "probe": null,
  "moved": null
}
--- stderr ---
--- gh ---
## A member with no record leaves its stack pending.
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=73'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=73
status: 200
{
  "state": "pending",
  "reason": null,
  "number": 73,
  "base_ref": "topic",
  "head_ref": null,
  "open": true,
  "members": [
    {
      "number": 8,
      "place": 1,
      "title": "Say more in the guide",
      "state": "merged",
      "author": "maintainer",
      "avatar": null,
      "base": "<base>",
      "head": "<merged_head>",
      "in_top": null,
      "pending": false,
      "fetching": false
    },
    {
      "number": 9,
      "place": 2,
      "title": null,
      "state": null,
      "author": null,
      "avatar": null,
      "base": null,
      "head": null,
      "in_top": null,
      "pending": true,
      "fetching": false
    }
  ],
  "pending": [
    9
  ],
  "lacking": [],
  "states": {
    "open": 0,
    "draft": 0,
    "merged": 1,
    "closed": 0
  },
  "opened_at": "2026-09-16T10:57:23Z",
  "updated_at": "2026-09-16T17:39:01Z",
  "authors": [
    {
      "login": "maintainer",
      "avatar": null
    }
  ],
  "mergers": [
    {
      "login": "octo",
      "avatar": null
    }
  ],
  "fetched_at": "2026-09-17T12:00:00Z",
  "labels": null,
  "commits": null,
  "size": null,
  "comparison": null,
  "totals": null,
  "truncated": false,
  "files": [],
  "guide": null,
  "github_url": "https://github.com/octo/demo/pull/9",
  "probe": null,
  "moved": null
}
--- stderr ---
--- gh ---
## The page's ask for that member. An automatic ask refreshes only a record the server holds, so the page asks as the reader's own open of it, which fetches 9, and the stack is current.
# metab https://github.com/octo/demo --api /api/plugin/github/pull-refresh --data ask.json
exit: 0
--- stdout ---
api: /api/plugin/github/pull-refresh
status: 200
{
  "refresh": "not_cached",
  "pull": {
    "state": "absent",
    "reason": "not_cached",
    "source": "https://github.com/octo/demo",
    "number": 9,
    "pin": "<topic>",
    "pin_ref": "refs/remotes/origin/topic",
    "fetched_at": null,
    "verified_at": null,
    "verified_by": null,
    "head_moved": false,
    "checks_pending": false,
    "record_revision": null,
    "fresh_for_s": 60.0,
    "probe_every_s": null,
    "refreshing": false,
    "last_refresh": null,
    "comparison_route": null,
    "image_route": null,
    "rendered_route": null,
    "size_route": null,
    "record": null,
    "core_preview": null,
    "repository_labels": [],
    "labels_pending": false,
    "status": null,
    "readiness": null,
    "checks": null,
    "status_unavailable": null
  },
  "status_route": "/api/plugin/github/pull?number=9"
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api /api/plugin/github/pull-refresh --data ask.json
exit: 0
--- stdout ---
api: /api/plugin/github/pull-refresh
status: 202
{
  "refresh": "started",
  "pull": {
    "state": "pending",
    "reason": null,
    "source": "https://github.com/octo/demo",
    "number": 9,
    "pin": "<topic>",
    "pin_ref": "refs/remotes/origin/topic",
    "fetched_at": null,
    "verified_at": null,
    "verified_by": null,
    "head_moved": false,
    "checks_pending": false,
    "record_revision": null,
    "fresh_for_s": 60.0,
    "probe_every_s": null,
    "refreshing": true,
    "last_refresh": null,
    "comparison_route": null,
    "image_route": null,
    "rendered_route": null,
    "size_route": null,
    "record": null,
    "core_preview": null,
    "repository_labels": [],
    "labels_pending": false,
    "status": null,
    "readiness": null,
    "checks": null,
    "status_unavailable": null
  },
  "status_route": "/api/plugin/github/pull?number=9"
}
after: /api/plugin/github/pull?number=9
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "number": 9,
  "pin": "<topic>",
  "pin_ref": "refs/remotes/origin/topic",
  "fetched_at": "2026-09-17T12:00:00Z",
  "verified_at": "2026-09-17T12:00:00Z",
  "verified_by": "fetch",
  "head_moved": false,
  "checks_pending": false,
  "record_revision": "5c011c3a5b821c19776edbdfa483a6ec9360c8295d279a5527cd55fbe14b7766",
  "fresh_for_s": 60.0,
  "probe_every_s": 5.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:00:00Z"
  },
  "comparison_route": "/api/plugin/github/pull-comparison?number=9&left=<base>&right=<closed_head>&base_policy=merge_base&build=<BUILD>&store=<STORE>",
  "image_route": "/api/plugin/github/pull-image?number=9&left=<base>&right=<closed_head>&store=<STORE>",
  "rendered_route": "/api/plugin/github/pull-rendered-diff?number=9&left=<base>&right=<closed_head>&store=<STORE>",
  "size_route": "/api/plugin/github/pull-size?number=9&left=<base>&right=<closed_head>&store=<STORE>",
  "record": {
    "schema_version": 3,
    "projection_version": 2,
    "source": "https://github.com/octo/demo",
    "number": 9,
    "fetched_at": "2026-09-17T12:00:00Z",
    "reader": "gh:octo-reader",
    "etags": {
      "repos/octo/demo/pulls/9": "W/\"bd0a1535019ba33ca5d652f1e47b79467f9530f4108d8188308766a528b0938a\"",
      "repos/octo/demo/issues/9/comments?per_page=100&page=1": "W/\"8e3fb7499c48198e2722d4bf87b6c307d9dd9f38dc4d767cb6d084933715125a\"",
      "repos/octo/demo/pulls/9/reviews?per_page=100&page=1": "W/\"7f0bc5191955ee595d16f9154007d0dc93786fa2ababd3d3aeb87531c7dbc19a\"",
      "repos/octo/demo/pulls/9/comments?per_page=100&page=1": "W/\"d3923abb607ffe393dc70a9b0bb679b48cf6c97b158f065d3879327d52e2bbe4\""
    },
    "pull": {
      "number": 9,
      "title": "spam",
      "body": "",
      "body_truncated": false,
      "state": "closed",
      "draft": false,
      "merged": false,
      "merged_by": null,
      "merged_by_avatar_url": null,
      "commits": 1,
      "merge_commit_sha": null,
      "labels": [
        {
          "name": "invalid",
          "color": "e4e669",
          "description": null
        }
      ],
      "author": null,
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-16T17:39:01Z",
      "merged_at": null,
      "closed_at": "2026-09-16T19:00:00Z",
      "base": {
        "ref": "topic",
        "sha": "c1063e6e9a97345a8c7e1dc275c7fd858c91d7b3",
        "repository": "octo/demo"
      },
      "head": {
        "ref": "spam",
        "sha": "<closed_head>",
        "repository": null
      },
      "html_url": "https://github.com/octo/demo/pull/9"
    },
    "issue_comments": [],
    "reviews": [],
    "review_comments": [],
    "comparison": {
      "base": "<base>",
      "head": "<closed_head>",
      "base_commit": "c1063e6e9a97345a8c7e1dc275c7fd858c91d7b3",
      "base_from": "base_sha"
    },
    "truncated": {
      "issue_comments": false,
      "reviews": false,
      "review_comments": false,
      "text": false
    },
    "unavailable": {}
  },
  "core_preview": null,
  "repository_labels": [],
  "labels_pending": false,
  "status": {
    "number": 9,
    "head": "<closed_head>",
    "base_ref": "topic",
    "base": "c1063e6e9a97345a8c7e1dc275c7fd858c91d7b3",
    "observed_at": "2026-09-17T12:00:00Z",
    "observed_by": "read",
    "conflicts": "unknown",
    "merge_state": "unknown",
    "review_decision": "review_required",
    "checks": {
      "state": "pending",
      "counts": {
        "pass": 2,
        "fail": 0,
        "pending": 1,
        "skipping": 0,
        "cancel": 0
      },
      "required_failing": 0,
      "required_pending": 1,
      "listed_at": "2026-09-17T12:00:00Z",
      "moved_at": null
    },
    "auto_merge": null,
    "queue": null
  },
  "readiness": null,
  "checks": {
    "number": 9,
    "head": "<closed_head>",
    "observed_at": "2026-09-17T12:00:00Z",
    "items": [
      {
        "name": "tests (3.13)",
        "kind": "run",
        "bucket": "pass",
        "status": "COMPLETED",
        "conclusion": "SUCCESS",
        "required": true,
        "details_url": "https://github.com/octo/demo/actions/runs/18062895276/job/51401654787",
        "app": "GitHub Actions",
        "description": null
      },
      {
        "name": "docs",
        "kind": "run",
        "bucket": "pending",
        "status": "IN_PROGRESS",
        "conclusion": null,
        "required": true,
        "details_url": "https://github.com/octo/demo/actions/runs/18062895276/job/51401654788",
        "app": "GitHub Actions",
        "description": null
      },
      {
        "name": "docs/readthedocs.org:demo",
        "kind": "status",
        "bucket": "pass",
        "status": null,
        "conclusion": "SUCCESS",
        "required": false,
        "details_url": "https://demo--7.org.readthedocs.build/en/7/",
        "app": null,
        "description": "Read the Docs build succeeded!"
      }
    ],
    "truncated": false
  },
  "status_unavailable": null,
  "refresh_timing": {
    "finished_at": "2026-09-17T12:00:00Z",
    "duration_ms": "<ELAPSED_MS>",
    "provider": "github_cli",
    "request_count": 6,
    "response_body_bytes": 702
  }
}
--- stderr ---
--- gh ---
gh api user
gh api repos/octo/demo/pulls/9
gh api repos/octo/demo/issues/9/comments?per_page=100&page=1
gh api repos/octo/demo/pulls/9/comments?per_page=100&page=1
gh api repos/octo/demo/pulls/9/reviews?per_page=100&page=1
gh api user (If-None-Match)
gh api graphql status number=9 cursor=start
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=73'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=73
status: 200
{
  "state": "current",
  "reason": null,
  "number": 73,
  "base_ref": "topic",
  "head_ref": "spam",
  "open": true,
  "members": [
    {
      "number": 8,
      "place": 1,
      "title": "Say more in the guide",
      "state": "merged",
      "author": "maintainer",
      "avatar": null,
      "base": "<base>",
      "head": "<merged_head>",
      "in_top": false,
      "pending": false,
      "fetching": false
    },
    {
      "number": 9,
      "place": 2,
      "title": "spam",
      "state": "closed",
      "author": null,
      "avatar": null,
      "base": "<base>",
      "head": "<closed_head>",
      "in_top": true,
      "pending": false,
      "fetching": false
    }
  ],
  "pending": [],
  "lacking": [
    8
  ],
  "states": {
    "open": 0,
    "draft": 0,
    "merged": 1,
    "closed": 1
  },
  "opened_at": "2026-09-16T10:57:23Z",
  "updated_at": "2026-09-16T17:39:01Z",
  "authors": [
    {
      "login": "maintainer",
      "avatar": null
    }
  ],
  "mergers": [
    {
      "login": "octo",
      "avatar": null
    }
  ],
  "fetched_at": "2026-09-17T12:00:00Z",
  "labels": [
    {
      "name": "invalid",
      "color": "e4e669",
      "description": null
    },
    {
      "name": "shared design",
      "color": "0e8a16",
      "description": null
    },
    {
      "name": "earnings analysis",
      "color": "5319e7",
      "description": null
    }
  ],
  "commits": 1,
  "size": {
    "pushed_bytes": <PUSHED>,
    "diff_bytes": 130
  },
  "comparison": {
    "left": "<base>",
    "right": "<closed_head>",
    "key": "e21776cd095d1c341f23ffc4b08869ad",
    "route": "/api/plugin/github/stack-comparison?number=73&left=<base>&right=<closed_head>&base_policy=direct&key=e21776cd095d1c341f23ffc4b08869ad&build=<BUILD>&store=<STORE>",
    "image_route": "/api/plugin/github/pull-image?stack=73&left=<base>&right=<closed_head>&store=<STORE>",
    "rendered_route": "/api/plugin/github/pull-rendered-diff?stack=73&left=<base>&right=<closed_head>&store=<STORE>"
  },
  "totals": {
    "files": 1,
    "additions": 1,
    "deletions": 0,
    "exact": true
  },
  "truncated": false,
  "files": [
    {
      "path": "src/app.txt",
      "layers": [
        {
          "number": 9,
          "place": 2,
          "path": "src/app.txt"
        }
      ]
    }
  ],
  "guide": {
    "number": 8,
    "revision": "f4e61e54ea6acf066c241e6ffb434eadd7188c3de9848c1d4dc3ed3166ba4b25"
  },
  "github_url": "https://github.com/octo/demo/pull/9",
  "probe": {
    "number": 9,
    "held": "5c011c3a5b821c19776edbdfa483a6ec9360c8295d279a5527cd55fbe14b7766",
    "every_s": 5.0
  },
  "moved": null
}
--- stderr ---
--- gh ---
## A number no stack has, and a request that names more than it.
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=99'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=99
status: 200
{
  "state": "absent",
  "reason": "not_stacked",
  "number": 99,
  "base_ref": null,
  "head_ref": null,
  "open": null,
  "members": [],
  "pending": [],
  "lacking": [],
  "states": {
    "open": 0,
    "draft": 0,
    "merged": 0,
    "closed": 0
  },
  "opened_at": null,
  "updated_at": null,
  "authors": [],
  "mergers": [],
  "fetched_at": null,
  "labels": [],
  "commits": null,
  "size": null,
  "comparison": null,
  "totals": null,
  "truncated": false,
  "files": [],
  "guide": null,
  "github_url": null,
  "probe": null,
  "moved": null
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=70&left=main'
exit: 1
--- stdout ---
api: /api/plugin/github/stack?number=70&left=main
status: 400
{
  "error": "a stack names itself by \"number\", and \"since\" alone besides",
  "code": "invalid_request"
}
--- stderr ---
Error: /api/plugin/github/stack?number=70&left=main returned HTTP 400
--- gh ---
## The stack moves: 70 is now 10 alone. A page still draws the comparison it was given, so that comparison keeps answering and its rendered documents keep being admitted, while an address the route never gave is still refused. Asked `since` that comparison, the answer's `moved` names no member: 8's going is in the two answers' members, and 10, which stayed, did not move.
# metab https://github.com/octo/demo --api /api/plugin/github/stacks-refresh --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/stacks-refresh
status: 202
{
  "refresh": "started",
  "stacks": {
    "state": "current",
    "reason": null,
    "source": "https://github.com/octo/demo",
    "reader": "gh:octo-reader",
    "fetched_at": "2026-09-17T12:00:00Z",
    "fresh_for_s": 90.0,
    "refreshing": true,
    "last_refresh": {
      "outcome": "succeeded",
      "message": null,
      "reset_at": null,
      "at": "2026-09-17T12:00:00Z"
    },
    "complete": true,
    "stacks": [
      {
        "number": 70,
        "base_ref": "topic",
        "open": true,
        "pulls": [
          8,
          10
        ],
        "titles": [
          "Say more in the guide",
          "WIP: draft the next page"
        ],
        "authors": [
          "maintainer",
          "maintainer"
        ],
        "avatars": [
          null,
          null
        ],
        "labels": [
          [
            "shared design",
            "earnings analysis"
          ],
          [
            "bugfix",
            "shared design"
          ]
        ],
        "updated_at": "2026-09-16T17:39:01Z",
        "leaders": {}
      },
      {
        "number": 71,
        "base_ref": "topic",
        "open": true,
        "pulls": [
          8,
          7,
          10
        ],
        "titles": [
          "Say more in the guide",
          "Count to two in the app",
          "WIP: draft the next page"
        ],
        "authors": [
          "maintainer",
          "forker",
          "maintainer"
        ],
        "avatars": [
          null,
          null,
          null
        ],
        "labels": [
          [
            "shared design",
            "earnings analysis"
          ],
          [
            "enhancement"
          ],
          [
            "bugfix",
            "shared design"
          ]
        ],
        "updated_at": "2026-09-16T17:39:01Z",
        "leaders": {}
      },
      {
        "number": 72,
        "base_ref": "topic",
        "open": true,
        "pulls": [
          10,
          8
        ],
        "titles": [
          "WIP: draft the next page",
          "Say more in the guide"
        ],
        "authors": [
          "maintainer",
          "maintainer"
        ],
        "avatars": [
          null,
          null
        ],
        "labels": [
          [
            "bugfix",
            "shared design"
          ],
          [
            "shared design",
            "earnings analysis"
          ]
        ],
        "updated_at": "2026-09-16T17:39:01Z",
        "leaders": {}
      },
      {
        "number": 73,
        "base_ref": "topic",
        "open": true,
        "pulls": [
          8,
          9
        ],
        "titles": [
          "Say more in the guide",
          "spam"
        ],
        "authors": [
          "maintainer",
          null
        ],
        "avatars": [
          null,
          null
        ],
        "labels": [
          [
            "shared design",
            "earnings analysis"
          ],
          [
            "invalid"
          ]
        ],
        "updated_at": "2026-09-16T17:39:01Z",
        "leaders": {}
      }
    ]
  },
  "status_route": "/api/plugin/github/stacks"
}
after: /api/plugin/github/stacks
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "reader": "gh:octo-reader",
  "fetched_at": "2026-09-17T12:00:00Z",
  "fresh_for_s": 90.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:00:00Z"
  },
  "complete": true,
  "stacks": [
    {
      "number": 70,
      "base_ref": "topic",
      "open": true,
      "pulls": [
        10
      ],
      "titles": [
        "WIP: draft the next page"
      ],
      "authors": [
        "maintainer"
      ],
      "avatars": [
        null
      ],
      "labels": [
        [
          "bugfix",
          "shared design"
        ]
      ],
      "updated_at": "2026-09-16T17:39:01Z",
      "leaders": {}
    },
    {
      "number": 71,
      "base_ref": "topic",
      "open": true,
      "pulls": [
        8,
        7,
        10
      ],
      "titles": [
        "Say more in the guide",
        "Count to two in the app",
        "WIP: draft the next page"
      ],
      "authors": [
        "maintainer",
        "forker",
        "maintainer"
      ],
      "avatars": [
        null,
        null,
        null
      ],
      "labels": [
        [
          "shared design",
          "earnings analysis"
        ],
        [
          "enhancement"
        ],
        [
          "bugfix",
          "shared design"
        ]
      ],
      "updated_at": "2026-09-16T17:39:01Z",
      "leaders": {}
    },
    {
      "number": 72,
      "base_ref": "topic",
      "open": true,
      "pulls": [
        10,
        8
      ],
      "titles": [
        "WIP: draft the next page",
        "Say more in the guide"
      ],
      "authors": [
        "maintainer",
        "maintainer"
      ],
      "avatars": [
        null,
        null
      ],
      "labels": [
        [
          "bugfix",
          "shared design"
        ],
        [
          "shared design",
          "earnings analysis"
        ]
      ],
      "updated_at": "2026-09-16T17:39:01Z",
      "leaders": {}
    },
    {
      "number": 73,
      "base_ref": "topic",
      "open": true,
      "pulls": [
        8,
        9
      ],
      "titles": [
        "Say more in the guide",
        "spam"
      ],
      "authors": [
        "maintainer",
        null
      ],
      "avatars": [
        null,
        null
      ],
      "labels": [
        [
          "shared design",
          "earnings analysis"
        ],
        [
          "invalid"
        ]
      ],
      "updated_at": "2026-09-16T17:39:01Z",
      "leaders": {}
    }
  ]
}
--- stderr ---
--- gh ---
gh stack --version
gh api user
gh api repos/octo/demo/stacks?per_page=100&page=1 (If-None-Match)
gh api user (If-None-Match)
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=70&since=ebfe45cd812c6d00f8d4a921576b31d7'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=70&since=ebfe45cd812c6d00f8d4a921576b31d7
status: 200
{
  "state": "current",
  "reason": null,
  "number": 70,
  "base_ref": "topic",
  "head_ref": "wip",
  "open": true,
  "members": [
    {
      "number": 10,
      "place": 1,
      "title": "WIP: draft the next page",
      "state": "draft",
      "author": "maintainer",
      "avatar": null,
      "base": "<topic>",
      "head": "<draft_head>",
      "in_top": true,
      "pending": false,
      "fetching": false
    }
  ],
  "pending": [],
  "lacking": [],
  "states": {
    "open": 0,
    "draft": 1,
    "merged": 0,
    "closed": 0
  },
  "opened_at": "2026-09-16T10:57:23Z",
  "updated_at": "2026-09-16T17:39:01Z",
  "authors": [
    {
      "login": "maintainer",
      "avatar": null
    }
  ],
  "mergers": [],
  "fetched_at": "2026-09-17T12:00:00Z",
  "labels": [
    {
      "name": "bugfix",
      "color": "d73a4a",
      "description": null
    },
    {
      "name": "shared design",
      "color": "0e8a16",
      "description": null
    }
  ],
  "commits": 1,
  "size": {
    "pushed_bytes": <PUSHED>,
    "diff_bytes": 144
  },
  "comparison": {
    "left": "<topic>",
    "right": "<draft_head>",
    "key": "e61d32617b4ee2599eb969c3a0d201b0",
    "route": "/api/plugin/github/stack-comparison?number=70&left=<topic>&right=<draft_head>&base_policy=direct&key=e61d32617b4ee2599eb969c3a0d201b0&build=<BUILD>&store=<STORE>",
    "image_route": "/api/plugin/github/pull-image?stack=70&left=<topic>&right=<draft_head>&store=<STORE>",
    "rendered_route": "/api/plugin/github/pull-rendered-diff?stack=70&left=<topic>&right=<draft_head>&store=<STORE>"
  },
  "totals": {
    "files": 1,
    "additions": 1,
    "deletions": 0,
    "exact": true
  },
  "truncated": false,
  "files": [
    {
      "path": "docs/draft.md",
      "layers": [
        {
          "number": 10,
          "place": 1,
          "path": "docs/draft.md"
        }
      ]
    }
  ],
  "guide": {
    "number": 10,
    "revision": "161cdf3eeeedf69a8203fbc796617cc789a010845c45b4a08d405766b45885d4"
  },
  "github_url": "https://github.com/octo/demo/pull/10",
  "probe": {
    "number": 10,
    "held": "161cdf3eeeedf69a8203fbc796617cc789a010845c45b4a08d405766b45885d4",
    "every_s": 5.0
  },
  "moved": {
    "since": "ebfe45cd812c6d00f8d4a921576b31d7",
    "members": []
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/stack-comparison?number=70&left=<base>&right=<draft_head>&base_policy=direct&key=ebfe45cd812c6d00f8d4a921576b31d7&build=<BUILD>&store=<STORE>'
exit: 0
--- stdout ---
api: /api/plugin/github/stack-comparison?number=70&left=<base>&right=<draft_head>&base_policy=direct&key=ebfe45cd812c6d00f8d4a921576b31d7&build=<BUILD>&store=<STORE>
status: 200
{
  "schema": "file-diff-v1",
  "schema_version": 1,
  "resolved": {
    "comparison_id": "git:59019b185288c4ad",
    "source": {
      "name": "git"
    },
    "kind": "content",
    "base_policy": "direct",
    "left": {
      "kind": "commit",
      "id": "<base>",
      "symbolic": "<base>"
    },
    "right": {
      "kind": "commit",
      "id": "<draft_head>",
      "symbolic": "<draft_head>"
    },
    "options": {
      "context": 3,
      "rename_detection": true,
      "rename_similarity": 50
    },
    "warnings": []
  },
  "manifest": {
    "files": [
      {
        "id": "f2",
        "kind": "added",
        "new": {
          "path": "docs/draft.md",
          "entry_type": "file",
          "mode": "100644",
          "content": {
            "kind": "git_object",
            "oid": "da5fc9b8d4dda2a91060b97e5e3467b4d39849bd"
          }
        },
        "binary": false,
        "availability": "ready",
        "additions": 1,
        "deletions": 0
      }
    ],
    "totals": {
      "files": 1,
      "additions": 1,
      "deletions": 0,
      "exact": true
    },
    "truncated": false
  },
  "patches": {
    "f2": {
      "file_id": "f2",
      "hunks": [
        {
          "old_start": 0,
          "old_count": 0,
          "new_start": 1,
          "new_count": 1,
          "lines": [
            {
              "op": "add",
              "text": "# Draft",
              "no_newline": false
            }
          ]
        }
      ],
      "truncated": false
    }
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pull-rendered-diff?stack=70&left=<base>&right=<draft_head>&store=<STORE>&file=f2'
exit: 0
--- stdout ---
api: /api/plugin/github/pull-rendered-diff?stack=70&left=<base>&right=<draft_head>&store=<STORE>&file=f2
status: 200
{
  "version": "markdown-diff-v1",
  "status": "ready",
  "blocks": [
    {
      "kind": "added",
      "side": "new",
      "html": "<h1 id=\"user-content-<ANCHORS>-new-draft\">Draft</h1>",
      "source_only": false
    }
  ],
  "source_only": false,
  "assets": {
    "schema_version": "kpress-asset-manifest-v2",
    "assets": [
      {
        "id": "css/style-tokens.css",
        "kind": "package",
        "path": "css/style-tokens.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "8efb2fa07a0a0370",
        "output_path": "css/style-tokens.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/style-tokens.css",
        "entry_point": true,
        "loading": "stylesheet"
      },
      {
        "id": "css/syntax.css",
        "kind": "package",
        "path": "css/syntax.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "807cf5be35b5a8dd",
        "output_path": "css/syntax.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/syntax.css",
        "entry_point": true,
        "loading": "stylesheet"
      },
      {
        "id": "css/document.css",
        "kind": "package",
        "path": "css/document.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "bc14c4d38a7a4d65",
        "output_path": "css/document.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/document.css",
        "entry_point": true,
        "loading": "stylesheet"
      },
      {
        "id": "css/components.css",
        "kind": "package",
        "path": "css/components.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "7c60e6bb7d672589",
        "output_path": "css/components.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/components.css",
        "entry_point": true,
        "loading": "stylesheet"
      },
      {
        "id": "css/print.css",
        "kind": "package",
        "path": "css/print.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "8a8f7b928ad6be2f",
        "output_path": "css/print.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/print.css",
        "entry_point": true,
        "loading": "stylesheet"
      },
      {
        "id": "css/print-fonts.css",
        "kind": "package",
        "path": "css/print-fonts.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "f4a0751b8416f372",
        "output_path": "css/print-fonts.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/print-fonts.css",
        "entry_point": true,
        "loading": "stylesheet"
      },
      {
        "id": "css/mono-planetaire-400-normal.css",
        "kind": "package",
        "path": "css/mono-planetaire-400-normal.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "9a5f82ca54019902",
        "output_path": "css/mono-planetaire-400-normal.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/mono-planetaire-400-normal.css",
        "entry_point": true,
        "loading": "stylesheet"
      },
      {
        "id": "css/mono-planetaire-700-normal.css",
        "kind": "package",
        "path": "css/mono-planetaire-700-normal.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "c5232ad5d38dc5a6",
        "output_path": "css/mono-planetaire-700-normal.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/mono-planetaire-700-normal.css",
        "entry_point": true,
        "loading": "stylesheet"
      },
      {
        "id": "css/mono-planetaire-400-italic.css",
        "kind": "package",
        "path": "css/mono-planetaire-400-italic.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "34bd1d5b7aa5a794",
        "output_path": "css/mono-planetaire-400-italic.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/mono-planetaire-400-italic.css",
        "entry_point": true,
        "loading": "stylesheet"
      },
      {
        "id": "css/mono-planetaire-700-italic.css",
        "kind": "package",
        "path": "css/mono-planetaire-700-italic.css",
        "mode": "hosted",
        "media_type": "text/css",
        "content_hash": "8fe04148a6caac2d",
        "output_path": "css/mono-planetaire-700-italic.css",
        "public_url": "/kpress-static/@e619e63103603bcc/v0.3.11/css/mono-planetaire-700-italic.css",
        "entry_point": true,
        "loading": "stylesheet"
      }
    ]
  },
  "view": "full",
  "count": 1,
  "folds": []
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/stack-comparison?number=70&left=<base>&right=<draft_head>&base_policy=direct&key=00000000000000000000000000000000&build=<BUILD>&store=<STORE>'
exit: 1
--- stdout ---
api: /api/plugin/github/stack-comparison?number=70&left=<base>&right=<draft_head>&base_policy=direct&key=00000000000000000000000000000000&build=<BUILD>&store=<STORE>
status: 410
{
  "error": "this stack has moved; read its page again for its comparison",
  "code": "stack_moved"
}
--- stderr ---
Error: /api/plugin/github/stack-comparison?number=70&left=<base>&right=<draft_head>&base_policy=direct&key=00000000000000000000000000000000&build=<BUILD>&store=<STORE> returned HTTP 410
--- gh ---
## 74 is 7 alone, drawn at 7's head.
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=74'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=74
status: 200
{
  "state": "current",
  "reason": null,
  "number": 74,
  "base_ref": "topic",
  "head_ref": "count-to-two",
  "open": true,
  "members": [
    {
      "number": 7,
      "place": 1,
      "title": "Count to two in the app",
      "state": "open",
      "author": "forker",
      "avatar": null,
      "base": "<base>",
      "head": "<fork_head>",
      "in_top": true,
      "pending": false,
      "fetching": false
    }
  ],
  "pending": [],
  "lacking": [],
  "states": {
    "open": 1,
    "draft": 0,
    "merged": 0,
    "closed": 0
  },
  "opened_at": "2026-09-16T10:57:23Z",
  "updated_at": "2026-09-16T17:39:01Z",
  "authors": [
    {
      "login": "forker",
      "avatar": null
    }
  ],
  "mergers": [],
  "fetched_at": "2026-09-17T12:00:00Z",
  "labels": [
    {
      "name": "enhancement",
      "color": "2700af",
      "description": "A label's description is its chip's tooltip"
    }
  ],
  "commits": 2,
  "size": {
    "pushed_bytes": <PUSHED>,
    "diff_bytes": 265
  },
  "comparison": {
    "left": "<base>",
    "right": "<fork_head>",
    "key": "8a0199690873e1666b6e4c3dc484f79c",
    "route": "/api/plugin/github/stack-comparison?number=74&left=<base>&right=<fork_head>&base_policy=direct&key=8a0199690873e1666b6e4c3dc484f79c&build=<BUILD>&store=<STORE>",
    "image_route": "/api/plugin/github/pull-image?stack=74&left=<base>&right=<fork_head>&store=<STORE>",
    "rendered_route": "/api/plugin/github/pull-rendered-diff?stack=74&left=<base>&right=<fork_head>&store=<STORE>"
  },
  "totals": {
    "files": 2,
    "additions": 2,
    "deletions": 0,
    "exact": true
  },
  "truncated": false,
  "files": [
    {
      "path": "docs/new.md",
      "layers": [
        {
          "number": 7,
          "place": 1,
          "path": "docs/new.md"
        }
      ]
    },
    {
      "path": "src/app.txt",
      "layers": [
        {
          "number": 7,
          "place": 1,
          "path": "src/app.txt"
        }
      ]
    }
  ],
  "guide": {
    "number": 7,
    "revision": "f704a54a7f7540c879d8976e123b50e4a04323c03bd76a38e993e6c912d84672"
  },
  "github_url": "https://github.com/octo/demo/pull/7",
  "probe": {
    "number": 7,
    "held": "f704a54a7f7540c879d8976e123b50e4a04323c03bd76a38e993e6c912d84672",
    "every_s": 5.0
  },
  "moved": null
}
--- stderr ---
--- gh ---
## 7's branch is rewritten to its earlier commit, which lacks the head the page drew: asked `since` the comparison the page drew, 7 moved, and no count says what is new.
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=74&since=8a0199690873e1666b6e4c3dc484f79c'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=74&since=8a0199690873e1666b6e4c3dc484f79c
status: 200
{
  "state": "current",
  "reason": null,
  "number": 74,
  "base_ref": "topic",
  "head_ref": "count-to-two",
  "open": true,
  "members": [
    {
      "number": 7,
      "place": 1,
      "title": "Count to two in the app",
      "state": "open",
      "author": "forker",
      "avatar": null,
      "base": "<base>",
      "head": "<fork_earlier>",
      "in_top": true,
      "pending": false,
      "fetching": false
    }
  ],
  "pending": [],
  "lacking": [],
  "states": {
    "open": 1,
    "draft": 0,
    "merged": 0,
    "closed": 0
  },
  "opened_at": "2026-09-16T10:57:23Z",
  "updated_at": "2026-09-16T17:39:01Z",
  "authors": [
    {
      "login": "forker",
      "avatar": null
    }
  ],
  "mergers": [],
  "fetched_at": "2026-09-17T12:00:00Z",
  "labels": [
    {
      "name": "enhancement",
      "color": "2700af",
      "description": "A label's description is its chip's tooltip"
    }
  ],
  "commits": 2,
  "size": {
    "pushed_bytes": <PUSHED>,
    "diff_bytes": 131
  },
  "comparison": {
    "left": "<base>",
    "right": "<fork_earlier>",
    "key": "73c1f9a36a46947990971c95114eac2a",
    "route": "/api/plugin/github/stack-comparison?number=74&left=<base>&right=<fork_earlier>&base_policy=direct&key=73c1f9a36a46947990971c95114eac2a&build=<BUILD>&store=<STORE>",
    "image_route": "/api/plugin/github/pull-image?stack=74&left=<base>&right=<fork_earlier>&store=<STORE>",
    "rendered_route": "/api/plugin/github/pull-rendered-diff?stack=74&left=<base>&right=<fork_earlier>&store=<STORE>"
  },
  "totals": {
    "files": 1,
    "additions": 1,
    "deletions": 0,
    "exact": true
  },
  "truncated": false,
  "files": [
    {
      "path": "src/app.txt",
      "layers": [
        {
          "number": 7,
          "place": 1,
          "path": "src/app.txt"
        }
      ]
    }
  ],
  "guide": {
    "number": 7,
    "revision": "925c6a3e91bbc24ddb81c526c1103d8aee9a06f09fb1744396091bff8afabf40"
  },
  "github_url": "https://github.com/octo/demo/pull/7",
  "probe": {
    "number": 7,
    "held": "925c6a3e91bbc24ddb81c526c1103d8aee9a06f09fb1744396091bff8afabf40",
    "every_s": 5.0
  },
  "moved": {
    "since": "8a0199690873e1666b6e4c3dc484f79c",
    "members": [
      {
        "number": 7,
        "commits": null
      }
    ]
  }
}
--- stderr ---
--- gh ---
## 7 gains a commit on top of the earlier one, so asked `since` the comparison a page drew there, 7 has one new commit.
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=74&since=73c1f9a36a46947990971c95114eac2a'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=74&since=73c1f9a36a46947990971c95114eac2a
status: 200
{
  "state": "current",
  "reason": null,
  "number": 74,
  "base_ref": "topic",
  "head_ref": "count-to-two",
  "open": true,
  "members": [
    {
      "number": 7,
      "place": 1,
      "title": "Count to two in the app",
      "state": "open",
      "author": "forker",
      "avatar": null,
      "base": "<base>",
      "head": "<fork_head>",
      "in_top": true,
      "pending": false,
      "fetching": false
    }
  ],
  "pending": [],
  "lacking": [],
  "states": {
    "open": 1,
    "draft": 0,
    "merged": 0,
    "closed": 0
  },
  "opened_at": "2026-09-16T10:57:23Z",
  "updated_at": "2026-09-16T17:39:01Z",
  "authors": [
    {
      "login": "forker",
      "avatar": null
    }
  ],
  "mergers": [],
  "fetched_at": "2026-09-17T12:00:00Z",
  "labels": [
    {
      "name": "enhancement",
      "color": "2700af",
      "description": "A label's description is its chip's tooltip"
    }
  ],
  "commits": 2,
  "size": {
    "pushed_bytes": <PUSHED>,
    "diff_bytes": 265
  },
  "comparison": {
    "left": "<base>",
    "right": "<fork_head>",
    "key": "8a0199690873e1666b6e4c3dc484f79c",
    "route": "/api/plugin/github/stack-comparison?number=74&left=<base>&right=<fork_head>&base_policy=direct&key=8a0199690873e1666b6e4c3dc484f79c&build=<BUILD>&store=<STORE>",
    "image_route": "/api/plugin/github/pull-image?stack=74&left=<base>&right=<fork_head>&store=<STORE>",
    "rendered_route": "/api/plugin/github/pull-rendered-diff?stack=74&left=<base>&right=<fork_head>&store=<STORE>"
  },
  "totals": {
    "files": 2,
    "additions": 2,
    "deletions": 0,
    "exact": true
  },
  "truncated": false,
  "files": [
    {
      "path": "docs/new.md",
      "layers": [
        {
          "number": 7,
          "place": 1,
          "path": "docs/new.md"
        }
      ]
    },
    {
      "path": "src/app.txt",
      "layers": [
        {
          "number": 7,
          "place": 1,
          "path": "src/app.txt"
        }
      ]
    }
  ],
  "guide": {
    "number": 7,
    "revision": "f704a54a7f7540c879d8976e123b50e4a04323c03bd76a38e993e6c912d84672"
  },
  "github_url": "https://github.com/octo/demo/pull/7",
  "probe": {
    "number": 7,
    "held": "f704a54a7f7540c879d8976e123b50e4a04323c03bd76a38e993e6c912d84672",
    "every_s": 5.0
  },
  "moved": {
    "since": "73c1f9a36a46947990971c95114eac2a",
    "members": [
      {
        "number": 7,
        "commits": 1
      }
    ]
  }
}
--- stderr ---
--- gh ---
## `since` the comparison it answers names no move, and nor does a key the route never gave; one that is not a key is refused.
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=74&since=8a0199690873e1666b6e4c3dc484f79c'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=74&since=8a0199690873e1666b6e4c3dc484f79c
status: 200
{
  "state": "current",
  "reason": null,
  "number": 74,
  "base_ref": "topic",
  "head_ref": "count-to-two",
  "open": true,
  "members": [
    {
      "number": 7,
      "place": 1,
      "title": "Count to two in the app",
      "state": "open",
      "author": "forker",
      "avatar": null,
      "base": "<base>",
      "head": "<fork_head>",
      "in_top": true,
      "pending": false,
      "fetching": false
    }
  ],
  "pending": [],
  "lacking": [],
  "states": {
    "open": 1,
    "draft": 0,
    "merged": 0,
    "closed": 0
  },
  "opened_at": "2026-09-16T10:57:23Z",
  "updated_at": "2026-09-16T17:39:01Z",
  "authors": [
    {
      "login": "forker",
      "avatar": null
    }
  ],
  "mergers": [],
  "fetched_at": "2026-09-17T12:00:00Z",
  "labels": [
    {
      "name": "enhancement",
      "color": "2700af",
      "description": "A label's description is its chip's tooltip"
    }
  ],
  "commits": 2,
  "size": {
    "pushed_bytes": <PUSHED>,
    "diff_bytes": 265
  },
  "comparison": {
    "left": "<base>",
    "right": "<fork_head>",
    "key": "8a0199690873e1666b6e4c3dc484f79c",
    "route": "/api/plugin/github/stack-comparison?number=74&left=<base>&right=<fork_head>&base_policy=direct&key=8a0199690873e1666b6e4c3dc484f79c&build=<BUILD>&store=<STORE>",
    "image_route": "/api/plugin/github/pull-image?stack=74&left=<base>&right=<fork_head>&store=<STORE>",
    "rendered_route": "/api/plugin/github/pull-rendered-diff?stack=74&left=<base>&right=<fork_head>&store=<STORE>"
  },
  "totals": {
    "files": 2,
    "additions": 2,
    "deletions": 0,
    "exact": true
  },
  "truncated": false,
  "files": [
    {
      "path": "docs/new.md",
      "layers": [
        {
          "number": 7,
          "place": 1,
          "path": "docs/new.md"
        }
      ]
    },
    {
      "path": "src/app.txt",
      "layers": [
        {
          "number": 7,
          "place": 1,
          "path": "src/app.txt"
        }
      ]
    }
  ],
  "guide": {
    "number": 7,
    "revision": "f704a54a7f7540c879d8976e123b50e4a04323c03bd76a38e993e6c912d84672"
  },
  "github_url": "https://github.com/octo/demo/pull/7",
  "probe": {
    "number": 7,
    "held": "f704a54a7f7540c879d8976e123b50e4a04323c03bd76a38e993e6c912d84672",
    "every_s": 5.0
  },
  "moved": null
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=74&since=00000000000000000000000000000000'
exit: 0
--- stdout ---
api: /api/plugin/github/stack?number=74&since=00000000000000000000000000000000
status: 200
{
  "state": "current",
  "reason": null,
  "number": 74,
  "base_ref": "topic",
  "head_ref": "count-to-two",
  "open": true,
  "members": [
    {
      "number": 7,
      "place": 1,
      "title": "Count to two in the app",
      "state": "open",
      "author": "forker",
      "avatar": null,
      "base": "<base>",
      "head": "<fork_head>",
      "in_top": true,
      "pending": false,
      "fetching": false
    }
  ],
  "pending": [],
  "lacking": [],
  "states": {
    "open": 1,
    "draft": 0,
    "merged": 0,
    "closed": 0
  },
  "opened_at": "2026-09-16T10:57:23Z",
  "updated_at": "2026-09-16T17:39:01Z",
  "authors": [
    {
      "login": "forker",
      "avatar": null
    }
  ],
  "mergers": [],
  "fetched_at": "2026-09-17T12:00:00Z",
  "labels": [
    {
      "name": "enhancement",
      "color": "2700af",
      "description": "A label's description is its chip's tooltip"
    }
  ],
  "commits": 2,
  "size": {
    "pushed_bytes": <PUSHED>,
    "diff_bytes": 265
  },
  "comparison": {
    "left": "<base>",
    "right": "<fork_head>",
    "key": "8a0199690873e1666b6e4c3dc484f79c",
    "route": "/api/plugin/github/stack-comparison?number=74&left=<base>&right=<fork_head>&base_policy=direct&key=8a0199690873e1666b6e4c3dc484f79c&build=<BUILD>&store=<STORE>",
    "image_route": "/api/plugin/github/pull-image?stack=74&left=<base>&right=<fork_head>&store=<STORE>",
    "rendered_route": "/api/plugin/github/pull-rendered-diff?stack=74&left=<base>&right=<fork_head>&store=<STORE>"
  },
  "totals": {
    "files": 2,
    "additions": 2,
    "deletions": 0,
    "exact": true
  },
  "truncated": false,
  "files": [
    {
      "path": "docs/new.md",
      "layers": [
        {
          "number": 7,
          "place": 1,
          "path": "docs/new.md"
        }
      ]
    },
    {
      "path": "src/app.txt",
      "layers": [
        {
          "number": 7,
          "place": 1,
          "path": "src/app.txt"
        }
      ]
    }
  ],
  "guide": {
    "number": 7,
    "revision": "f704a54a7f7540c879d8976e123b50e4a04323c03bd76a38e993e6c912d84672"
  },
  "github_url": "https://github.com/octo/demo/pull/7",
  "probe": {
    "number": 7,
    "held": "f704a54a7f7540c879d8976e123b50e4a04323c03bd76a38e993e6c912d84672",
    "every_s": 5.0
  },
  "moved": null
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/stack?number=74&since=main'
exit: 1
--- stdout ---
api: /api/plugin/github/stack?number=74&since=main
status: 400
{
  "error": "\"since\" is a stack comparison's key",
  "code": "invalid_request"
}
--- stderr ---
Error: /api/plugin/github/stack?number=74&since=main returned HTTP 400
--- gh ---
