Repository navigation
fix(security): claim a bus task only when a worker is free (LSR-075) - #70
Merged
Merged
Conversation
Ported from agent-ask-orama#47: receive nothing while every worker is busy, leave tasks this replica cannot run unclaimed on the bus, cap one customer at AGENT_BUS_TENANT_WORKERS workers, and keep at most 256 dispatch rows waiting. run_task is unchanged. README and tests/test_bus_backpressure.py. Refs #33
Contributor
Author
|
Merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: The bus consumer claims a task only when a worker is free to run it, and one customer can no longer take every worker.
Why: Finding LSR-075 (#33) of the Lake pre-launch security review: every received task was claimed and queued, so one tenant's burst held claimed tasks (with their credentials) in memory and starved the others. Part of the open-source release's security gate, https://github.com/oramasearch/orama-bridge/issues/273.
How: Ported agent-ask-orama's consumer, oramasearch/agent-ask-orama#47:
workand its worker slots; this agent'srun_taskis unchanged.Refs #33
Changes
lake_bus.py:workclaims only when a worker is free; nothing is received while all are busy;AGENT_BUS_WORKERS(4) andAGENT_BUS_TENANT_WORKERS(one fewer); at most 256 dispatch rows wait.receivetakes the long poll'swait_ms.tests/test_bus_backpressure.py: ported.README.md: the limits and settings.Proof
Not run: per Steve, 2026-11-14, tests run at review and release time, after the epic's work.