Skip to content

fix(rewards): simplify GitHub star reward verification#942

Merged
mrcfps merged 5 commits intomainfrom
fix/github-star-trust-flow
Apr 8, 2026
Merged

fix(rewards): simplify GitHub star reward verification#942
mrcfps merged 5 commits intomainfrom
fix/github-star-trust-flow

Conversation

@lefarcen
Copy link
Copy Markdown
Collaborator

@lefarcen lefarcen commented Apr 8, 2026

What

Simplify the GitHub Star reward flow so the desktop app opens GitHub, shows a short verification toast, and claims the reward without depending on a live GitHub star-count check.

Why

The public GitHub stars endpoint is rate-limited and not realtime, so users can successfully star the repo and still fail verification immediately afterward.

How

  • make prepareSession() best-effort so GitHub API hiccups do not block the flow
  • make verifySession() trust the short desktop verification window instead of refetching the GitHub star count
  • switch the rewards page to an automatic post-open claim flow with updated status copy

Affected areas

  • Desktop app (Electron shell)
  • Controller (backend / API)
  • Web dashboard (React UI)
  • OpenClaw runtime
  • Skills
  • Shared schemas / packages
  • Build / CI / Tooling

Checklist

  • pnpm typecheck passes (blocked in this worktree: dependencies / local tools missing, tsc not found)
  • pnpm lint passes (blocked in this worktree: biome not found)
  • pnpm test passes (blocked in this worktree: vitest not found)
  • pnpm generate-types run (if API routes/schemas changed)
  • No credentials or tokens in code or logs
  • No any types introduced (use unknown with narrowing)

Notes for reviewers

The cloud rewards claim endpoint already enforces per-account de-dup via alreadyClaimed, so this flow remains single-claim even though the desktop verification path no longer depends on the GitHub API response.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6de8e6a99b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/controller/src/services/github-star-verification-service.ts
@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 8, 2026

Codecov Report

❌ Patch coverage is 2.38095% with 41 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
apps/web/src/pages/rewards.tsx 0.00% 23 Missing ⚠️
...r/src/services/github-star-verification-service.ts 0.00% 11 Missing ⚠️
...ps/controller/src/routes/desktop-rewards-routes.ts 0.00% 5 Missing ⚠️
apps/web/src/i18n/locales/en.ts 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mrcfps mrcfps merged commit a359da0 into main Apr 8, 2026
11 checks passed
@mrcfps mrcfps deleted the fix/github-star-trust-flow branch April 8, 2026 10:33
@lefarcen lefarcen mentioned this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants