Skip to content

Canonicalize manual credit GitHub worker aliases#215

Open
yyswhsccc wants to merge 1 commit into
mergeos-bounties:masterfrom
yyswhsccc:fix/manual-credit-worker-github-alias
Open

Canonicalize manual credit GitHub worker aliases#215
yyswhsccc wants to merge 1 commit into
mergeos-bounties:masterfrom
yyswhsccc:fix/manual-credit-worker-github-alias

Conversation

@yyswhsccc

@yyswhsccc yyswhsccc commented Jun 5, 2026

Copy link
Copy Markdown

Claim

Description

Manual credit and payout-account resolution could treat worker:github:<name> as a distinct account instead of the canonical github:<name> payout alias.

This PR canonicalizes the worker GitHub alias before manual-credit storage and lower-level payout account resolution, preventing double-prefixed account identities.

Evidence

Before:

  • worker:github:<name> could create or reference a separate/double-prefixed account path instead of the canonical github:<name> alias.

After:

  • worker:github:<name> resolves to github:<name> for manual credit input and payout account resolution without changing reward amounts or crediting any wallet.

Additional logs or test output:

  • go test ./internal/core -run 'TestManualCreditWorkerGitHubAliasUsesCanonicalPayoutAccount|TestAdminCanCreateManualLedgerCredit' -> ok mergeos/backend/internal/core 0.448s
  • Current GitHub Backend build is blocked by the shared Go 1.25.10 govulncheck baseline; Bump backend Go patch version #218 updates the backend Go patch version and is green. Secret scan, web checks, and MergeIDE are passing on this PR.

Safety

  • Alias canonicalization only.
  • Does not change reward amounts, confirmation rules, production wallets, or admin secrets.
  • Does not manually credit any wallet.

Tests

  • I ran the relevant tests.
  • I included the command output or explained why tests were not run.

Bounty Checklist

  • I starred this repository before claiming or starting bounty work.
  • This PR links to a confirmed Claim Token comment.
  • This PR includes image evidence for UI bugs or logs/test output for non-UI bugs.
  • This PR explains the behavior before and after the fix.
  • This PR does not expose secrets, private keys, customer data, or sensitive production details.

@yyswhsccc

Copy link
Copy Markdown
Author

Maintenance note: I checked the failing Backend build and test job on this PR. The failure is the shared base/toolchain govulncheck issue from backend/go.mod using Go 1.25.10, not this PR's local test suite. govulncheck reports standard-library issues GO-2026-5039 and GO-2026-5037 fixed in Go 1.25.11 before project tests run.

I opened #218 to bump backend/go.mod to Go 1.25.11. #218 is now green across Backend build and test, Secret scan, frontend/admin/scan web checks, and MergeIDE. After that toolchain patch lands and this PR is updated against it, the backend check should no longer fail on the Go 1.25.10 standard-library findings.

@TUPM96

TUPM96 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Findings
No blocking code issues were found. The changes correctly implement the alias canonicalization for worker:github:<name> to github:<name> in both manual credit processing and payout account resolution. The new tests adequately cover the introduced logic, and the placement of the new logic ensures no regressions. The scope is well-defined and limited to the described bug fix.

Bounty Readiness
*


MergeOS automated readiness signals:

  • Evidence signal: evidence: missing
  • Repository star: star: verified

@TUPM96 TUPM96 added evidence: missing PR needs screenshot, GIF, video, or other visual evidence. star: verified PR author has starred this repository. labels Jun 5, 2026
@yyswhsccc yyswhsccc mentioned this pull request Jun 5, 2026
7 tasks
@friendlygeorge

Copy link
Copy Markdown

Verification Report — PR #215

Verifier: friendlygeorge
Date: 2026-06-05
Claim: #64 (comment)

PR Details

  • Title: Canonicalize manual credit GitHub worker aliases
  • Author: yyswhsccc
  • Head commit: 8e8e4d0
  • Files changed: 1 (backend/internal/core)
  • Additions: 21, Deletions: 0

What the PR Does

Adds alias canonicalization for worker:github:<name>github:<name> payout accounts. Fixes two issues:

  1. Admin manual credits now treat worker:github:<name> as the canonical github:<name> alias
  2. Non-admin callers no longer create double-prefixed worker:worker:github:<name> accounts

Code Review

  • Change is clean and focused: 21 lines added, 0 deleted
  • No side effects: Only affects alias resolution, not reward amounts, wallets, or secrets
  • Test coverage: Two new tests cover admin input normalization and payout account resolution

Test Results

=== RUN   TestAdminCanCreateManualLedgerCredit
--- PASS: TestAdminCanCreateManualLedgerCredit (0.13s)
=== RUN   TestManualCreditWorkerGitHubAliasUsesCanonicalPayoutAccount
--- PASS: TestManualCreditWorkerGitHubAliasUsesCanonicalPayoutAccount (0.00s)
PASS
ok  mergeos/backend/internal/core  0.140s

Full backend test suite: ok mergeos/backend/internal/core 10.301s — all tests pass.

GitHub Actions Status

Not checked (same pre-existing toolchain issue as other PRs). Local tests pass cleanly.

Evidence Status

  • PR author provided: No screenshots/logs (not needed — pure backend logic change)
  • Required evidence: Test output is the primary evidence
  • Evidence assessment: ✅ Adequate

Recommendation

✅ Approve — Clean alias canonicalization fix. Prevents double-prefixed accounts. Well-tested. No risks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

evidence: missing PR needs screenshot, GIF, video, or other visual evidence. star: verified PR author has starred this repository.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants