# 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": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- stderr ---
cloning https://github.com/octo/demo into <HOME>
cloned https://github.com/octo/demo in 0.0 s
--- body ---
{}
--- gh ---
gh auth status
gh api repos/octo/demo --jq .size
gh api user
gh api graphql catalog state=open cursor=start
gh api graphql catalog state=all cursor=start
gh api graphql catalog state=all cursor=all-100
# 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": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- 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: 1
--- 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": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "started",
  "status_scan_at": null
}
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:00:00Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "not_logged_in",
    "message": "GitHub CLI is not signed in to github.com. Run gh auth login --hostname github.com, then retry.",
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- stderr ---
Error: the refresh ended with not_logged_in
--- body ---
{"retry": true}
--- gh ---
gh api user
gh auth status
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-refresh --data request.json
exit: 1
--- 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": "not_logged_in",
      "message": "GitHub CLI is not signed in to github.com. Run gh auth login --hostname github.com, then retry.",
      "reset_at": null,
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "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": "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": false,
  "last_refresh": {
    "outcome": "gh_too_old",
    "message": "This GitHub CLI cannot report the active account. Update gh from https://cli.github.com/, then run gh auth status --hostname github.com.",
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- stderr ---
Error: the refresh ended with gh_too_old
--- body ---
{"retry": true}
--- gh ---
gh api user
gh auth status
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-refresh --data request.json
exit: 1
--- 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": "gh_too_old",
      "message": "This GitHub CLI cannot report the active account. Update gh from https://cli.github.com/, then run gh auth status --hostname github.com.",
      "reset_at": null,
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "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": "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": false,
  "last_refresh": {
    "outcome": "not_found_or_private",
    "message": "GitHub has no readable repository here",
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- stderr ---
Error: the refresh ended with not_found_or_private
--- body ---
{"retry": true}
--- gh ---
gh api user
gh api graphql catalog state=updated cursor=start
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-refresh --data request.json
exit: 1
--- 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": "not_found_or_private",
      "message": "GitHub has no readable repository here",
      "reset_at": null,
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "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": "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": 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": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- stderr ---
Error: the refresh ended with network_error
--- body ---
{"retry": true}
--- gh ---
gh api user
gh auth status
gh api graphql catalog state=updated cursor=start
gh api graphql statuses cursor=start
# 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": "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": "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": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "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": "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": false,
  "last_refresh": {
    "outcome": "gh_failed",
    "message": "GitHub answered with something other than JSON",
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- stderr ---
Error: the refresh ended with gh_failed
--- body ---
{"retry": true}
--- gh ---
gh api user
gh api graphql catalog state=updated cursor=start
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-refresh --data request.json
exit: 1
--- 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": "gh_failed",
      "message": "GitHub answered with something other than JSON",
      "reset_at": null,
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "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": "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": false,
  "last_refresh": {
    "outcome": "account_changed",
    "message": "the active gh account changed during the read",
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- stderr ---
Error: the refresh ended with account_changed
--- body ---
{"retry": true}
--- gh ---
gh api user
gh api graphql catalog state=updated cursor=start
gh api graphql statuses cursor=start
# 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": "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": "account_changed",
      "message": "the active gh account changed during the read",
      "reset_at": null,
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "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": "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": false,
  "last_refresh": {
    "outcome": "gh_missing",
    "message": "Metabrowser could not find GitHub CLI (gh). Install it from https://cli.github.com/, then run gh auth login --hostname github.com.",
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- stderr ---
Error: the refresh ended with gh_missing
--- body ---
{"retry": true}
--- gh ---
# metab https://github.com/octo/demo --api '/api/plugin/github/pulls?limit=1'
exit: 0
--- stdout ---
api: /api/plugin/github/pulls?limit=1
status: 200
{
  "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": false,
  "last_refresh": {
    "outcome": "gh_missing",
    "message": "Metabrowser could not find GitHub CLI (gh). Install it from https://cli.github.com/, then run gh auth login --hostname github.com.",
    "reset_at": null,
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "complete": true,
  "truncated": false,
  "limit": 1,
  "next_after": 106,
  "rows": [
    {
      "number": 106,
      "title": "Work item 106",
      "state": "open",
      "draft": false,
      "merged_at": null,
      "author": "contributor",
      "author_avatar_url": null,
      "created_at": "2026-09-17T09:46:00Z",
      "updated_at": "2026-09-17T09:46:00Z",
      "closed_at": null,
      "base_ref": "topic",
      "head_ref": "work-106",
      "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": 4,
    "response_body_bytes": 90436
  }
}
--- 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": "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": "gh_missing",
      "message": "Metabrowser could not find GitHub CLI (gh). Install it from https://cli.github.com/, then run gh auth login --hostname github.com.",
      "reset_at": null,
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "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": "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": false,
  "last_refresh": {
    "outcome": "rate_limited",
    "message": "GitHub's API rate limit is exhausted until 2026-09-17T12:03:01Z",
    "reset_at": "2026-09-17T12:03:01Z",
    "at": "2026-09-17T12:01:01Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:00:00Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "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": 4,
    "response_body_bytes": 90436
  }
}
--- stderr ---
Error: the refresh ended with rate_limited
--- body ---
{"retry": true}
--- gh ---
gh api user
gh api graphql catalog state=updated cursor=start
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-refresh --data request.json
exit: 0
--- stdout ---
api: /api/plugin/github/pulls-refresh
status: 200
{
  "refresh": "not_due",
  "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": false,
    "last_refresh": {
      "outcome": "rate_limited",
      "message": "GitHub's API rate limit is exhausted until 2026-09-17T12:03:01Z",
      "reset_at": "2026-09-17T12:03:01Z",
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "not_due",
  "status_scan_at": "2026-09-17T12:01:01Z"
}
--- stderr ---
--- body ---
{"retry": true}
--- 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": "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": false,
    "last_refresh": {
      "outcome": "rate_limited",
      "message": "GitHub's API rate limit is exhausted until 2026-09-17T12:03:01Z",
      "reset_at": "2026-09-17T12:03:01Z",
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "not_due",
  "status_scan_at": "2026-09-17T12:01:01Z"
}
--- stderr ---
--- body ---
{"target": 1000}
--- gh ---
## The clock moves on 121 s, to 2026-09-17T12:03:02Z.
# 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": "rate_limited",
      "message": "GitHub's API rate limit is exhausted until 2026-09-17T12:03:01Z",
      "reset_at": "2026-09-17T12:03:01Z",
      "at": "2026-09-17T12:01:01Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:00:00Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "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": 4,
      "response_body_bytes": 90436
    }
  },
  "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:03: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:03:02Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:03:02Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:03:02Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 2,
    "response_body_bytes": 44542
  }
}
--- stderr ---
--- body ---
{"retry": true}
--- gh ---
gh api user
gh api graphql catalog state=updated cursor=start
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
## A cache that refuses a write says why, and the command that clears it.
# 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:03:02Z",
    "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:03:02Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:03:02Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "complete": true,
    "truncated": false,
    "limit": 0,
    "next_after": null,
    "rows": [],
    "refresh_timing": {
      "finished_at": "2026-09-17T12:03:02Z",
      "duration_ms": 300,
      "provider": "github_cli",
      "request_count": 2,
      "response_body_bytes": 44542
    }
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "started",
  "status_scan_at": "2026-09-17T12:03:02Z"
}
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:03:02Z",
  "checked_at": null,
  "reader": "gh:octo-reader",
  "fresh_for_s": 60.0,
  "probe_every_s": 10.0,
  "refreshing": false,
  "last_refresh": {
    "outcome": "cache_unwritable",
    "message": "the pull-request list could not be written to the cache: attempt to write a readonly database. To clear the GitHub cache of octo/demo, run `echo '{}' | metab https://github.com/octo/demo --api /api/plugin/github/cache-clear --data -`, then retry",
    "reset_at": null,
    "at": "2026-09-17T12:03:02Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:03:02Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:03:02Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 2,
    "response_body_bytes": 44542
  }
}
--- stderr ---
Error: the refresh ended with cache_unwritable
--- body ---
{"retry": true}
--- gh ---
gh api user
gh api graphql catalog state=updated cursor=start
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
## While the directory itself refuses writes, so does that command.
# metab https://github.com/octo/demo --api /api/plugin/github/cache-clear --data -
exit: 1
--- stdout ---
api: /api/plugin/github/cache-clear
status: 409
{
  "error": "the GitHub cache of octo/demo could not be cleared",
  "detail": "Permission denied",
  "code": "cache_unwritable"
}
--- stderr ---
Error: /api/plugin/github/cache-clear returned HTTP 409
--- body ---
{}
--- 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": "current",
    "reason": null,
    "source": "https://github.com/octo/demo",
    "list": "open",
    "fetched_at": "2026-09-17T12:03:02Z",
    "checked_at": null,
    "reader": "gh:octo-reader",
    "fresh_for_s": 60.0,
    "probe_every_s": 10.0,
    "refreshing": true,
    "last_refresh": {
      "outcome": "cache_unwritable",
      "message": "the pull-request list could not be written to the cache: attempt to write a readonly database. To clear the GitHub cache of octo/demo, run `echo '{}' | metab https://github.com/octo/demo --api /api/plugin/github/cache-clear --data -`, then retry",
      "reset_at": null,
      "at": "2026-09-17T12:03:02Z"
    },
    "total": 100,
    "repository_total": 102,
    "filter_totals": {
      "all": 102,
      "open": 100,
      "closed": 2
    },
    "count_at": "2026-09-17T12:03:02Z",
    "catalog_fetched": 102,
    "generation": "<CATALOG_EPOCH_1>:0",
    "fetched": 100,
    "complete": true,
    "truncated": false,
    "limit": 0,
    "next_after": null,
    "rows": [],
    "refresh_timing": {
      "finished_at": "2026-09-17T12:03:02Z",
      "duration_ms": 300,
      "provider": "github_cli",
      "request_count": 2,
      "response_body_bytes": 44542
    }
  },
  "status_route": "/api/plugin/github/pulls?state=open&limit=0",
  "status_scan": "started",
  "status_scan_at": "2026-09-17T12:03:02Z"
}
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:03: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:03:02Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:03:02Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_1>:0",
  "fetched": 100,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:03:02Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 2,
    "response_body_bytes": 44542
  }
}
--- stderr ---
--- body ---
{"retry": true}
--- gh ---
gh api user
gh api graphql catalog state=updated cursor=start
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
## A catalog a newer Metabrowser wrote is left as it is and named, before any page is asked for; the command it names clears it, and the list is fetched again.
# 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": "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": {
      "outcome": "succeeded",
      "message": null,
      "reset_at": null,
      "at": "2026-09-17T12:03:02Z"
    },
    "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": "2026-09-17T12:03:02Z"
}
after: /api/plugin/github/pulls?state=open&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": {
    "outcome": "newer_cache",
    "message": "the pull-request list in the cache was written by a newer Metabrowser (row projection 3, where this release reads up to 2), and this one leaves it as it is. Upgrade metab to read it, or run `echo '{}' | metab https://github.com/octo/demo --api /api/plugin/github/cache-clear --data -` to clear the GitHub cache of octo/demo and fetch it again with this one",
    "reset_at": null,
    "at": "2026-09-17T12:03:02Z"
  },
  "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 ---
Error: the refresh ended with newer_cache
--- body ---
{"retry": true}
--- gh ---
# 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": 4,
  "source": "https://github.com/octo/demo"
}
--- stderr ---
--- body ---
{}
--- 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:03: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:03:02Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:03:02Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_2>:0",
  "fetched": 100,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:03:02Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 4,
    "response_body_bytes": 90436
  }
}
--- 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 catalog state=all cursor=all-100
## A catalog whose versions cannot be read, here a write-ahead-log database, which no release writes, is left as it is and named the same way; the command clears it.
# 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": "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": {
      "outcome": "succeeded",
      "message": null,
      "reset_at": null,
      "at": "2026-09-17T12:03:02Z"
    },
    "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": "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": {
    "outcome": "unknown_cache",
    "message": "the pull-request list in the cache cannot be checked for the Metabrowser that wrote it (the catalog is not in the rollback-journal mode this release writes), so this one leaves it as it is. Upgrade metab if a newer one wrote it, or run `echo '{}' | metab https://github.com/octo/demo --api /api/plugin/github/cache-clear --data -` to clear the GitHub cache of octo/demo and fetch it again with this one",
    "reset_at": null,
    "at": "2026-09-17T12:03:02Z"
  },
  "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 ---
Error: the refresh ended with unknown_cache
--- body ---
{"retry": true}
--- gh ---
# 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": 3,
  "source": "https://github.com/octo/demo"
}
--- stderr ---
--- body ---
{}
--- 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:03: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:03:02Z"
  },
  "total": 100,
  "repository_total": 102,
  "filter_totals": {
    "all": 102,
    "open": 100,
    "closed": 2
  },
  "count_at": "2026-09-17T12:03:02Z",
  "catalog_fetched": 102,
  "generation": "<CATALOG_EPOCH_3>:0",
  "fetched": 100,
  "complete": true,
  "truncated": false,
  "limit": 0,
  "next_after": null,
  "rows": [],
  "refresh_timing": {
    "finished_at": "2026-09-17T12:03:02Z",
    "duration_ms": 300,
    "provider": "github_cli",
    "request_count": 4,
    "response_body_bytes": 90436
  }
}
--- 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 catalog state=all cursor=all-100
## An environment token cannot resolve its login while offline.
# metab https://github.com/octo/demo --api /api/plugin/github/pulls-refresh --data request.json
exit: 1
--- stdout ---
status: 202 started
status: 200 network_error, 100 cached PRs
--- stderr ---
Error: the refresh ended with network_error
--- body ---
{"retry": true}
--- gh ---
gh api user
gh auth status
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
## A reconnect can refresh metadata immediately once GitHub is reachable.
# metab https://github.com/octo/demo --api /api/plugin/github/pulls-refresh --data request.json
exit: 0
--- stdout ---
status: 202 started
status: 200 succeeded, 100 cached PRs
--- stderr ---
--- body ---
{"reconnect": true}
--- gh ---
gh api user
gh api graphql catalog state=updated cursor=start
