Rate admission: time-based quotas shared across client aliases #77
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/llm-log!77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/75-rate-admission"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracks #75; stacked on #74 (
feat/70-request-scheduler) rather than duplicating the scheduler foundation.Implemented
research/LLM-LOG-rate-admission-75.org.Executed validation
Exact current head:
0011613cde0ceb0d101425a7606a3029f5105c2d.PASS: all 12 socket-free rate tests. Actions run 34724938422,
rate-contractsjob 103637318354, completed successfully September 12 at 23:16:06 UTC. Checked the decoded execution log: production and full test-system compilation succeeded, the runner executed every one of the 12 named tests, and Rove reportedAll 12 tests passed.This includes the 64-thread test admitting exactly eight requests from an eight-permit burst, shared-alias enforcement, no quota refund, exact refill/deadline boundaries, mutable-policy isolation and cancellation/error cleanup. Actual execution used SBCL 2.6.7 through the pinned Nix package closure, not local structural checks.At the last inspection, the same run's complete
proxy-contractsjob 103637318468 was still in progress. The HTTP rate test has therefore NOT been certified passing. No full integration green is claimed. No local Lisp runtime execution occurred in the editing environment.Tests-first evidence: at
e81be9508efb7785df210af0948d3502fccf8682, real SBCL/Nix run 34724484407 / job 103636097666 failed test compilation because REQUESTS-PER-MINUTE/BURST/PROVIDER-GROUPS APIs did not yet exist. This is an executed missing-API compile RED, not a behavioral assertion RED.Implementation commit:
04c323b0cd4b913368c83ff39fc605990c0d71c9.Independent gate commit:
0011613cde0ceb0d101425a7606a3029f5105c2d.Existing full-suite blocker
Parent #74 at
ac26a689c56b1cf2b6c4999ad012b9bd2ced8497already fails run 34715742893 / job 103612546205: first HTTP assertions pass, then a 15-minute hang and a Woo callback TYPE-ERROR (NILis notWOO.EV.SOCKET:SOCKET). Detailed evidence is recorded on #74. The precise lifecycle defect still needs isolation. Keep this PR draft; the verified rate green does not authorize merging an unverified transport stack.Deliberate boundaries
This is process-local refill-rate/burst admission, not a strict rolling-minute, TPM, five-hour or weekly provider quota. Defaults (60 RPM refill, burst 4) are local policy, not provider entitlement. Every group currently uses the same settings. All aliases for shared credentials must be explicitly mapped by trusted configuration. Restarts/multiple instances need a later durable/shared owner. No provider 429 cooldown ingestion, automatic retries, credential rotation or socket-disconnect cancellation integration is added. Inbound socket/thread counts are not globally bounded by this upstream scheduler.
The user's Agent Zero -> OpenCode upstream presentation requirement is explicitly recorded in #71, but the wire-profile implementation is NOT part of this slice. It must preserve internal provenance and share the same quota group; a changed User-Agent alone is not proof of full harness equivalence or live provider acceptance. Smart-client SSE queue protocol remains #73.
Commands
Full existing gate:
Verified independent rate gate:
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.