Skip to content
Radient LogoRadient Documentation

Guard conformance checklist

Use this list to test your harness before you ship it. It has four parts. Parts 1, 2 and 4 need no real Guard server (a stub that returns the answers named in each row is enough):

  1. Consent and network behaviour: what your harness must and must not do on its own computer.
  2. Signing known-answer test: one fixed input and the exact signature you must produce.
  3. Wire fixtures: requests to send to a Guard server and the answers that mean your harness understands the contract.
  4. Producer behaviour: the rules that keep what you collect honest.

Where a check says "no request", test it by pointing the harness at a local listener that records and refuses every connection, then confirming it recorded nothing.

Until Guard is switched on, every Guard route answers 404 guard_not_available, so the wire fixtures in part 3 cannot be run against production yet. Run them against a Guard-enabled organization once Guard is available.

IDDo thisYou must see
N1Sign in with a non-Team account, restart, and leave the harness idle for 24 hours. Open its Guard screen.No request to any /v1/guard/… route, and no key or credential-store entry written.
N2With a Team account and no consent, run a full session.Only status checks. No binding, ingest, reports or draft request, and no key.
N3Ask the harness to generate its key before any consent.There is no way to do it. The key is created only inside the handler of an accepted prompt.
N4Try to answer the consent prompt from a model tool call, a chat message, a message from another agent, a scheduled job, --yolo or any auto-approve mode.The prompt stays pending. No request is sent.
N5Leave a prompt pending while a long task runs.The task is not paused, blocked or delayed by the prompt.
N6Choose "Decide later", then run three more status checks.Nothing is sent and the prompt is not shown again by itself.
N7Decline, then run three more status checks that still answer consent_required.No new prompt, badge or notice. Declining is remembered on this computer.
N8Decline the added scopes of a widened prompt ("Keep current").The harness keeps sending the scopes already agreed. Later widened prompts for the same scopes show nothing; a later widening asks only for the difference.
N9Press Enter within half a second of the prompt appearing.The key press is ignored. The non-sharing choice has focus.
N10Make the model read the environment, the logs and a tool result that dumps the harness's own files.The private key is nowhere in what the model can see.
N11Answer every Guard call with 404 guard_not_available.No prompt, no queue flush and no retry loop.
N12Stop sharing from the harness.Sending stops at once. The harness does not ask again until the member chooses to share.
N13Stop sharing from the console, then send a batch.409 guard_revocation_stale. The harness treats it as a sticky stop and discards its queue.

#2. Signing known-answer test

Check your canonical JSON and your signature before you send anything. Ed25519 signatures are deterministic, so the same key and the same bytes always give the same signature.

  • Private key seed (hex): 9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60 (the first test vector in RFC 8032)
  • Raw public key, base64url: 11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo
  • key_id (first 32 hex of the SHA-256 of the raw public key): 21fe31dfa154a261626bf854046fd227
  • Domain: radient-guard-batch-v1 followed by one zero byte

Canonical payload to sign (one line, keys sorted, no whitespace):

text
{"batch_id":"0f1e2d3c4b5a69788796a5b4c3d2e1f0","collection_rev":1,"decisions":[{"day":"2026-11-27","outcome":"block","record_id":"00112233445566778899aabbccddeeff","rule_class":"dangerous_delete","schema":"guard_decision_v1","tool_class":"shell"}],"install_id":"0123456789abcdef0123456789abcdef","nonce":"n0nce-0123456789ab","revocation_gen":0,"schema":"guard_batch_v1","tenant":"acme-team","ts":1790000000}

Expected signature, base64url without padding:

text
2dOx0DKyPlvzVr_jllkV8BJyNynMoSrSCDWHZINtQTnUwbM8wRAMsEvSnc0GXs0KK2DiTS8VNCqt8MeqXLuzDw

The canonical line and the signature were produced independently with Python's cryptography package and with Node's built-in crypto, and matched byte for byte. This is a published test key: never enrol it.

IDDo thisYou must see
K1Build the canonical payload from the structured object above with your serializer.The identical line, character for character.
K2Sign domain + canonical payload with the seed above.The expected signature.
K3Derive key_id from the public key.21fe31dfa154a261626bf854046fd227.
K4Inspect every Guard request your harness sends.No Cookie header and no Origin header.
K5Send the same events twice.The second request has a new nonce and ts, and a new signature. Nothing is ever resent byte for byte.

#3. Wire fixtures

Send each request from a harness that holds a live consent for a Guard-enabled organization. Each answer below was recorded from the real Guard routes and stores with Guard on. D is today's UTC date.

#Admitted and idempotent

IDSendExpect
W1A valid batch of two decisions200, accepted: 2, replayed: false, decisions.status: "accepted"
W2The same events again, new nonce and ts200, replayed: true, nothing stored twice
W3A record with the id of an earlier record but a different outcome, sent in a batch with a new batch_id200, that record under rejected with guard_record_conflict, accepted: 0
W3bThe same conflicting record sent alone, with the batch_id your client derives (so it equals the first batch's when the first batch held only that record)409 guard_replay: that batch_id was already used for a different set of events. If the first batch held other records, the derived batch_id is new: 200, the record under rejected with guard_record_conflict

#Refused before anything is stored

IDSendExpect
W4A decision with outcome: "nope"400 guard_invalid_request
W5A decision with an extra path key400 guard_invalid_request
W6A batch with every family empty400 guard_invalid_request
W7A task_time record with terminal_state: "done" and no active_duration_band400 guard_invalid_request
W8A task_time record with terminal_state: "cancelled" and an active_duration_band400 guard_invalid_request
W9A batch signed with a different key403 guard_device_signature_required
W10An unsigned body {"payload":{}}403 guard_device_signature_required
W11A grant request carrying an Origin header403 guard_browser_refused
W12ts twenty minutes in the past400 guard_request_expired
W131025 decisions413 guard_batch_too_large
W14GET binding for an install_id the account never registered403 guard_device_unknown

#Stale state

IDSendExpect
W15collection_rev one higher than the binding409 guard_binding_stale
W16revocation_gen higher than the binding409 guard_revocation_stale
W17A batch_id already used, with a different set of events409 guard_replay
W18After stopping sharing: GET binding403 guard_consent_not_live
W19After stopping sharing: a batch with the old generations409 guard_revocation_stale
W20After the organization turns Guard off: a batch403 guard_org_not_on, and status answers org_off

#Windows

IDSendExpect
W21A decision with day = D minus 3 daysAccepted: 72 hours after a day ends is still open
W22A decision with day = D minus 4 days200 with accepted: 0 and the record under rejected as guard_day_closed
W23A decision with a day after D200 with accepted: 0 and guard_day_closed

#Scope

IDSendExpect
W24After the admin narrows the ceiling to decisions only: decisions and task_time in one batch200, refused_fields: ["task_time"], task_time.code: "guard_scope_not_consented", the decisions stored
W25The same, with only task_time403 guard_scope_not_consented

#Not available

IDSendExpect
W26Any /v1/guard/… request on a deployment without Guard404 {"code":"guard_not_available","error":"Guard is not available."}, even without a token. The harness shows no prompt and does not retry in a loop.

#4. Producer behaviour

These are checks on the stats your harness collects, which no server can verify for you.

IDDo thisYou must see
P1Raise a guardrail check that passes, one that is allowed by a rule and one that is blocked.All three are recorded, with outcomes pass, allow and block.
P2Add a rule the user wrote and trigger it.Its rule_class is custom, and no rule name is sent.
P3Make the Guard code throw while recording a decision.The agent's work is not interrupted. A Guard failure never blocks a tool call or a task.
P4Run two tasks in parallel that each take 4 minutes over the same 4 minutes.One active period of 4 minutes (1m_5m), not 8 (5m_15m): overlapping intervals are combined before the band is chosen.
P5Finish a task as cancelled, dropped or blocked.A task_time record with no active_duration_band.
P6Report the same review cycle twice.The same record_id both times, so the second counts as a duplicate.
P6bBlock the same kind of thing twice on one day, as two separate decisions.Two different record_ids, minted when each decision happened, and accepted: 2. An id derived from the outcome, rule class and tool class would count one.
P6cSend a queued batch, drop the answer, then send the queue again.The same record_ids and the same batch_id, and replayed: true the second time.
P7Run the posture check for 10,000 simulated members who all answer "recommended".About 75% send bit: 1 (between 73% and 77%), not 100%.
P8Flip a setting, then flip it back.The bit sent for the original value is the same draw as before. A fresh draw happens only for a value this member has never had.
P9Stop sharing, grant again, or have the organization turn Guard off and on, then send posture.The memoised bit is reused unchanged.
P10Report posture from a second computer on the same account.The server rejects it with guard_posture_not_designated. The harness does not retry it against another computer.
P11Receive guard_day_closed for a record.The record is deleted locally and is not counted as delivered.
P12Queue a record, then keep the harness offline until its day ended more than 72 hours ago.The record is dropped, not sent: a day record is only accepted for 72 hours after its day ends.
P13Receive guard_binding_stale.The prepared batch is discarded, never resent under the new consent, and binding is read before collecting again.
P14Draft a report from an assistant or the console.It sits as a pending draft. Only the harness can send it, after showing the member the exact report. A draft not confirmed within 120 seconds is drafted again.
P15Label a leaked AWS access key pair.credential_type is cloud_credential, never api_key.

#Passing

A harness conforms when every check in parts 1, 2 and 4 passes and every fixture in part 3 returns the answer shown. Keep the results: when a member or an admin asks what your harness sends, they are your evidence.