Repository navigation
feat(contracts): release candidates, and the agent detail returns its release reference - #764
Merged
Merged
Conversation
… release reference
Adds three operations on /api/v1/projects/{project_id}/agents/{agent_ref}/release-candidates:
record a candidate after the client's release gate runs (a signed-in person or an SDK API
key with editor access and agent WRITE; service tokens are refused), list candidates, and
read one. The candidate record carries ids, digests, a closed gate-verdict enum and
timestamps only, with the same field shapes as the release acceptance it feeds. Same-body
replay returns the original record; a different body for the same version is a closed 409.
Denials are the closed release refusal envelope; the 429 body accepts the limiter's values.
The agent detail read gains an optional `agent_ref`: the server-issued release reference a
portal needs to call the release routes. The content-class lint approves the fixed
`release_candidate_` reference pattern.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



A person must record a release acceptance before an agent's best-config head can move. The acceptance needs digests that only the client's release gate knows. This adds a server-side release candidate record: the client reports a candidate after its gate runs, and a portal lists candidates so a person can accept one. The agent detail read now also returns the server-issued release reference that the release routes take.
Ticket: TRAIG-247
Security note: additive and closed; the candidate record carries ids, digests, a closed verdict enum and timestamps only; recording requires editor access and agent write, and service tokens are refused; every denial is the closed release refusal envelope
Spine-Trail: st_2f85a1623bec
What changes
optimization/release_endpoints.json, on/api/v1/projects/{project_id}/agents/{agent_ref}/release-candidates(marked as planned routes):POST: record a candidate, by a signed-in person or an SDK API key with editor access and agent WRITE; service tokens are refused with the closed refusal (401 or 403, depending on where authentication stops the request);GETlist: newest first, environment filter, at most 100;GET .../{candidate_ref}: read one.409 candidate_conflict.404 reference_not_foundand the closed 400; the 429 body accepts the rate limiter's real values and rejects prose. The rate-limit headers are the shared ones every route uses.optimization/release_candidate_schema.json(new):$ref;gate_verdictinpromote | reject | no_decision; a real gate digest is required unless the verdict isno_decision;candidate_refmatches^release_candidate_[0-9a-f]{32}$;stateisopen | accepted | released | superseded.agents/agent_detail_schema.json(new) andagents/agents_endpoints.json: the agent detail GET gains an optionalagent_ref. That's the server-issued release reference, derived one-way from the agent id, which a portal needs to call the release routes.scripts/content_class_lint.py: approves the fixedrelease_candidate_reference pattern. That's the only lint change.scripts/breaking_schema_allowlist.json: one exact acknowledgement. A client that validated agent detail responses against the previous closed schema could reject a response once the field is emitted. Neither SDK reads or validates that response.Tests
scripts/breaking_schema_check.py --check: passed, one acknowledged change.scripts/content_class_lint.py --report: OK.scripts/schema_reachability.py --check: passed.The parity and manifest checks: up to date.
The candidate, acceptance and agent contract tests: all passed. The 429 tests replay real limiter values, including a window of
1 per 10000000000 second.make local-gate: PASSED.Review: independent blockers-only reviews over eight rounds. Each finding was checked against the service and both SDKs and resolved; one earlier lint widening was reverted rather than kept. Final read recorded below.
Merge note: this PR and the production-reactive
agent_refPR share their base, and each regenerates the CHANGELOG, the parity manifest and the content-class manifest. Whichever lands second regenerates those three files on the new base.🤖 Generated with Claude Code