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):
- Consent and network behaviour: what your harness must and must not do on its own computer.
- Signing known-answer test: one fixed input and the exact signature you must produce.
- Wire fixtures: requests to send to a Guard server and the answers that mean your harness understands the contract.
- 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.
#1. Consent and network behaviour
| ID | Do this | You must see |
|---|---|---|
| N1 | Sign 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. |
| N2 | With a Team account and no consent, run a full session. | Only status checks. No binding, ingest, reports or draft request, and no key. |
| N3 | Ask 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. |
| N4 | Try 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. |
| N5 | Leave a prompt pending while a long task runs. | The task is not paused, blocked or delayed by the prompt. |
| N6 | Choose "Decide later", then run three more status checks. | Nothing is sent and the prompt is not shown again by itself. |
| N7 | Decline, then run three more status checks that still answer consent_required. | No new prompt, badge or notice. Declining is remembered on this computer. |
| N8 | Decline 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. |
| N9 | Press Enter within half a second of the prompt appearing. | The key press is ignored. The non-sharing choice has focus. |
| N10 | Make 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. |
| N11 | Answer every Guard call with 404 guard_not_available. | No prompt, no queue flush and no retry loop. |
| N12 | Stop sharing from the harness. | Sending stops at once. The harness does not ask again until the member chooses to share. |
| N13 | Stop 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-v1followed by one zero byte
Canonical payload to sign (one line, keys sorted, no whitespace):
{"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:
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.
| ID | Do this | You must see |
|---|---|---|
| K1 | Build the canonical payload from the structured object above with your serializer. | The identical line, character for character. |
| K2 | Sign domain + canonical payload with the seed above. | The expected signature. |
| K3 | Derive key_id from the public key. | 21fe31dfa154a261626bf854046fd227. |
| K4 | Inspect every Guard request your harness sends. | No Cookie header and no Origin header. |
| K5 | Send 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
| ID | Send | Expect |
|---|---|---|
| W1 | A valid batch of two decisions | 200, accepted: 2, replayed: false, decisions.status: "accepted" |
| W2 | The same events again, new nonce and ts | 200, replayed: true, nothing stored twice |
| W3 | A record with the id of an earlier record but a different outcome, sent in a batch with a new batch_id | 200, that record under rejected with guard_record_conflict, accepted: 0 |
| W3b | The 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
| ID | Send | Expect |
|---|---|---|
| W4 | A decision with outcome: "nope" | 400 guard_invalid_request |
| W5 | A decision with an extra path key | 400 guard_invalid_request |
| W6 | A batch with every family empty | 400 guard_invalid_request |
| W7 | A task_time record with terminal_state: "done" and no active_duration_band | 400 guard_invalid_request |
| W8 | A task_time record with terminal_state: "cancelled" and an active_duration_band | 400 guard_invalid_request |
| W9 | A batch signed with a different key | 403 guard_device_signature_required |
| W10 | An unsigned body {"payload":{}} | 403 guard_device_signature_required |
| W11 | A grant request carrying an Origin header | 403 guard_browser_refused |
| W12 | ts twenty minutes in the past | 400 guard_request_expired |
| W13 | 1025 decisions | 413 guard_batch_too_large |
| W14 | GET binding for an install_id the account never registered | 403 guard_device_unknown |
#Stale state
| ID | Send | Expect |
|---|---|---|
| W15 | collection_rev one higher than the binding | 409 guard_binding_stale |
| W16 | revocation_gen higher than the binding | 409 guard_revocation_stale |
| W17 | A batch_id already used, with a different set of events | 409 guard_replay |
| W18 | After stopping sharing: GET binding | 403 guard_consent_not_live |
| W19 | After stopping sharing: a batch with the old generations | 409 guard_revocation_stale |
| W20 | After the organization turns Guard off: a batch | 403 guard_org_not_on, and status answers org_off |
#Windows
| ID | Send | Expect |
|---|---|---|
| W21 | A decision with day = D minus 3 days | Accepted: 72 hours after a day ends is still open |
| W22 | A decision with day = D minus 4 days | 200 with accepted: 0 and the record under rejected as guard_day_closed |
| W23 | A decision with a day after D | 200 with accepted: 0 and guard_day_closed |
#Scope
| ID | Send | Expect |
|---|---|---|
| W24 | After the admin narrows the ceiling to decisions only: decisions and task_time in one batch | 200, refused_fields: ["task_time"], task_time.code: "guard_scope_not_consented", the decisions stored |
| W25 | The same, with only task_time | 403 guard_scope_not_consented |
#Not available
| ID | Send | Expect |
|---|---|---|
| W26 | Any /v1/guard/… request on a deployment without Guard | 404 {"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.
| ID | Do this | You must see |
|---|---|---|
| P1 | Raise 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. |
| P2 | Add a rule the user wrote and trigger it. | Its rule_class is custom, and no rule name is sent. |
| P3 | Make 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. |
| P4 | Run 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. |
| P5 | Finish a task as cancelled, dropped or blocked. | A task_time record with no active_duration_band. |
| P6 | Report the same review cycle twice. | The same record_id both times, so the second counts as a duplicate. |
| P6b | Block 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. |
| P6c | Send 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. |
| P7 | Run the posture check for 10,000 simulated members who all answer "recommended". | About 75% send bit: 1 (between 73% and 77%), not 100%. |
| P8 | Flip 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. |
| P9 | Stop sharing, grant again, or have the organization turn Guard off and on, then send posture. | The memoised bit is reused unchanged. |
| P10 | Report 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. |
| P11 | Receive guard_day_closed for a record. | The record is deleted locally and is not counted as delivered. |
| P12 | Queue 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. |
| P13 | Receive guard_binding_stale. | The prepared batch is discarded, never resent under the new consent, and binding is read before collecting again. |
| P14 | Draft 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. |
| P15 | Label 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.