Skip to content

stickers: page owned packs by count received - #305

Merged
highesttt merged 2 commits into
mainfrom
highest/line-sticker-paging
Nov 3, 2026
Merged

highesttt merged 2 commits into
mainfrom
highest/line-sticker-paging

Conversation

@highesttt

Copy link
Copy Markdown
Collaborator

getOwnedProductSummaries doesn't always echo back the offset we sent, which made the sticker pack list fail with "invalid LINE shop pagination" for accounts with more than one page of packs. Advance by the number of packs received instead, and stop on an empty page or once totalSize is reached.

@indent

indent Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Issues

All clear! No issues remaining. 🎉

1 issue already resolved
  • Malformed or short LINE responses (null data, missing/zero totalSize, or an empty page before totalSize) now return a truncated sticker pack list as success, and the caller caches it as the full owned set. Return an error for nil data and for an empty page before totalSize. (fixed by commit 0e2f623)
    Found by Indent Review Agent

CI Checks

All CI checks passed on 0e2f623.

Review agents

Select any unchecked box below to run or rerun that agent.

Passed (1)
  • Indent Review Agent · Only nit left: no guard for repeated pages
Full results

Indent Review Agent

  • Summary: Only nit left: no guard for repeated pages
  • Last ran on commit: 0e2f623c
  • Latest result
    {
      "summary": "Only nit left: no guard for repeated pages",
      "findings": [
        {
          "fix": "Return an error when a page makes no progress, for example when its first product ID was already collected. Also restore a `Total > maxProducts` check.",
          "line": 31,
          "path": "pkg/line/stickers.go",
          "issue": "The offset-echo check is gone and nothing replaced it. If the server ignores the requested offset and keeps returning the same full 1000-product page, or returns an inflated `totalSize`, the loop keeps re-requesting until `len(products)` reaches 100000. That is 100 RPCs before \"exceeded pagination limit\" is returned. The old code failed on page 2.",
          "title": "Repeated page or inflated totalSize causes 100 requests before failing",
          "severity": "nit"
        }
      ]
    }

Comment thread pkg/line/stickers.go Resolved
@highesttt
highesttt merged commit 6b88b4a into main Nov 3, 2026
9 checks passed
@highesttt
highesttt deleted the highest/line-sticker-paging branch November 3, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant