{"record":{"id":"e1ffdc6dc758f658","repo":"astrid-runtime/astrid","slug":"processes-exceeds-upper-bound-background-process","errorCode":null,"errorMessage":"processes exceeds upper bound ({BACKGROUND_PROCESSES_UPPER_BOUND})","messagePattern":"processes exceeds upper bound \\((.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/quota.rs","lineNumber":313,"sourceCode":"        AdminResponseBody::Quotas(q) => q,\n        other => anyhow::bail!(\"unexpected response from kernel: {other:?}\"),\n    };\n    if let Some(s) = args.memory.as_deref() {\n        quotas.max_memory_bytes = parse_bytes(s).context(\"invalid --memory\")?;\n    }\n    if let Some(s) = args.timeout.as_deref() {\n        let d = parse_duration(s).context(\"invalid --timeout\")?;\n        quotas.max_timeout_secs = d.as_secs().max(1);\n        if quotas.max_timeout_secs > TIMEOUT_SECS_UPPER_BOUND {\n            anyhow::bail!(\"timeout exceeds upper bound ({TIMEOUT_SECS_UPPER_BOUND}s)\");\n        }\n    }\n    if let Some(s) = args.storage.as_deref() {\n        quotas.max_storage_bytes = parse_bytes(s).context(\"invalid --storage\")?;\n    }\n    if let Some(n) = args.processes {\n        if n > BACKGROUND_PROCESSES_UPPER_BOUND {\n            anyhow::bail!(\"processes exceeds upper bound ({BACKGROUND_PROCESSES_UPPER_BOUND})\");\n        }\n        quotas.max_background_processes = n;\n    }\n    if let Some(s) = args.ipc_rate.as_deref() {\n        quotas.max_ipc_throughput_bytes = parse_bytes(s).context(\"invalid --ipc-rate\")?;\n    }\n    let body = client\n        .request(AdminRequestKind::QuotaSet {\n            principal: target.clone(),\n            quotas,\n        })\n        .await?;\n    let _ = into_result(body)?;\n    println!(\"Updated quotas for '{target}'.\");\n    Ok(ExitCode::SUCCESS)\n}\n\n// ── byte/duration parsers ──────────────────────────────────────────","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/quota.rs#L295-L331","documentation":"This error is thrown by `astrid quota set` when the `--processes` value exceeds the compile-time maximum `BACKGROUND_PROCESSES_UPPER_BOUND`. The daemon caps background process counts for a workspace, and a value above the bound would create an unusable quota record, so the CLI rejects it up front with anyhow::bail!.","triggerScenarios":"Running `astrid quota set --processes <n>` where n > BACKGROUND_PROCESSES_UPPER_BOUND.","commonSituations":"Typing an oversized value (e.g. copying a machine-level process limit), scripting quota setup with a template variable that resolves to a huge number, or assuming the daemon accepts arbitrary limits.","solutions":["Lower the --processes value to at most BACKGROUND_PROCESSES_UPPER_BOUND","Run `astrid quota set --help` or inspect the constant to learn the exact bound","If a larger limit is genuinely needed, request an increase to BACKGROUND_PROCESSES_UPPER_BOUND upstream rather than bypassing the check"],"exampleFix":"// before\nastrid quota set --processes 5000\n// after\nastrid quota set --processes 64","handlingStrategy":"validation","validationCode":"const UPPER: u64 = 64; // BACKGROUND_PROCESSES_UPPER_BOUND\nif let Some(n) = processes {\n    if n > UPPER {\n        return Err(format!(\"--processes must be <= {UPPER}\"));\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Clamp requested process counts to the documented upper bound before invoking the CLI","Centralize quota constants in your provisioning scripts","Test quota-setting commands with boundary values in CI"],"tags":["cli","validation","quota"],"backgroundTag":"value-out-of-range","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}