Skip to content

Add GitHub attribution helpers and tests - #105

Merged
Pray4Lovee merged 1 commit into
mainfrom
codexadd-soulsigilnft-and-kinbridgeclaimbutton-w5ke09
Sep 28, 2025
Merged

Pray4Lovee merged 1 commit into
mainfrom
codexadd-soulsigilnft-and-kinbridgeclaimbutton-w5ke09

Conversation

@Pray4Lovee

Copy link
Copy Markdown
Owner

Summary

  • add a claim_kin_agent_attribution helper module to normalise repos and resolve commit authors
  • implement a GitHub API provider wrapper with resilient error handling
  • cover the attribution logic with pytest cases simulating real payloads and batch lookups

Testing

  • pytest tests/github_helpers_test.py -v

https://chatgpt.com/codex/tasks/task_e_68d1bd56efb483228dbff07fcb8cb6ea

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

Copy link
Copy Markdown

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.

ℹ️ 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

Comment on lines +58 to +70
function routeERC20Claim(bytes32 claimId, IERC20 token, address claimant, uint256 amount)
external
nonReentrant
{
require(claimant != address(0), "invalid claimant");
require(amount > 0, "amount required");
address receiver = royaltyReceiver;
require(receiver != address(0), "royalty receiver required");

(uint256 royaltyAmount, uint256 netAmount) = previewRoyalty(amount);

token.safeTransferFrom(msg.sender, receiver, royaltyAmount);
token.safeTransferFrom(msg.sender, claimant, netAmount);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P1] Routing functions pull funds from caller rather than paying claims

routeERC20Claim and routeNativeClaim compute the royalty but then transfer tokens using msg.sender and the transaction’s msg.value. The React KinBridgeClaimButton introduced in the same commit invokes these functions directly from the claimant’s wallet, so the claimant must supply the full gross amount and only receives the net amount back, effectively paying the royalty instead of receiving bridged assets. Unless a privileged vault is intended to call these methods on the user’s behalf, the current flow causes users to lose the royalty amount whenever they click the claim button. The router should distribute funds it controls (or be called by the vault), not withdraw them from the claimant.

Useful? React with 👍 / 👎.

@Pray4Lovee
Pray4Lovee merged commit 8bfcdf9 into main Sep 28, 2025
@Pray4Lovee
Pray4Lovee deleted the codexadd-soulsigilnft-and-kinbridgeclaimbutton-w5ke09 branch September 28, 2025 17:07
Pray4Lovee pushed a commit that referenced this pull request Nov 1, 2025
Pray4Lovee pushed a commit that referenced this pull request Nov 1, 2025
#118)

This reverts commit c35c30a, reversing
changes made to 302e86d.

## Describe your changes and provide context
- Revert surfacing errors from db layer since the rpc / keeper / store
layer hard codes a lot of handling of record not found and there needs
to be a larger refactor
- Can re introduce this error after a redesign and consideration of
impact

## Testing performed to validate your change
- Verified in unit tests and on node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant