Skip to content

feat(identity-webhook): live balance gate + ./balance-gate export (0.4.0)#7

Closed
eliteprox wants to merge 5 commits into
feat/composite-app-token-exchangefrom
feat/balance-gate
Closed

feat(identity-webhook): live balance gate + ./balance-gate export (0.4.0)#7
eliteprox wants to merge 5 commits into
feat/composite-app-token-exchangefrom
feat/balance-gate

Conversation

@eliteprox

Copy link
Copy Markdown

Summary

  • Add createBalanceGate / BalanceCheck and wire config.checkBalance in handleAuthorize.
  • Export @pymthouse/clearinghouse-identity-webhook/balance-gate and bump package to 0.4.0.
  • Stacks on the composite app_*_* PR.

Test plan

  • cd identity-webhook && npm test

Add createBalanceGate / parseUsdMicros and an optional checkBalance hook on
handleAuthorize so consumers can enforce live credit at sign time (483
insufficient_balance, optional expiry cap for mid-stream reauth).
Publish BalanceCheck / createBalanceGate so pymthouse can import
@pymthouse/clearinghouse-identity-webhook/balance-gate.
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a6c62a0-2a5d-4684-88ae-7bc969c08b53

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/balance-gate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…Y_ISSUER

Allow either IDENTITY_ISSUER or OIDC_ISSUER, default OIDC_AUDIENCE to the
JWT issuer, and derive OIDC_TOKEN_EXCHANGE_BASE_URL from NEXTAUTH_URL.
Composite app_*_* token exchange was collapsing mint-gate HTTP 402
(trial_credits_exhausted) to webhook status 401, so gateways could not
distinguish auth failure from exhausted funds. Forward 402 / 503 and bump
to 0.4.2 for publish (0.4.1 already shipped).
@eliteprox

Copy link
Copy Markdown
Author

Superseded for publish by #9 (includes 402 exchange propagation + 0.4.2 bump). Closing in favor of that PR against main.

@eliteprox

Copy link
Copy Markdown
Author

Closed in favor of #9 (main + 0.4.2 publish).

@eliteprox eliteprox closed this Jul 14, 2026
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant