task_env bounds: CLI skips them, a length error masks the credential diagnostic, tests are thin
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
Start with orcaster/cmd/task.go:856-884 and server/orcaster_server/env_names.py:183-197, then read the manual at docs/user-manual.md:1748-1750 and the route tests named in the issue. Trace the task insert paths and the fork flow at server/orcaster_server/api/admin_tasks.py:1964. Done means the checklist's validation, route and stored-row coverage, documentation, bounds decision, and Unreleased changelog entry are addressed.
Written by the indexing model from the issue text.
Description
Problem
The server limits payload.task_env to 256 entries and 128 characters per name (server/orcaster_server/env_names.py:22-23, :183-192). Some follow-ups remain. Each is independent, so this issue is a checklist.
- The CLI does not apply the bounds.
validateTaskEnvEntries(orcaster/cmd/task.go:865-884) checks only the token prefix, the name shape and theORCH_prefix. Its comment says it applies the same rules in the same order as the server (task.go:856-858).orcaster task create --envwith 257 valid names, or with a name of 129 characters, passes the local check, sends the request and gets a 422. No value leaks, but the local check is incomplete. - Length is checked before the token prefix.
env_names.py:188-192checks length, then:193-197the token prefix. An entry that starts with a known token prefix and is longer than 128 characters gets "longer than 128 characters" and not the "looks like a credential" message. The user manual documents this order (docs/user-manual.md:1748-1750), so a change must update that text. Neither message echoes the entry. - Enforcement is at model construction. The validators run when the request models are built (
server/orcaster_server/schemas/tasks.py:330,:581;server/orcaster_server/api/admin_workers.py:173). The code that inserts rows takes an already built payload. There are severalINSERT INTO tasksstatements (server/orcaster_server/api/admin_tasks.py:107,:149,:2097;server/orcaster_server/api/admin_workers.py:137). A future caller that builds a payload without the model would skip the bound. - Route tests are thin. Only
POST /api/v1/taskshas a route test for oversizetask_env(server/tests/test_api_v1_tasks_lifecycle.py:344-359). The worker command and control-op routes test shape errors but not size (server/tests/test_worker_command_task_env_validation.py:112-136). - Stored rows over the bound are not pinned. Rows stored before the bound are still served. A fork of such a row builds a new request through
merge_fork_params(server/orcaster_server/api/admin_tasks.py:1964) and gets a 422 untiltask_envis overridden. This is not tested or documented. egress_allowlisthas no size bound.validate_payload_egress_allowlistchecks only the shape (env_names.py:228-248).- Cosmetic. The length message ends with "declare the variable name only" (
env_names.py:189-192), the same hint as the other messages. Say that names are at most 128 characters.
Proposed change
- Add the count and length constants to the Go validator, in the same order as the server, with a parity test.
- Move the length check after the token-prefix check and before the shape check, and update the manual sentence.
- Either call
validate_payload_task_envdefensively in the insert helpers, or add a test that listsINSERT INTO tasksunderserver/orcaster_serverand fails for a site not in an explicit list of validated paths. - Add oversize route tests (257 entries, a 129-character name) for create, fork, worker command and control-op routes.
- Add a test and a doc sentence for stored over-bound rows: still delivered to workers; a fork returns 422 until
task_envis overridden. - Decide whether
egress_allowlistgets a count and length bound, or record that the request body cap is the limit.
Acceptance criteria
-
orcaster task createandorcaster task forkreject 257--envnames and a 129-character name locally, exit non-zero, send no request, and print no part of the entry. - An entry with a known token prefix and over 128 characters is reported as credential-like and the message does not echo it.
- A test or a defensive call guarantees that every
INSERT INTO taskspath validatestask_env. - Oversize route tests exist for the create, fork, worker command and control-op routes.
- A test pins "a stored over-bound row is still delivered; its fork returns 422 until
task_envis overridden". - The decision on
egress_allowlistbounds is recorded. - Valid requests and stored rows behave as today: existing deployments keep working without config changes.
- 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