Skip to main content

assurance-authority

tests PyPI License

An agent must not become a way to read things you cannot read

Give an agent a task that needs context above your clearance and there are three honest outcomes. It fetches the context as someone else and hands you the answer — which is a permission-laundering machine with your company's name on it. It refuses. Or the task changes owner, and the answer goes to the person who was always allowed to have it.

Only the last two are acceptable, and the rule that separates them is one function:

Context acquisition never raises the initiating principal's effective authorisation. Another principal's clearance may move the task. It may never move the answer.

This package makes that rule runnable against your own people and your own tasks.

Thirty seconds

pip install assurance-authority
assurance-authority team.json
2 of 5 tasks may proceed for the person who asked — 2 moved owner — 1 refused

  team roster       intern-42    proceed
  Q3 margin memo    intern-42    escalate_ownership -> CFO
  pipeline summary  analyst-7    proceed
  board pack        analyst-7    escalate_ownership -> CFO
  payroll extract   agent-a      refuse

The intern gets the roster. The margin memo moves to the CFO rather than the answer moving to the intern. The agent's payroll request is refused, because nobody declared may own it — not silently downgraded, not answered with a subset.

The declaration

One JSON file. Labels are opaque strings: your own scheme, a Sharepoint group id, whatever your identity system reports. Nothing here interprets them, it only compares sets.

{
  "principals": [
    {"id": "intern-42", "name": "Priya (intern)", "may_receive": ["general"]},
    {"id": "cfo-1",     "name": "CFO",            "may_receive": ["general", "finance-confidential"]}
  ],
  "tasks": [
    {"name": "Q3 margin memo", "initiator": "intern-42", "requires": ["finance-confidential"]}
  ]
}

As a library

from assurance_authority import loads, review

declaration = loads("""
{
  "principals": [
    {"id": "intern-42", "name": "Priya", "may_receive": ["general"]},
    {"id": "cfo-1",     "name": "CFO",   "may_receive": ["general", "finance-confidential"]}
  ],
  "tasks": [
    {"name": "Q3 margin memo", "initiator": "intern-42", "requires": ["finance-confidential"]}
  ]
}
""")

result = review(declaration)
row = result.rows[0]

assert row.resolution.resolution.value == "escalate_ownership"
assert row.delivered is False          # the answer does NOT go back to the intern
assert row.new_owner == "CFO"          # the task does

In a pipeline

assurance-authority team.json --fail-on-escalation
exit means
0 reviewed, and every task may proceed for the person who asked
1 reviewed, and --fail-on-escalation found a task that cannot be delivered to its initiator
2 refused — the declaration could not be read, so there is no review

2 is separate from 1 on purpose. "I could not answer" and "I answered and you will not like it" are different facts, and a pipeline that treats them the same will one day treat a broken config as a policy violation, or worse, the reverse.

What it refuses to do

  • A task whose initiator is not declared. Assuming an empty clearance would produce a refusal indistinguishable from a real one.
  • A task that requires nothing. That is not an authority question, and answering it would imply one had been asked.
  • Two clearances for one principal id. That is a question about which is real, and this cannot answer it.

Where the rule actually lives

assurance_core.principal.resolve, in assurance-core. This package reads a file, calls it once per task, and counts the answers. The arithmetic is deliberately thin so there is exactly one implementation of the thing that must never be wrong — and you can read it in one sitting to confirm no branch returns PROCEED on the strength of somebody else's clearance.

Licence

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

assurance_authority-0.1.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

assurance_authority-0.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file assurance_authority-0.1.0.tar.gz.

File metadata

  • Download URL: assurance_authority-0.1.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for assurance_authority-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8af73c2de924a248ec79725c75496245b506adde157047ca775ec31b1956f407
MD5 6dc288ed09c5e8182e11eb96b95beab8
BLAKE2b-256 37c28143c1c4a30924da092b347133783feb9c1351d09ddc41b03f7f06c24f57

See more details on using hashes here.

Provenance

The following attestation bundles were made for assurance_authority-0.1.0.tar.gz:

Publisher: publish.yml on i-ops-hq/assurance-authority

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file assurance_authority-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for assurance_authority-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6841274e9289432a46c10713035fd8bfb3a92f73abefb763d01a7a379ce60f0c
MD5 cf4f86f5175d8c217a217c67caa2bca3
BLAKE2b-256 7a86a0547255c411c9d16831accacf8c532c1a8ca22678c80a542e48fdb9ae4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for assurance_authority-0.1.0-py3-none-any.whl:

Publisher: publish.yml on i-ops-hq/assurance-authority

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page