After a keys-missing refusal, a worker is withheld tasks whose secrets are stored only for another worker
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Read server/orcaster_server/task_secrets/gate.py and the three claim picks in server/orcaster_server/api/poll.py (around lines 1404–1455); trace how refusal exclusions differ from the version-floor and busy-poll gates. Start with the tests in server/tests/test_poll_task_secrets_worker_scope.py and server/tests/test_poll_task_secrets.py. Done means the acceptance cases pass, existing tests remain unchanged, and EXPLAIN plans for all three picks show no regression; add a CHANGELOG entry under Unreleased.
Written by the indexing model from the issue text.
Description
Problem
Task secrets can be stored for the whole workspace or for one worker. A worker never receives another worker's secret; if no row applies to it, it uses its own environment (docs/user-manual.md:3730-3733).
When the server has no encryption keys loaded, a task whose declared name has an applicable row is refused for that worker (TaskSecretsKeysMissing). The refusal itself is worker-aware. What happens next is not:
- After a refusal, the poll handler retries with
exclude_all=True(server/orcaster_server/api/poll.py:1452-1455). - While the keys stay missing, the refusal memory sets
exclude_all=Trueat the start of the next polls (server/orcaster_server/api/poll.py:1418-1421). exclude_allis passed asexclude_stored_secrets(server/orcaster_server/api/poll.py:1404), which uses the same predicate as the version-floor gate (server/orcaster_server/api/poll.py:185).- That predicate counts
task_secretsrows of any scope and never looks ats.worker_id(server/orcaster_server/task_secrets/gate.py:110-139). This is deliberate for the version-floor gate, because snapshot code paths have no polling worker. The poll picks do have one::worker_idis already bound.
So a task whose name is stored only for worker B is withheld from worker A, even though no row applies to A and A would run it with its own environment.
Steps to reproduce
- Start the server without task secret keys (
TASK_SECRETS_KEYS_PATHunset). Enroll workersw1andw2in one workspace. - Store
NAME_Afor the whole workspace. StoreNAME_Bonly forw2. - Queue task
T1that declaresNAME_A, then taskT2that declaresNAME_B, soT1is ahead. - Poll as
w1.T1is refused (keys missing). The fallback pick excludesT2as well. - Poll as
w1again, with the refusal memory alive or expired.w1gets no task, andT2staysqueued.
Expected: w1 receives T2 with an empty secrets field. This is what happens once T1 is cancelled.
The same over-exclusion happens when the name-exclusion picks are exhausted (server/orcaster_server/api/poll.py:1442-1455).
Proposed change
- Add a worker-aware variant of the predicate in
server/orcaster_server/task_secrets/gate.pythat addsAND (s.worker_id IS NULL OR s.worker_id = CAST(:worker_id AS uuid)). - In the three claim picks, use the worker-aware variant for the refusal-driven exclusion, through a separate bind (for example
:exclude_applicable_secrets). - Keep the any-scope predicate for the version-floor gate and for a push in a
busypoll. Do not change the fairness-yield predicate or housekeeping. - Run
EXPLAINon the three picks before and after, to confirm the plan does not get worse.
Compatibility
No schema, API or setting change. The change only affects polls after a refusal while keys are missing or undecryptable. Version-floor behavior for old workers is unchanged. Workers on existing deployments only receive tasks that they would already receive once the blocking task is gone, and they never receive another worker's secret.
Acceptance criteria
- Test (keys missing):
T1(applicable row, blocked) ahead ofT2(name stored only for another worker).w1receivesT2withsecrets == {}, both on the poll that hits the refusal and on a later poll with the refusal memory alive. - Test: a worker below the version floor is still withheld
T2. - Test: a
busypoll still does not receive a push of a task that uses stored secrets of any scope. - Test:
w1never receives the value stored forw2. - Existing deployments keep working without config changes. The existing tests in
server/tests/test_poll_task_secrets_worker_scope.pyandserver/tests/test_poll_task_secrets.pypass unchanged. - CHANGELOG entry under Unreleased.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AInvirion/orcaster
-
enhancement P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
enhancement good first issue P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug P2 server
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
bug P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
enhancement P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
All issues in AInvirion/orcaster
Similar issues
-
[Resource]: SpaicelyOpenresource-submission validation-passed
Difficulty 1/5 Under an hour Newbie friendliness 68/100
hesreallyhim/awesome-claude-code#3875 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bvis/aegis-hass#725 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
datasektionen/cashflow#468 ·
-
dont call alembic upgrade until we check whether or not the cache DB has an alembic version stampOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Bug: AttributeError: 'GptOssConfig' object has no attribute 'rope_scaling_factor' with transformers >= 5.xPossibly taken @NimaVaziri claimed this today. OpenPytorch
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/TensorRT-LLM#23406 ·
Maintainers usually reply within 1 day