How a policy gate binds a proposed action to an effect · Chapter 6 of 14

Commit

Canonical JSON matches eni6ma-id4-auto src/canon.rs. Object keys are sorted. The separators are a comma and a colon with no extra space.

policy_hash is SHA-256 of the canonical policy bytes. prompt_hash is SHA-256 of the signed prompt bytes.

The signed body has six fields:

  • method: llm_apply
  • endpoint_id: the policy field endpoint_id
  • policy: the committed policy object
  • prompt: the signed prompt string
  • tau: the application tau for this submit
  • nonce_uuid: the application nonce for this submit

request_hash is SHA-256 of that canonical body.

The server stores the canonical policy as base64 (policy_b64) and stores policy_hash beside it. A later check decodes those bytes and rehashes them. The rehash must equal the stored policy_hash, and that hash must equal SHA-256 of the canonical committed policy.

Scope: the six fields above. The proposal is outside this hash.