wevm / wevm/frog

GitHub App token fallback misses recent issues in large repositories

Open
#83 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
265
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

Repeated frog publish runs find an issue created by an earlier run when it has the configured friction label and identical report and occurrence markers.

This should work when an Action-only workflow passes a GitHub App installation token, as documented in Frog's Action-only instructions.

Current Behavior

With a GitHub App installation token, Github.matcher() can treat the repository as unlabelled even when the same token successfully creates an issue with the configured label.

The publish result then includes the repository in unlabelled. The fallback calls listAll(), which requests issues oldest-first and stops after 50 pages of 100. In a repository with more than 5,000 issues, it does not inspect recently created Frog issues. A later publish can therefore create another issue for the same report and occurrence markers.

Possible Solution

Build the label-filtered issue index regardless of repos.get().permissions.push. Reading issues by label does not require permission to apply that label.

Keep the permission result for warning whether labels are expected to stick. If the labelled lookup misses, scan the unlabelled fallback newest-first so its bounded lookup includes recent reports.

Tests should cover:

  • a token whose repository response does not indicate push permission while a matching labelled issue exists;
  • a recent matching issue outside the oldest 5,000 repository issues;
  • a destination where labels cannot be applied and the unlabelled fallback is required;
  • report and occurrence marker deduplication across these paths.

Minimal Reproducible Example

  1. Use Frog 1.1.0 with a GitHub App installation token in a repository containing more than 5,000 issues.
  2. Configure issue-author for the App bot and publish one unlinked entry.
  3. Confirm that the issue has the configured label while the publish result reports the destination as unlabelled.
  4. Run frog publish again before merging the generated issue: link.
  5. Observe a second issue with the same report and occurrence markers.

The workflow follows Frog's documented custom-token configuration: it passes the installation token as the action's token, sets issue-author to the App bot login, and uses the same login in the issue-event guard. actions/create-github-app-token inherits the installation permissions by default.

Context

This can repeatedly file the same friction entry while the generated frog/sync pull request waits to merge. Restricting workflow triggers reduces the window but does not make publishing idempotent.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Github.matcher() and the listAll() fallback used by frog publish. Trace the labelled lookup, permission handling, and pagination behavior, then exercise the four test scenarios listed in the issue. Done means repeated publishes deduplicate matching reports and occurrence markers for both labelled and unlabelled destinations, including recent issues in large repositories.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, github-actions, typescript
Domain
api, ci-cd, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.