# metab https://github.com/octo/demo --api /api/plugin/github/pulls
exit: 0
--- stdout ---
api: /api/plugin/github/pulls
status: 200
{
  "state": "absent",
  "reason": "not_cached",
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": null,
  "checked_at": null,
  "reader": null,
  "fresh_for_s": 60.0,
  "probe_every_s": null,
  "refreshing": false,
  "last_refresh": null,
  "total": null,
  "repository_total": null,
  "filter_totals": null,
  "count_at": null,
  "catalog_fetched": 0,
  "generation": null,
  "fetched": 0,
  "complete": false,
  "truncated": false,
  "limit": 100,
  "next_after": null,
  "rows": []
}
--- stderr ---
cloning https://github.com/octo/demo into <HOME>
cloned https://github.com/octo/demo in 0.0 s
--- gh ---
gh auth status
gh api repos/octo/demo --jq .size
# metab https://github.com/octo/demo --api /api/plugin/github/pulls-refresh --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pulls-refresh
status: 202
{
  "refresh": "started",
  "pulls": {
    "state": "pending",
    "reason": null,
    "source": "https://github.com/octo/demo",
    "list": "open",
    "fetched_at": null,
    "checked_at": null,
    "reader": null,
    "fresh_for_s": 60.0,
    "probe_every_s": null,
    "refreshing": true,
    "last_refresh": null,
    "total": null,
    "repository_total": null,
    "filter_totals": null,
    "count_at": null,
    "catalog_fetched": 0,
    "generation": null,
    "fetched": 0,
    "complete": false,
    "truncated": false,
    "limit": 0,
    "next_after": null,
    "rows": []
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "not_due",
  "status_scan_at": null
}
after: /api/plugin/github/pulls?state=open&limit=0
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:00:00Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:00:00Z"
  },
  "total": 598,
  "repository_total": 600,
  "filter_totals": {
    "all": 600,
    "open": 598,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 600,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 598,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:00:00Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 12,
    "response_body_bytes": 492533
  }
}
--- stderr ---
--- body ---
{"target": 500}
--- gh ---
gh api user
gh api graphql catalog state=open cursor=start
gh api graphql catalog state=open cursor=open-100
gh api graphql catalog state=open cursor=open-200
gh api graphql catalog state=open cursor=open-300
gh api graphql catalog state=open cursor=open-400
gh api graphql catalog state=all cursor=start
gh api graphql catalog state=all cursor=all-100
gh api graphql catalog state=all cursor=all-200
gh api graphql catalog state=all cursor=all-300
gh api graphql catalog state=all cursor=all-400
gh api graphql catalog state=all cursor=all-500
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?limit=2'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?limit=2
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:00:00Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:00:00Z"
  },
  "total": 598,
  "repository_total": 600,
  "filter_totals": {
    "all": 600,
    "open": 598,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 600,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 598,
  "complete": true,
  "truncated": false,
  "limit": 2,
  "next_after": 7,
  "rows": [
    {
      "number": 10,
      "title": "WIP: draft the next page",
      "state": "open",
      "draft": true,
      "merged_at": null,
      "author": "maintainer",
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-16T17:39:01Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "wip",
      "head_repository": "octo/demo",
      "labels": [],
      "head_oid": "7a7d6596e515735d244dc1d942463c95851e139c",
      "merged": false
    },
    {
      "number": 7,
      "title": "Count to two in the app",
      "state": "open",
      "draft": false,
      "merged_at": null,
      "author": "forker",
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-16T17:39:01Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "count-to-two",
      "head_repository": "forker/demo",
      "labels": [
        "enhancement"
      ],
      "head_oid": "85fcb2fa9e77eb5db485ffef445cbbc645d6db4a",
      "merged": false
    }
  ],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:00:00Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 12,
    "response_body_bytes": 492533
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?limit=2&after=605'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?limit=2&after=605
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:00:00Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:00:00Z"
  },
  "total": 598,
  "repository_total": 600,
  "filter_totals": {
    "all": 600,
    "open": 598,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 600,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 598,
  "complete": true,
  "truncated": false,
  "limit": 2,
  "next_after": 603,
  "rows": [
    {
      "number": 604,
      "title": "Work item 604",
      "state": "open",
      "draft": false,
      "merged_at": null,
      "author": "contributor",
      "author_avatar_url": null,
      "created_at": "2026-09-16T12:10:04Z",
      "updated_at": "2026-09-16T12:10:04Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "work-604",
      "head_repository": "octo/demo",
      "labels": [],
      "head_oid": "0000000000000000000000000000000000000000",
      "merged": false
    },
    {
      "number": 603,
      "title": "Work item 603",
      "state": "open",
      "draft": false,
      "merged_at": null,
      "author": "contributor",
      "author_avatar_url": null,
      "created_at": "2026-09-16T12:10:03Z",
      "updated_at": "2026-09-16T12:10:03Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "work-603",
      "head_repository": "octo/demo",
      "labels": [],
      "head_oid": "0000000000000000000000000000000000000000",
      "merged": false
    }
  ],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:00:00Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 12,
    "response_body_bytes": 492533
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?limit=2&after=10'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?limit=2&after=10
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:00:00Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:00:00Z"
  },
  "total": 598,
  "repository_total": 600,
  "filter_totals": {
    "all": 600,
    "open": 598,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 600,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 598,
  "complete": true,
  "truncated": false,
  "limit": 2,
  "next_after": 606,
  "rows": [
    {
      "number": 7,
      "title": "Count to two in the app",
      "state": "open",
      "draft": false,
      "merged_at": null,
      "author": "forker",
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-16T17:39:01Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "count-to-two",
      "head_repository": "forker/demo",
      "labels": [
        "enhancement"
      ],
      "head_oid": "85fcb2fa9e77eb5db485ffef445cbbc645d6db4a",
      "merged": false
    },
    {
      "number": 606,
      "title": "Work item 606",
      "state": "open",
      "draft": false,
      "merged_at": null,
      "author": "contributor",
      "author_avatar_url": null,
      "created_at": "2026-09-16T12:10:06Z",
      "updated_at": "2026-09-16T12:10:06Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "work-606",
      "head_repository": "octo/demo",
      "labels": [],
      "head_oid": "0000000000000000000000000000000000000000",
      "merged": false
    }
  ],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:00:00Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 12,
    "response_body_bytes": 492533
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api /api/plugin/github/pulls-refresh --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pulls-refresh
status: 200
{
  "refresh": "not_due",
  "pulls": {
    "state": "current",
    "reason": null,
    "source": "https://github.com/octo/demo",
    "list": "open",
    "fetched_at": "2026-09-17T12:00:00Z",
    "checked_at": null,
    "reader": "gh:octo-reader",
    "fresh_for_s": 60.0,
    "probe_every_s": 10.0,
    "refreshing": false,
    "last_refresh": {
      "outcome": "succeeded",
      "message": null,
      "reset_at": null,
      "at": "2026-09-17T12:00:00Z"
    },
    "total": 598,
    "repository_total": 600,
    "filter_totals": {
      "all": 600,
      "open": 598,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 600,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 598,
    "complete": true,
    "truncated": false,
    "limit": 0,
    "next_after": null,
    "rows": [],
    "refresh_timing": {
      "finished_at": "2026-09-17T12:00:00Z",
      "duration_ms": 300,
      "provider": "github_cli",
      "request_count": 12,
      "response_body_bytes": 492533
    }
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "started",
  "status_scan_at": null
}
--- stderr ---
--- body ---
{"target": 1000}
--- gh ---
gh api repos/octo/demo/issues?state=all&sort=updated&direction=desc&per_page=1
gh api graphql statuses cursor=start
gh api graphql statuses cursor=statuses-25
gh api graphql statuses cursor=statuses-50
gh api graphql statuses cursor=statuses-75
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?limit=0'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?limit=0
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:00:00Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:00:00Z"
  },
  "total": 598,
  "repository_total": 600,
  "filter_totals": {
    "all": 600,
    "open": 598,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 600,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 598,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:00:00Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 12,
    "response_body_bytes": 492533
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?state=closed'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?state=closed
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "closed",
  "fetched_at": "2026-09-17T12:00:00Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:00:00Z"
  },
  "total": 2,
  "repository_total": 600,
  "filter_totals": {
    "all": 600,
    "open": 598,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 600,
  "generation": "<CATALOG_EPOCH_1>:1",
  "fetched": 2,
  "complete": true,
  "truncated": false,
  "limit": 100,
  "next_after": null,
  "rows": [
    {
      "number": 9,
      "title": "spam",
      "state": "closed",
      "draft": false,
      "merged_at": null,
      "author": null,
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-16T17:39:01Z",
      "closed_at": "2026-09-16T19:00:00Z",
      "base_ref": "topic",
      "head_ref": "spam",
      "head_repository": null,
      "labels": [
        "invalid"
      ],
      "head_oid": "0fe10aeb84bee6fe05150d6d9f6da3f4d68549bd",
      "merged": false
    },
    {
      "number": 8,
      "title": "Say more in the guide",
      "state": "closed",
      "draft": false,
      "merged_at": "2026-09-16T18:00:00Z",
      "author": "maintainer",
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-16T17:39:01Z",
      "closed_at": "2026-09-16T18:00:00Z",
      "base_ref": "topic",
      "head_ref": "guide-more",
      "head_repository": "octo/demo",
      "labels": [],
      "head_oid": "8ae27617c9c475851b67ee69433d008836d112ba",
      "merged": true
    }
  ],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:00:00Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 12,
    "response_body_bytes": 492533
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?state=all&limit=0'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?state=all&limit=0
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "all",
  "fetched_at": "2026-09-17T12:00:00Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:00:00Z"
  },
  "total": 600,
  "repository_total": 600,
  "filter_totals": {
    "all": 600,
    "open": 598,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 600,
  "generation": "<CATALOG_EPOCH_1>:1",
  "fetched": 600,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:00:00Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 12,
    "response_body_bytes": 492533
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?q=9'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?q=9
status: 200
{
  "rows": [
    {
      "number": 9,
      "title": "spam",
      "state": "closed"
    }
  ],
  "complete": true,
  "limited": false,
  "truncated": false,
  "refreshing": false
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?q=%23++GUIDE+say'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?q=%23++GUIDE+say
status: 200
{
  "rows": [
    {
      "number": 8,
      "title": "Say more in the guide",
      "state": "merged"
    }
  ],
  "complete": true,
  "limited": false,
  "truncated": false,
  "refreshing": false
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?q=%23'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?q=%23
status: 200
{"rows": [[606, "open"], [605, "open"], [604, "open"], [603, "open"], [602, "open"], [601, "open"], [600, "open"], [599, "open"], [598, "open"], [597, "open"], [596, "open"], [595, "open"]], "complete": true, "limited": false, "truncated": true, "refreshing": false}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?state=open&q=%239'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?state=open&q=%239
status: 200
{"rows": [[9, "closed"], [99, "open"], [98, "open"], [97, "open"], [96, "open"], [95, "open"], [94, "open"], [93, "open"], [92, "open"], [91, "open"], [90, "open"]], "complete": true, "limited": false, "truncated": false, "refreshing": false}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?q=work+item+5'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?q=work+item+5
status: 200
{
  "rows": [
    {
      "number": 605,
      "title": "Work item 605",
      "state": "open"
    },
    {
      "number": 599,
      "title": "Work item 599",
      "state": "open"
    },
    {
      "number": 598,
      "title": "Work item 598",
      "state": "open"
    },
    {
      "number": 597,
      "title": "Work item 597",
      "state": "open"
    },
    {
      "number": 596,
      "title": "Work item 596",
      "state": "open"
    },
    {
      "number": 595,
      "title": "Work item 595",
      "state": "open"
    },
    {
      "number": 594,
      "title": "Work item 594",
      "state": "open"
    },
    {
      "number": 593,
      "title": "Work item 593",
      "state": "open"
    },
    {
      "number": 592,
      "title": "Work item 592",
      "state": "open"
    },
    {
      "number": 591,
      "title": "Work item 591",
      "state": "open"
    },
    {
      "number": 590,
      "title": "Work item 590",
      "state": "open"
    },
    {
      "number": 589,
      "title": "Work item 589",
      "state": "open"
    }
  ],
  "complete": true,
  "limited": false,
  "truncated": true,
  "refreshing": false
}
--- stderr ---
--- gh ---
## The clock moves on 61 s, to 2026-09-17T12:01:01Z.
# metab https://github.com/octo/demo --api /api/plugin/github/pulls-refresh --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pulls-refresh
status: 202
{
  "refresh": "started",
  "pulls": {
    "state": "stale",
    "reason": null,
    "source": "https://github.com/octo/demo",
    "list": "open",
    "fetched_at": "2026-09-17T12:00:00Z",
    "checked_at": null,
    "reader": "gh:octo-reader",
    "fresh_for_s": 60.0,
    "probe_every_s": 10.0,
    "refreshing": true,
    "last_refresh": {
      "outcome": "succeeded",
      "message": null,
      "reset_at": null,
      "at": "2026-09-17T12:00:00Z"
    },
    "total": 598,
    "repository_total": 600,
    "filter_totals": {
      "all": 600,
      "open": 598,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 600,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 598,
    "complete": true,
    "truncated": false,
    "limit": 0,
    "next_after": null,
    "rows": [],
    "refresh_timing": {
      "finished_at": "2026-09-17T12:00:00Z",
      "duration_ms": 300,
      "provider": "github_cli",
      "request_count": 12,
      "response_body_bytes": 492533
    }
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "not_due",
  "status_scan_at": "2026-09-17T12:00:00Z"
}
after: /api/plugin/github/pulls?state=open&limit=0
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:01:01Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 599,
  "repository_total": 601,
  "filter_totals": {
    "all": 601,
    "open": 599,
    "closed": 2
  },
  "count_at": "2026-09-17T12:01:01Z",
  "catalog_fetched": 601,
  "generation": "<CATALOG_EPOCH_1>:1",
  "fetched": 599,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:01:01Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 2,
    "response_body_bytes": 44905
  }
}
--- stderr ---
--- body ---
{}
--- gh ---
gh api user
gh api graphql catalog state=updated cursor=start
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?limit=2'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?limit=2
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:01:01Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 599,
  "repository_total": 601,
  "filter_totals": {
    "all": 601,
    "open": 599,
    "closed": 2
  },
  "count_at": "2026-09-17T12:01:01Z",
  "catalog_fetched": 601,
  "generation": "<CATALOG_EPOCH_1>:1",
  "fetched": 599,
  "complete": true,
  "truncated": false,
  "limit": 2,
  "next_after": 10,
  "rows": [
    {
      "number": 607,
      "title": "Work item 607",
      "state": "open",
      "draft": false,
      "merged_at": null,
      "author": "contributor",
      "author_avatar_url": null,
      "created_at": "2026-09-17T12:01:01Z",
      "updated_at": "2026-09-17T12:01:01Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "work-607",
      "head_repository": "octo/demo",
      "labels": [],
      "head_oid": "0000000000000000000000000000000000000000",
      "merged": false
    },
    {
      "number": 10,
      "title": "Retitled after catalog backfill",
      "state": "open",
      "draft": true,
      "merged_at": null,
      "author": "maintainer",
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-17T12:01:01Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "wip",
      "head_repository": "octo/demo",
      "labels": [],
      "head_oid": "7a7d6596e515735d244dc1d942463c95851e139c",
      "merged": false
    }
  ],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:01:01Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 2,
    "response_body_bytes": 44905
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?after=10&limit=2'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?after=10&limit=2
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:01:01Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 599,
  "repository_total": 601,
  "filter_totals": {
    "all": 601,
    "open": 599,
    "closed": 2
  },
  "count_at": "2026-09-17T12:01:01Z",
  "catalog_fetched": 601,
  "generation": "<CATALOG_EPOCH_1>:1",
  "fetched": 599,
  "complete": true,
  "truncated": false,
  "limit": 2,
  "next_after": 606,
  "rows": [
    {
      "number": 7,
      "title": "Count to two in the app",
      "state": "open",
      "draft": false,
      "merged_at": null,
      "author": "forker",
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-16T17:39:01Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "count-to-two",
      "head_repository": "forker/demo",
      "labels": [
        "enhancement"
      ],
      "head_oid": "85fcb2fa9e77eb5db485ffef445cbbc645d6db4a",
      "merged": false
    },
    {
      "number": 606,
      "title": "Work item 606",
      "state": "open",
      "draft": false,
      "merged_at": null,
      "author": "contributor",
      "author_avatar_url": null,
      "created_at": "2026-09-16T12:10:06Z",
      "updated_at": "2026-09-16T12:10:06Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "work-606",
      "head_repository": "octo/demo",
      "labels": [],
      "head_oid": "0000000000000000000000000000000000000000",
      "merged": false
    }
  ],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:01:01Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 2,
    "response_body_bytes": 44905
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?state=all&at=10&limit=2'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?state=all&at=10&limit=2
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "all",
  "fetched_at": "2026-09-17T12:01:01Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 601,
  "repository_total": 601,
  "filter_totals": {
    "all": 601,
    "open": 599,
    "closed": 2
  },
  "count_at": "2026-09-17T12:01:01Z",
  "catalog_fetched": 601,
  "generation": "<CATALOG_EPOCH_1>:2",
  "fetched": 601,
  "complete": true,
  "truncated": false,
  "limit": 2,
  "next_after": null,
  "rows": [
    {
      "number": 10,
      "title": "Retitled after catalog backfill",
      "state": "open",
      "draft": true,
      "merged_at": null,
      "author": "maintainer",
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-17T12:01:01Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "wip",
      "head_repository": "octo/demo",
      "labels": [],
      "head_oid": "7a7d6596e515735d244dc1d942463c95851e139c",
      "merged": false
    }
  ],
  "position": 1,
  "refresh_timing": {
    "finished_at": "2026-09-17T12:01:01Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 2,
    "response_body_bytes": 44905
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api /api/plugin/github/pulls-refresh --data request.json
exit: 1
--- stdout ---
api: /api/plugin/github/pulls-refresh
status: 202
{
  "refresh": "started",
  "pulls": {
    "state": "current",
    "reason": null,
    "source": "https://github.com/octo/demo",
    "list": "open",
    "fetched_at": "2026-09-17T12:01:01Z",
    "checked_at": null,
    "reader": "gh:octo-reader",
    "fresh_for_s": 60.0,
    "probe_every_s": 10.0,
    "refreshing": true,
    "last_refresh": {
      "outcome": "succeeded",
      "message": null,
      "reset_at": null,
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 599,
    "repository_total": 601,
    "filter_totals": {
      "all": 601,
      "open": 599,
      "closed": 2
    },
    "count_at": "2026-09-17T12:01:01Z",
    "catalog_fetched": 601,
    "generation": "<CATALOG_EPOCH_1>:1",
    "fetched": 599,
    "complete": true,
    "truncated": false,
    "limit": 0,
    "next_after": null,
    "rows": [],
    "refresh_timing": {
      "finished_at": "2026-09-17T12:01:01Z",
      "duration_ms": 300,
      "provider": "github_cli",
      "request_count": 2,
      "response_body_bytes": 44905
    }
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "started",
  "status_scan_at": "2026-09-17T12:00:00Z"
}
after: /api/plugin/github/pulls?state=open&limit=0
status: 200
{
  "state": "stale",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:01:01Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "network_error",
    "message": "GitHub could not be reached because api.github.com did not resolve (DNS)",
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 599,
  "repository_total": 601,
  "filter_totals": {
    "all": 601,
    "open": 599,
    "closed": 2
  },
  "count_at": "2026-09-17T12:01:01Z",
  "catalog_fetched": 601,
  "generation": "<CATALOG_EPOCH_1>:1",
  "fetched": 599,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:01:01Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 2,
    "response_body_bytes": 44905
  }
}
--- stderr ---
Error: the refresh ended with network_error
--- body ---
{"retry": true}
--- gh ---
gh api user
gh auth status
gh api graphql catalog state=open cursor=start
gh api graphql statuses cursor=start
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?limit=0'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?limit=0
status: 200
{
  "state": "stale",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:01:01Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "network_error",
    "message": "GitHub could not be reached because api.github.com did not resolve (DNS)",
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 599,
  "repository_total": 601,
  "filter_totals": {
    "all": 601,
    "open": 599,
    "closed": 2
  },
  "count_at": "2026-09-17T12:01:01Z",
  "catalog_fetched": 601,
  "generation": "<CATALOG_EPOCH_1>:1",
  "fetched": 599,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:01:01Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 2,
    "response_body_bytes": 44905
  }
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api /api/plugin/github/pulls-refresh --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pulls-refresh
status: 202
{
  "refresh": "started",
  "pulls": {
    "state": "stale",
    "reason": null,
    "source": "https://github.com/octo/demo",
    "list": "open",
    "fetched_at": "2026-09-17T12:01:01Z",
    "checked_at": null,
    "reader": "gh:octo-reader",
    "fresh_for_s": 60.0,
    "probe_every_s": 10.0,
    "refreshing": true,
    "last_refresh": {
      "outcome": "network_error",
      "message": "GitHub could not be reached because api.github.com did not resolve (DNS)",
      "reset_at": null,
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 599,
    "repository_total": 601,
    "filter_totals": {
      "all": 601,
      "open": 599,
      "closed": 2
    },
    "count_at": "2026-09-17T12:01:01Z",
    "catalog_fetched": 601,
    "generation": "<CATALOG_EPOCH_1>:1",
    "fetched": 599,
    "complete": true,
    "truncated": false,
    "limit": 0,
    "next_after": null,
    "rows": [],
    "refresh_timing": {
      "finished_at": "2026-09-17T12:01:01Z",
      "duration_ms": 300,
      "provider": "github_cli",
      "request_count": 2,
      "response_body_bytes": 44905
    }
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "started",
  "status_scan_at": "2026-09-17T12:01:01Z"
}
after: /api/plugin/github/pulls?state=open&limit=0
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:01:01Z",
  "checked_at": null,
  "reader": "gh:someone-else",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 98,
  "repository_total": 100,
  "filter_totals": {
    "all": 100,
    "open": 98,
    "closed": 2
  },
  "count_at": "2026-09-17T12:01:01Z",
  "catalog_fetched": 100,
  "generation": "<CATALOG_EPOCH_2>:0",
  "fetched": 98,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:01:01Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 3,
    "response_body_bytes": 88297
  }
}
--- stderr ---
--- body ---
{"retry": true}
--- gh ---
gh api user
gh api graphql catalog state=open cursor=start
gh api graphql catalog state=all cursor=start
gh api graphql statuses cursor=start
## A visible pull request prepares its description from one GraphQL batch.
# metab https://github.com/octo/demo --api /api/plugin/github/pull-cores-prepare --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pull-cores-prepare
status: 202
{
  "preparation": "started",
  "status_route": "/api/plugin/github/pull?number=7"
}
after: /api/plugin/github/pull?number=7
status: 200
{
  "state": "absent",
  "reason": "not_cached",
  "source": "https://github.com/octo/demo",
  "number": 7,
  "pin": "c691256511d05858850bc7684ae062fea0d41132",
  "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": {
    "source": "https://github.com/octo/demo",
    "number": 7,
    "reader": "gh:someone-else",
    "pull": {
      "number": 7,
      "title": "Count to two in the app",
      "body": "The app counts to one.\r\n\r\nThis teaches it **two**.",
      "body_truncated": false,
      "state": "open",
      "draft": false,
      "merged": false,
      "merged_by": null,
      "merged_by_avatar_url": null,
      "commits": 2,
      "merge_commit_sha": null,
      "labels": [
        {
          "name": "enhancement",
          "color": "2700af",
          "description": "A label's description is its chip's tooltip"
        }
      ],
      "author": "forker",
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-16T17:39:01Z",
      "merged_at": null,
      "closed_at": null,
      "base": {
        "ref": "topic",
        "sha": "07b55f07793d9ed4e9f3e130c4414d979137bc53",
        "repository": "octo/demo"
      },
      "head": {
        "ref": "count-to-two",
        "sha": "85fcb2fa9e77eb5db485ffef445cbbc645d6db4a",
        "repository": "forker/demo"
      },
      "html_url": "https://github.com/octo/demo/pull/7"
    },
    "comparison_state": "not_started",
    "observed_at": "2026-09-17T12:01:01Z",
    "revision": "dc404e32b2e1850bc1c65c44e3dd726c14fcb14d4d55da65b0b54fa289eea071"
  },
  "repository_labels": [],
  "labels_pending": false,
  "status": {
    "number": 7,
    "head": "85fcb2fa9e77eb5db485ffef445cbbc645d6db4a",
    "base_ref": "topic",
    "base": "07b55f07793d9ed4e9f3e130c4414d979137bc53",
    "observed_at": "2026-09-17T12:00:00Z",
    "observed_by": "scan",
    "conflicts": "mergeable",
    "merge_state": "blocked",
    "review_decision": "review_required",
    "checks": {
      "state": "pending",
      "counts": {
        "pass": 2,
        "fail": 0,
        "pending": 1,
        "skipping": 0,
        "cancel": 0
      },
      "required_failing": null,
      "required_pending": null,
      "listed_at": null,
      "moved_at": null
    },
    "auto_merge": {
      "method": "squash",
      "enabled_by": "maintainer",
      "enabled_at": "2026-09-16T17:40:00Z"
    },
    "queue": null
  },
  "readiness": {
    "verdict": "checks_pending",
    "tone": "attention",
    "label": "Checks pending",
    "head": "85fcb2fa9e77eb5db485ffef445cbbc645d6db4a",
    "observed_at": "2026-09-17T12:00:00Z",
    "requirements": [
      {
        "kind": "conflicts",
        "status": "met",
        "summary": "No merge conflicts with topic.",
        "github_url": null,
        "tone": "success"
      },
      {
        "kind": "checks",
        "status": "waiting",
        "summary": "Some checks are still pending: 2 successful, and 1 pending.",
        "github_url": "https://github.com/octo/demo/pull/7/checks",
        "tone": "attention"
      },
      {
        "kind": "reviews",
        "status": "waiting",
        "summary": "Review required.",
        "github_url": "https://github.com/octo/demo/pull/7",
        "tone": "attention"
      }
    ],
    "auto_merge": {
      "method": "squash",
      "enabled_by": "maintainer",
      "enabled_at": "2026-09-16T17:40:00Z"
    },
    "auto_merge_summary": "Auto-merge enabled (squash)."
  },
  "checks": null,
  "status_unavailable": null
}
--- stderr ---
--- body ---
{"state": "open", "window": {"id": "visible-7", "generation": "<CATALOG_EPOCH_2>:0"}, "numbers": [7]}
--- gh ---
gh api graphql visible-cores numbers=7
## The clock moves on 61 s, to 2026-09-17T12:02:02Z.
## A new command reopens the prepared description from disk without GitHub.
# metab https://github.com/octo/demo --api '/api/plugin/github/pull?number=7'
exit: 0
--- stdout ---
api: /api/plugin/github/pull?number=7
status: 200
{
  "state": "absent",
  "reason": "not_cached",
  "source": "https://github.com/octo/demo",
  "number": 7,
  "pin": "c691256511d05858850bc7684ae062fea0d41132",
  "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": {
    "source": "https://github.com/octo/demo",
    "number": 7,
    "reader": "gh:someone-else",
    "pull": {
      "number": 7,
      "title": "Count to two in the app",
      "body": "The app counts to one.\r\n\r\nThis teaches it **two**.",
      "body_truncated": false,
      "state": "open",
      "draft": false,
      "merged": false,
      "merged_by": null,
      "merged_by_avatar_url": null,
      "commits": 2,
      "merge_commit_sha": null,
      "labels": [
        {
          "name": "enhancement",
          "color": "2700af",
          "description": "A label's description is its chip's tooltip"
        }
      ],
      "author": "forker",
      "author_avatar_url": null,
      "created_at": "2026-09-16T10:57:23Z",
      "updated_at": "2026-09-16T17:39:01Z",
      "merged_at": null,
      "closed_at": null,
      "base": {
        "ref": "topic",
        "sha": "07b55f07793d9ed4e9f3e130c4414d979137bc53",
        "repository": "octo/demo"
      },
      "head": {
        "ref": "count-to-two",
        "sha": "85fcb2fa9e77eb5db485ffef445cbbc645d6db4a",
        "repository": "forker/demo"
      },
      "html_url": "https://github.com/octo/demo/pull/7"
    },
    "comparison_state": "not_started",
    "observed_at": "2026-09-17T12:01:01Z",
    "revision": "dc404e32b2e1850bc1c65c44e3dd726c14fcb14d4d55da65b0b54fa289eea071"
  },
  "repository_labels": [],
  "labels_pending": false,
  "status": {
    "number": 7,
    "head": "85fcb2fa9e77eb5db485ffef445cbbc645d6db4a",
    "base_ref": "topic",
    "base": "07b55f07793d9ed4e9f3e130c4414d979137bc53",
    "observed_at": "2026-09-17T12:00:00Z",
    "observed_by": "scan",
    "conflicts": "mergeable",
    "merge_state": "blocked",
    "review_decision": "review_required",
    "checks": {
      "state": "pending",
      "counts": {
        "pass": 2,
        "fail": 0,
        "pending": 1,
        "skipping": 0,
        "cancel": 0
      },
      "required_failing": null,
      "required_pending": null,
      "listed_at": null,
      "moved_at": null
    },
    "auto_merge": {
      "method": "squash",
      "enabled_by": "maintainer",
      "enabled_at": "2026-09-16T17:40:00Z"
    },
    "queue": null
  },
  "readiness": {
    "verdict": "checks_pending",
    "tone": "attention",
    "label": "Checks pending",
    "head": "85fcb2fa9e77eb5db485ffef445cbbc645d6db4a",
    "observed_at": "2026-09-17T12:00:00Z",
    "requirements": [
      {
        "kind": "conflicts",
        "status": "met",
        "summary": "No merge conflicts with topic.",
        "github_url": null,
        "tone": "success"
      },
      {
        "kind": "checks",
        "status": "waiting",
        "summary": "Some checks are still pending: 2 successful, and 1 pending.",
        "github_url": "https://github.com/octo/demo/pull/7/checks",
        "tone": "attention"
      },
      {
        "kind": "reviews",
        "status": "waiting",
        "summary": "Review required.",
        "github_url": "https://github.com/octo/demo/pull/7",
        "tone": "attention"
      }
    ],
    "auto_merge": {
      "method": "squash",
      "enabled_by": "maintainer",
      "enabled_at": "2026-09-16T17:40:00Z"
    },
    "auto_merge_summary": "Auto-merge enabled (squash)."
  },
  "checks": null,
  "status_unavailable": null
}
--- stderr ---
--- gh ---
## The prepared description renders as Markdown from the core alone, without GitHub, so a page shows a preview's description rendered while its record is fetched (mb-d59o).
# metab https://github.com/octo/demo --api '/api/plugin/github/pull-markdown?number=7&part=body'
exit: 0
--- stdout ---
api: /api/plugin/github/pull-markdown?number=7&part=body
status: 200
{
  "number": 7,
  "fetched_at": null,
  "record_revision": null,
  "core_revision": "dc404e32b2e1850bc1c65c44e3dd726c14fcb14d4d55da65b0b54fa289eea071",
  "part": "body",
  "html": "\n<div><div><p>The app counts to one.</p>\n<p>This teaches it <strong>two</strong>.</p></div></div>"
}
--- stderr ---
--- gh ---
## A core holds the description alone, so any other part waits for the record.
# metab https://github.com/octo/demo --api '/api/plugin/github/pull-markdown?number=7&part=review/1'
exit: 1
--- stdout ---
api: /api/plugin/github/pull-markdown?number=7&part=review/1
status: 404
{
  "error": "This pull request has not been loaded.",
  "code": "not_cached"
}
--- stderr ---
Error: /api/plugin/github/pull-markdown?number=7&part=review/1 returned HTTP 404
--- gh ---
# metab https://github.com/octo/demo --api /api/plugin/github/pull-cores-prepare --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pull-cores-prepare
status: 200
{
  "preparation": "ready",
  "ready_numbers": [
    7
  ],
  "skipped_numbers": []
}
--- stderr ---
--- body ---
{"state": "open", "window": {"id": "reopened-7", "generation": "<CATALOG_EPOCH_2>:0"}, "numbers": [7]}
--- gh ---
## A leased member remains unfinished while cached siblings retain coverage.
# metab https://github.com/octo/demo --api /api/plugin/github/pull-cores-prepare --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pull-cores-prepare
status: 200
{
  "preparation": "partial",
  "ready_numbers": [
    7
  ],
  "skipped_numbers": [],
  "retry_numbers": [
    8
  ],
  "retry_at": "2026-09-17T12:03:02Z"
}
--- stderr ---
--- body ---
{"state": "all", "window": {"id": "leased-8", "generation": "<CATALOG_EPOCH_2>:1"}, "numbers": [7, 8]}
--- gh ---
## GitHub reports 1,000 of 5,000 GraphQL points left, under the quarter automatic work leaves to the reader. A batch that would read GitHub is held, with no request; one the cache covers is still answered.
# metab https://github.com/octo/demo --api /api/plugin/github/pull-cores-prepare --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pull-cores-prepare
status: 200
{
  "preparation": "held",
  "failure": null
}
--- stderr ---
--- body ---
{"state": "all", "window": {"id": "held-8", "generation": "<CATALOG_EPOCH_2>:1"}, "numbers": [8]}
--- gh ---
# metab https://github.com/octo/demo --api /api/plugin/github/pull-cores-prepare --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pull-cores-prepare
status: 200
{
  "preparation": "ready",
  "ready_numbers": [
    7
  ],
  "skipped_numbers": []
}
--- stderr ---
--- body ---
{"state": "all", "window": {"id": "held-8", "generation": "<CATALOG_EPOCH_2>:1"}, "numbers": [7]}
--- gh ---
## The same batch for rows on screen is not held by the floor, which is a reserve for the reader: what the reader is looking at is still read.
# metab https://github.com/octo/demo --api /api/plugin/github/pull-cores-prepare --data request.json
exit: 0
--- stdout ---
status: 202
{"preparation": "started", "status_route": "/api/plugin/github/pull?number=8"}
--- stderr ---
--- body ---
{"state": "all", "window": {"id": "held-8", "generation": "<CATALOG_EPOCH_2>:1"}, "numbers": [8], "lane": "visible"}
--- gh ---
gh api graphql visible-cores numbers=8
# metab root --api /api/cache/source/github-com-octo-demo-9vhngza0oa1
exit: 0
--- stdout ---
api: /api/cache/source/github-com-octo-demo-9vhngza0oa1
status: 200
{
  "home": "present",
  "layout_format": "f03",
  "source": {
    "slug": "github-com-octo-demo-9vhngza0oa1",
    "publication": "published",
    "identity": {
      "id": "sha256:46386669dc018f7570de90cce6b7e97fcdcf2d10c5a4949e668d38336b0fb12e",
      "display_url": "https://github.com/octo/demo",
      "clone_url": "https://github.com/octo/demo",
      "transport": "https",
      "created_at": "2026-09-17T12:00:00Z"
    },
    "alias": {
      "store_id": "sha256:65157fba6c20ff9076eace172457003c29579e62f37f276de021d59f37cb9ab4",
      "generation": 1,
      "updated_at": "2026-09-17T12:00:00Z"
    },
    "state": {
      "last_opened_at": "2026-09-17T12:00:00Z"
    },
    "problems": [],
    "store": {
      "key": "github-com-octo-demo-e7qjzskw2rq",
      "id": "sha256:65157fba6c20ff9076eace172457003c29579e62f37f276de021d59f37cb9ab4",
      "publication": "published",
      "mode": "full",
      "lender": null,
      "identity": {
        "created_at": "2026-09-17T12:00:00Z",
        "acquisition": {
          "git_version": "<GIT_VERSION>",
          "object_format": "sha1"
        }
      },
      "state": {
        "default_remote_ref": "refs/remotes/origin/topic",
        "default_revision": "c691256511d05858850bc7684ae062fea0d41132",
        "last_fetch_at": "2026-09-17T12:00:00Z",
        "last_operation": {
          "kind": "acquire",
          "outcome": "succeeded",
          "at": "2026-09-17T12:00:00Z"
        }
      },
      "problems": []
    }
  }
}
--- stderr ---
--- gh ---
## Clearing the repository's GitHub cache removes every file the plugin keeps for it, and nothing of the source or its store; the list is then not cached until a refresh fetches it again.
# metab https://github.com/octo/demo --api /api/plugin/github/cache-clear --data -
exit: 0
--- stdout ---
api: /api/plugin/github/cache-clear
status: 200
{
  "cleared": 7,
  "source": "https://github.com/octo/demo"
}
--- stderr ---
--- body ---
{}
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?limit=0'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?limit=0
status: 200
{
  "state": "absent",
  "reason": "not_cached",
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": null,
  "checked_at": null,
  "reader": null,
  "fresh_for_s": 60.0,
  "probe_every_s": null,
  "refreshing": false,
  "last_refresh": null,
  "total": null,
  "repository_total": null,
  "filter_totals": null,
  "count_at": null,
  "catalog_fetched": 0,
  "generation": null,
  "fetched": 0,
  "complete": false,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": []
}
--- stderr ---
--- gh ---
# metab https://github.com/octo/demo --api /api/plugin/github/pulls-refresh --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pulls-refresh
status: 202
{
  "refresh": "started",
  "pulls": {
    "state": "pending",
    "reason": null,
    "source": "https://github.com/octo/demo",
    "list": "open",
    "fetched_at": null,
    "checked_at": null,
    "reader": null,
    "fresh_for_s": 60.0,
    "probe_every_s": null,
    "refreshing": true,
    "last_refresh": null,
    "total": null,
    "repository_total": null,
    "filter_totals": null,
    "count_at": null,
    "catalog_fetched": 0,
    "generation": null,
    "fetched": 0,
    "complete": false,
    "truncated": false,
    "limit": 0,
    "next_after": null,
    "rows": []
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "not_due",
  "status_scan_at": null
}
after: /api/plugin/github/pulls?state=open&limit=0
status: 200
{
  "state": "current",
  "reason": null,
  "source": "https://github.com/octo/demo",
  "list": "open",
  "fetched_at": "2026-09-17T12:02:02Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "succeeded",
    "message": null,
    "reset_at": null,
    "at": "2026-09-17T12:02:02Z"
  },
  "total": 598,
  "repository_total": 600,
  "filter_totals": {
    "all": 600,
    "open": 598,
    "closed": 2
  },
  "count_at": "2026-09-17T12:02:02Z",
  "catalog_fetched": 600,
  "generation": "<CATALOG_EPOCH_3>:0",
  "fetched": 598,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:02:02Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 12,
    "response_body_bytes": 492533
  }
}
--- stderr ---
--- body ---
{}
--- gh ---
gh api user
gh api graphql catalog state=open cursor=start
gh api graphql catalog state=open cursor=open-100
gh api graphql catalog state=open cursor=open-200
gh api graphql catalog state=open cursor=open-300
gh api graphql catalog state=open cursor=open-400
gh api graphql catalog state=all cursor=start
gh api graphql catalog state=all cursor=all-100
gh api graphql catalog state=all cursor=all-200
gh api graphql catalog state=all cursor=all-300
gh api graphql catalog state=all cursor=all-400
gh api graphql catalog state=all cursor=all-500
