Rightshold™ Sign up

Answers · agent safety

How do I bind an agent approval to a specific tested artifact or version?

Last updated

TL;DR: Treat release approval as change control, not a free-floating yes. The human decision must name the exact artifact that was tested — image digest, firmware SHA-256, package version plus content hash, or commit that built it — and the deploy step must refuse anything else. Record the approver, the approved identity (digest/version), the test evidence pointer, and the released identity in a change record the agent cannot edit or overwrite. Frameworks pause for approval (OpenAI Agents SDK interruptions; GitHub Environments required reviewers) but do not by themselves prove the bytes on the plant or cluster match what was tested; your gate has to compare digests at load time. Pair request_human_approval (action hashed with artifact fields) with record_ai_run when you need a signed receipt of the tested build and the decision.

What should I check, step by step?

1. Identify the unit under change with an immutable fingerprint: container image sha256 digest, firmware or package SHA-256, signed build attestation, or the exact commit + reproducible build id — never a floating tag like latest or a branch name alone.

  1. Collect test evidence against that same fingerprint (CI run URL, signed test pack, holdout eval receipt). Reject evidence that names a different digest or an unpinned tag.
  2. Open a human approval whose action object includes artifact_id, version, content_digest (or image digest), environment, and evidence_ref. Hash those fields; do not approve a prose summary alone.
  3. Store the decision (approver, decided_at, approved digest/version, evidence_ref) in a server DB, MES/change system, or ledger the agent's tools cannot UPDATE. Give the agent only the approval or change-record id.
  4. At load/deploy time, re-read the live artifact digest and compare to the approved one. Fail closed on mismatch, missing approval, or expired grant — do not ship "close enough" builds.
  5. Append an immutable change record: who approved, which digest was approved, which digest was released, when, and the evidence pointer. Prefer append-only versions over edits to past rows.
  6. Re-check at execution (or SOFTWARE_LOAD / apply) time, not only when the ticket was filed: a yes for build A is not a warrant for build A' rebuilt after the yes.
  7. Keep only the change-record id in the agent session — never approved=true or a mutable copy of the digest the model can rewrite.

Why version labels alone are not enough

A human "approved v2.4" while CI rebuilt v2.4 from a different commit leaves production running untested bytes. Bind the yes to the digest (or equivalent fingerprint), and treat the human-readable version as a label on that digest.

Approval, then an uneditable change record

request_human_approval hashes the action object. Put artifact_id, version, content_digest, environment, and evidence_ref inside action so verify_human_approval fails if the agent swaps in another build after the yes.

What can go wrong?

Approval UI shows the agent's summary ("roll out the tested build") while the tool arguments point at a different tag or digest.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Before releasing this build, ask me to approve the exact tested artifact (id, version, content digest, environment and evidence ref), bind the yes to a hash of those fields, and wait for my decision.”

One-click setup

{
  "tool": "request_human_approval",
  "arguments": {
    "summary": "Release plant-controller build 2.4.1 (sha256:9f2c…) to line-3 after soak test SOAK-441; reject any other digest",
    "action": {
      "type": "release_artifact",
      "artifact_id": "plant-controller",
      "version": "2.4.1",
      "content_digest": "sha256:9f2c…",
      "environment": "line-3",
      "evidence_ref": "ci://runs/SOAK-441",
      "policy_version": 7
    },
    "expires_in_minutes": 120
  }
}

Rightshold records human approvals and signed AI-run receipts for agents that call it. It does not flash firmware, push images, sit in your MES, or stop a deploy pipeline that never asks. Enforce the digest compare in your load/deploy gate too. Not legal advice.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'