[PR #206] fix(gh-priority-sync): use last_edited_time filter for Notion checkpoint resume #208

Open
opened 2026-10-27 21:10:37 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/206
Author: @snomiao
Created: 5/2/2026
Status: 🔄 Open

Base: main ← Head: sno/fix-notion-cursor-priority-sync


📝 Commits (3)

  • e733128 fix(gh-priority-sync): use last_edited_time filter for Notion checkpoint resume
  • 8c70240 chore(gh-priority-sync): drop stale CHECKPOINT comment
  • aaae089 fix(gh-priority-sync): handle ties at checkpoint last_edited_time

📊 Changes

1 file changed (+55 additions, -20 deletions)

View changed files

📝 app/tasks/gh-priority-sync/index.ts (+55 -20)

📄 Description

Summary

  • Fixes combined-github-tasks CI failure: APIResponseError: The start_cursor provided is invalid: 34a6d73d-3650-810c-89ee-e9c25cd07700.
  • Root cause: gh-priority-sync passed checkpoint.id (a Notion page ID) into notion.dataSources.query({ start_cursor }). Notion's start_cursor only accepts a token previously returned as next_cursor — feeding it an arbitrary page ID makes Notion reject the request.
  • Switch to filtering by last_edited_time on_or_after checkpoint.editedAt and start pagination from undefined. The existing post-filter e.id !== checkpoint?.id still drops the boundary entry.

Test plan

  • CI green on this branch (gh-combined-tasks workflow)
  • On next scheduled run, the GitHub Issue Priorities Labeler Task no longer throws start_cursor validation errors and resumes from the prior checkpoint via last_edited_time filter

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/Comfy-PR/pull/206 **Author:** [@snomiao](https://github.com/snomiao) **Created:** 5/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `sno/fix-notion-cursor-priority-sync` --- ### 📝 Commits (3) - [`e733128`](https://github.com/Comfy-Org/Comfy-PR/commit/e7331282f06bf0c03a52b2545cc40ec44df93f47) fix(gh-priority-sync): use last_edited_time filter for Notion checkpoint resume - [`8c70240`](https://github.com/Comfy-Org/Comfy-PR/commit/8c70240ecc85393117df9bf1a893fc03cb3fc66b) chore(gh-priority-sync): drop stale CHECKPOINT comment - [`aaae089`](https://github.com/Comfy-Org/Comfy-PR/commit/aaae089423e0d9e0c1fd97dc0b3bded82ef1e1c8) fix(gh-priority-sync): handle ties at checkpoint last_edited_time ### 📊 Changes **1 file changed** (+55 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `app/tasks/gh-priority-sync/index.ts` (+55 -20) </details> ### 📄 Description ## Summary - Fixes [combined-github-tasks CI failure](https://github.com/Comfy-Org/Comfy-PR/actions/runs/25248689586/job/74037189044): `APIResponseError: The start_cursor provided is invalid: 34a6d73d-3650-810c-89ee-e9c25cd07700`. - Root cause: `gh-priority-sync` passed `checkpoint.id` (a Notion page ID) into `notion.dataSources.query({ start_cursor })`. Notion's `start_cursor` only accepts a token previously returned as `next_cursor` — feeding it an arbitrary page ID makes Notion reject the request. - Switch to filtering by `last_edited_time on_or_after checkpoint.editedAt` and start pagination from `undefined`. The existing post-filter `e.id !== checkpoint?.id` still drops the boundary entry. ## Test plan - [ ] CI green on this branch (`gh-combined-tasks` workflow) - [ ] On next scheduled run, the `GitHub Issue Priorities Labeler Task` no longer throws `start_cursor` validation errors and resumes from the prior checkpoint via `last_edited_time` filter 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/Comfy-PR#208
No description provided.