Skip to content

feat(partner): add permissioned authorized execution pipeline - #20

Closed
brendadeeznuts1111 wants to merge 3 commits into
mainfrom
codex/authorized-execution
Closed

feat(partner): add permissioned authorized execution pipeline#20
brendadeeznuts1111 wants to merge 3 commits into
mainfrom
codex/authorized-execution

Conversation

@brendadeeznuts1111

Copy link
Copy Markdown
Owner

What changed

  • adds the hash-bound account authorization core with integer stake calculation and fail-closed gate decisions
  • adds Telegram request, approval, and revocation flows with exact numeric identity binding and a retryable SQLite receipt outbox
  • adds transactional exposure reservations, daily and outstanding usage accounting, liquidity reservation, reconciliation, and settlement states
  • adds executeAuthorizedBet() with an immediate reservation transaction, provider dispatch outside SQLite, and durable outcome receipts
  • adds a Kalshi adapter that forwards a deterministic provider client_order_id
  • wires reservation maintenance into the long-running Telegram process

Why

Partner discovery and credentials are not sufficient authority for live execution. This change makes live capacity explicit, auditable, limit-aware, replay-safe, and fail-closed before any provider call occurs.

Ambiguous provider failures remain exposure-bearing as unknown until reconciliation. Expiration only releases reservations that were never dispatched.

Impact

This does not automatically enable live betting. Callers must still supply a current snapshot loader and explicit order mapping. Fantasy402 remains unwired until its placement contract proves provider-side idempotency.

Validation

  • bun run guard
  • bun run typecheck
  • bun run test — 1,111 passed, 0 failed
  • bun run partners:validate
  • strict branded-ID audit — 0 findings

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

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: 4e267356-6758-4447-83dd-f9dfe0cea3bd

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

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.

@brendadeeznuts1111

Copy link
Copy Markdown
Owner Author

Closing as superseded by #22 (permissioned authorized execution) and #23 (fail-closed lifecycle). Tip conflicts with current main; no unique keep.

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