Skip to content

The release gate for a scope

View as Markdown
GET
/v1/agents/{agentId}/release-gate
curl --request GET \
--url 'https://example.com/v1/agents/example/release-gate?scopeKind=tenant' \
--header 'Authorization: Bearer <token>'

The release gate a pin of the agent for the scope would be checked against: the most specific scope with an active gate (a segment path’s longer prefixes first, then its project, the project’s org, the tenant), at its latest active version. releaseGate: null when none applies.

agentId
required
string

AgentId — dotted namespace (acme.drafting).

scopeKind
string
Allowed values: tenant org project segment

Only one scope: tenant, org or project (with scopeId), or segment (with scopeId and segment).

scopeId
string
>= 1 characters

Required IF scopeKind is org or project. MUST be absent if scopeKind=tenant (tenant is implicit from the session). Malformed combinations return 400 scope-invalid.

segment
Array<string>

One step of the segment path, key:value; repeat it in order, coarse to fine.

The release gate, or null.

Media typeapplication/json
object
releaseGate
required
One of:
object
id
required
string
version
required
string
agentId
required
string
scope
required
One of: discriminator: kind

The whole tenant.

object
kind
required
string
Allowed values: tenant
spec
required

What a pin must show. Every part is optional; an empty spec checks nothing. A pin must name a comparison (testRunId) exactly when the spec has comparison, evidence, metrics, replay, cases or onlyExpertGroups. Unknown keys are refused.

object
comparison
object
maxAgeHours
number
> 0
testSet
object
id
required
string
version
string
evidence

The evidence from corrections behind each gated metric; for a metric with maxDrop, the baseline’s too.

object
minCases
integer
minWeight
number
metrics
Array<object>
object
name
required
string
Allowed values: passRate caseCoverage weightedPrecisionAtK
k

weightedPrecisionAtK only: the summary’s k must be this.

integer
>= 1 <= 100
minCandidate
number
<= 1
maxDrop

How far the candidate may fall below the baseline (the pinned version).

number
<= 1
replay

Each knob left out of the block is 0. No block: no replay checks.

object
maxDiverged
integer
maxErrors
integer
maxRefusedWrites

At most this many tool calls the replay refused (the comparison summary’s refusedWrites). Reads count too, despite the name.

integer
maxStopped
integer
cases

The cases the comparison graded: each correction it checked is a case, and it passes when every repetition did.

object
minPassing

At least this many cases pass.

integer
noNewFailures

No case that passed before fails: none of the comparison’s corrections that are fixed now fails it. One the comparison didn’t grade isn’t counted; the check’s message says how many of the cases fixed now it graded.

boolean
approvals

A passing pin waits for a reviewer.

object
role

Default senior.

string
Allowed values: standard senior admin
separateApprover

Default true.

boolean
onlyExpertGroups

Only expert groups count: the comparison must be weighted experts-only, so a group anyone may assert can’t move the gate.

boolean
description
string
createdAt
required
string format: date-time
unregisteredAt

Present only on an unregistered version: a retired gate (every version unregistered) as GET /v1/release-gates?includeRetired=true lists it.

string format: date-time
Example
{
"releaseGate": {
"scope": {
"kind": "tenant"
},
"spec": {
"metrics": [
{
"name": "passRate"
}
],
"approvals": {
"role": "standard"
}
}
}
}

Missing or malformed scope.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

The database was too busy to answer in time (database-busy); Retry-After (whole seconds) says when to try again.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

See also