Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Scale request logic#37

Closed
whoabuddy wants to merge 22 commits intostagingfrom
fix/scale-request-logic
Closed

Scale request logic#37
whoabuddy wants to merge 22 commits intostagingfrom
fix/scale-request-logic

Conversation

@whoabuddy
Copy link
Contributor

@whoabuddy whoabuddy commented Aug 27, 2025

aider + grok 4, impressive so far!

What's been done so far:

  • Config (src/config.ts): Parses HIRO_API_KEYS as an array; added methods for DO name hashing and reverse key lookups.
  • Main Worker (src/index.ts): Added fast-path KV cache checks for read-only endpoints; implemented round-robin DO selection using KV counter for load balancing.
  • Durable Object (src/durable-objects/contract-calls-do.ts): Assigns Hiro API keys by DO ID; forwards keys to fetcher; sets higher priority for non-cache-busting requests.
  • Request Queue (src/services/request-queue-service.ts): Added priority field to requests; sorts queue by priority during processing.
  • API Services (src/services/stacks-api-service.ts & src/services/stacks-contract-data-service.ts): Updated to accept and use Hiro API keys for authenticated requests.
  • Rate Limiting (src/services/token-bucket-service.ts): Added sync from Hiro response headers; updated services to pass and sync headers post-request.
  • setup API keys in wrangler secrets

What's left:

  • fix failing tests
  • add new tests
  • test against staging frontend (or preview build)

whoabuddy and others added 7 commits August 27, 2025 10:38
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
… and QUESTIONS.md

Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
@whoabuddy whoabuddy changed the base branch from main to staging August 27, 2025 18:35
whoabuddy and others added 15 commits August 27, 2025 11:37
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
…rors

Co-authored-by: aider (openrouter/x-ai/grok-4) <aider@aider.chat>
@biwasxyz
Copy link
Contributor

This repository has been retired and will be archived soon. If this issue is still relevant, please open a new issue in the appropriate active repo.

@biwasxyz biwasxyz closed this Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants