Policy
The effective policy for the tenant or a repository, with the source of every field, and overrides.
Get the effective policy
The effective policy with a source per field.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
repo | string | Optional |
Response
fields
curl "$CIRESK_API/v1/ci/policy" \
-H "Authorization: Bearer $CIRESK_KEY"Set policy overrides
Override policy fields for the tenant or a repo.
Request body
agent_branches_untrustedallow_full_buildallowed_kindsapproval_self- default
refuse: whether the requester of a job may decide its approval gates;recordaccepts it and audits each asapproval.sod_exception. never lets an agent decideOne ofrefuse,record artifact_retention_daysbudget_hard_limit- true refuses new jobs past the cap (
budget_exceeded); false only warns budget_units_per_month- the tenant's own monthly cap in cost units; a platform budget overrides it
budget_warn_at_percent- 1-100; usage at or past this share of the month's cap warns
cache_hit_max_age_days- the oldest recorded success a task cache lookup may be served from; default 7
cache_quota_bytescached_failures- default true: a key that failed cleanly twice and never passed is answered
failedat submit, and a clean red answers its waiting twins;--no-cachealways runs cancel_in_progress- default false: a submit cancels the submitter's older job of the same branch, kind and targets
dedup_window_secs- 0-86400, default 600: how long a succeeded job answers an identical tree submission
default_kindegress_allowlistegress_modefair_share_weight- 1-1000, default 1: the repository's share of the fleet, against the running slots that order the queue; a repo row's wins over the tenant row's
hard_jobs_per_dayhard_jobs_per_sessionhard_units_per_dayhard_units_per_sessionid_token_unprotected- default false: an id token reaches only a
trusted_cijob on a protected ref; true lets a person's or their agent's job and protected-branch ci off those refs have one too, which saysref_protected: false job_retention_dayslog_retention_daysmax_artifact_bytesmax_blob_bytesmax_concurrent_per_actor- per principal and actor; unset, the tenant's cap (the runaway guard is per session: half the tenant's cap, at least 4, derived only). 0 clears an override
max_concurrent_per_tenant- unset, derived from the fleet: twice the factories' reported ceilings in slots, plus the online slots no factory reports, plus 4, and at least 32. 0 clears an override
max_detached_audits- default 4: the audit jobs an organisation may have queued or running; a sampled audit of a trusted job's submit hit answers the task at once and runs as its own job. beyond it the hit is served without its audit; 0 keeps every audit inline in the job
max_escalated_cost_unitsmax_inline_blob_bytesmax_job_timeout_secsmax_log_bytesmax_task_cpusmax_task_memory- the most memory and cpus one task may request; a manifest over either is
422 resources_exceed_policy, a learned default is clamped to it max_task_timeout_secsmax_tree_bytesmax_tree_entriesmax_units_per_jobsecret_scopes- the tenant row only: who receives each
pass_envsecret, by name; a name mapped tonullgoes back to the default (trusted_cion the policy'strusted_ci_refs), every other name is kept soft_units_per_daysoft_units_per_sessionstatic_workers_min_trust- tiers, with no order on purpose (amendment 2026-10-27):
trusted_ciis protected-branch automation and the cache writer every tier reads,trusted_interactivea person's own work, and neither is "below" the other, so every rule over tiers names the tiers it meansOne ofuntrusted,trusted_ci,trusted_interactive trees_requests_per_minutetrusted_ci_refsuntrusted_principalsuntrusted_refswarm_workspaces
Response
fields
curl -X PUT "$CIRESK_API/v1/ci/policy" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_branches_untrusted": true,
"allow_full_build": true,
"allowed_kinds": [
"inline"
],
"approval_self": "refuse",
"artifact_retention_days": 1,
"budget_hard_limit": true,
"budget_units_per_month": 2000,
"budget_warn_at_percent": 1,
"cache_hit_max_age_days": 1,
"cache_quota_bytes": 18432000,
"cached_failures": true,
"cancel_in_progress": true,
"dedup_window_secs": 300,
"default_kind": "check",
"egress_allowlist": [
"acme/platform"
],
"egress_mode": "acme/platform",
"fair_share_weight": 1,
"hard_jobs_per_day": 1,
"hard_jobs_per_session": 1,
"hard_units_per_day": 1,
"hard_units_per_session": 1,
"id_token_unprotected": true,
"job_retention_days": 1,
"log_retention_days": 1,
"max_artifact_bytes": 18432000,
"max_blob_bytes": 18432000,
"max_concurrent_per_actor": 20,
"max_concurrent_per_tenant": 20,
"max_detached_audits": 1,
"max_escalated_cost_units": 1296,
"max_inline_blob_bytes": 18432000,
"max_job_timeout_secs": 300,
"max_log_bytes": 18432000,
"max_task_cpus": 1,
"max_task_memory": 1,
"max_task_timeout_secs": 300,
"max_tree_bytes": 18432000,
"max_tree_entries": 1,
"max_units_per_job": 1,
"secret_scopes": {
"secretScope": {
"grandfathered": true,
"refs": [
"main"
],
"repos": [
"acme/platform"
],
"trusts": [
"trusted_interactive"
]
}
},
"soft_units_per_day": 1,
"soft_units_per_session": 1,
"static_workers_min_trust": "trusted_interactive",
"trees_requests_per_minute": 1,
"trusted_ci_refs": [
"acme/platform"
],
"untrusted_principals": [
"acme/platform"
],
"untrusted_refs": [
"refs/pull/*"
],
"warm_workspaces": true
}'