szl-blocked — honest-BLOCKED as a first-class governed state (+ EU AI Act Annex IV auto-derivation)

The lane the Kernel Hub leaders leave open. Major kernel publishers ship the fast path and treat a failed guard as an exception to swallow. szl-blocked makes refusal a first-class, provenanced outcome: when a governed call is denied, the op never runs, and the chain records an honest BLOCKED receipt — not a faked-green success. Its companion szl_euaiact then turns that same provenance into an EU AI Act Annex IV-style technical-documentation skeleton — compliance as a byproduct of cryptographic provenance, not a separate manual workflow.

Part of the szl-kernels governed-kernel series. Where szl-govsign makes a verdict third-party-verifiable, szl-blocked makes a refusal auditable — and derives the compliance paperwork from it.

Quickstart

pip install kernels
from kernels import get_kernel

# This repo ships two sibling packages: szl_blocked (the gate, loaded below via get_kernel)
# + szl_euaiact (the Annex IV derivation, loaded separately from a repo snapshot — see below).
blk = get_kernel("SZLHOLDINGS/szl-blocked", revision="main", trust_remote_code=True)

chain = blk.UnifiedReceiptChain()

# A hard-deny policy: block any request whose action is on the blocklist
policy = blk.deny_if_action_in({"exfiltrate", "delete_all"})

def do_work(x):
    return x * 2

# ALLOWED path: op runs, ALLOW receipt recorded
ok = blk.governed_call(do_work, policy, chain, request={"action": "summarize"}, args=(21,))
assert ok.blocked is False and ok.output == 42

# BLOCKED path: fn is NEVER called, output is None, honest BLOCK receipt recorded
no = blk.governed_call(do_work, policy, chain, request={"action": "exfiltrate"}, args=(21,))
assert no.blocked is True and no.output is None    # honest-BLOCKED, not fake-green

# Compliance as a byproduct: derive an EU AI Act Annex IV DRAFT skeleton from the chain.
# szl_euaiact is a SIBLING package in this repo — get_kernel() loads ONLY szl_blocked and
# does NOT add szl_euaiact to sys.path. Load it from a snapshot of this repo instead:
from huggingface_hub import snapshot_download   # standard huggingface_hub API
import sys, json
path = snapshot_download("SZLHOLDINGS/szl-blocked")            # documented HF API: returns a local repo path
sys.path.insert(0, f"{path}/build/torch-universal")
import szl_euaiact                                            # VERIFIED: imports once this dir is on sys.path

doc = szl_euaiact.derive_annex_iv({
    "system": {"name": "MyModel", "provider": "SZL Holdings", "version": "0.1.0"},
    "chain": json.loads(chain.to_json()),
})
md = szl_euaiact.to_markdown(doc)   # human-readable DRAFT skeleton (NOT legal advice)

Doctrine — what it guarantees, and what it does NOT

  • Hard DENY dominates. A matched security deny (deny_if_flag, deny_if_action_in, deny_by_default) cannot be overridden by an advisory Λ pass.
  • Advisory Λ can only tighten, never loosen. Λ (Conjecture 1, OPEN) may add a block but can never upgrade a hard deny into an allow, nor turn a recorded ALLOW into "proven trust."
  • honest-BLOCKED. On a BLOCKED verdict, the guarded fn is never called; you get a BlockedResult (output is None, blocked is True) and a BLOCK receipt is written to the chain before any op could run.
  • ❌ It does NOT fake green. There is no code path that flips a BLOCKED verdict to ALLOWED or fabricates a success output.
  • Energy MEASURED-only — no measured figure is disclosed as such, never fabricated.
  • Annex IV output is a DRAFT SKELETON — explicitly NOT legal advice and NOT a declaration of conformity. Provenance-derived sections reflect only what the receipt chain recorded; missing human input is emitted as explicit TODO markers.

Install

pip install kernels          # load szl_blocked via get_kernel (HF Kernel Hub universal kernel)
pip install huggingface_hub  # to fetch the szl_euaiact sibling package via snapshot_download
# szl_euaiact (Annex IV derivation) ships in THIS repo, but get_kernel() does NOT expose it —
# load it from a snapshot_download() of this repo (see Quickstart). No PyPI package to install.

API

szl_blocked — the honest-BLOCKED gate

Symbol What it does
governed_call(fn, policy, chain, ...) Decide → on ALLOW run fn and record an ALLOW receipt; on BLOCK never call fn, return BlockedResult, record a BLOCK receipt.
GovernedGate The decision engine: deny-by-default hard policy + advisory Λ; emits a decision receipt before any op.
deny_by_default, deny_if_flag, deny_if_action_in, allow_if_capability Composable security policies; a hard deny dominates and cannot be overridden by advisory Λ.
BlockedResult / AllowedResult / GateDecision / PolicyResult Typed outcomes; BlockedResult.output is always None.
UnifiedReceiptChain, tensor_digest, GENESIS Provenance chain shared with the szl-kernels suite (.to_json() / .verify() / .head()).
ALLOW, BLOCK, DOMINANT_HARD, DOMINANT_ADVISORY, DOMINANT_NONE Verdict + dominance constants.

szl_euaiact — Annex IV auto-derivation (companion package)

Symbol What it does
derive_annex_iv(record) Build an Annex IV-style DRAFT skeleton dict from a governance record (system info + receipt chain).
to_markdown(doc) Render the skeleton as human-readable Markdown (carries the NOT-legal-advice disclaimer).
DISCLAIMER, PRIOR_ART, SCHEMA_VERSION, ANNEX_IV_ELEMENTS Doctrine constants; schema szl-annex-iv-skeleton/0.1.0; prior art: EU AI Act Annex IV, SPDX 3.0 AI profile / AI BOM.

The governed-kernel series

Kernel Lane
szl-kernels Unified suite — cross-kernel UnifiedReceiptChain provenance
szl-governed-norm Governed normalization with provenance receipts
szl-lambda-gate Advisory Λ gate (Conjecture 1, OPEN)
governed-inference-meter MEASURED-joule energy accounting (NVML)
szl-govsign Signed, third-party-verifiable governance attestation (DSSE / in-toto)
szl-provctl provenance-DAG verify + in-toto/SLSA interop
szl-blocked honest-BLOCKED as a first-class state + EU AI Act Annex IV derivation

Live Spaces: a11oy · hatun-mcp.

Related — Governed Kernels collection: Governed Kernels — verifiable AI building blocks groups the whole family in one page. Live console: a11oy · a-11-oy.com · llm-router · receipt verifier · receipt spec (hub).

License & provenance

Apache-2.0 · © 2026 SZL Holdings · Stephen P. Lutar · ORCID 0009-0001-0110-4173

Platform: a-11-oy.com — the governed-inference substrate. Live governed inference: SZLHOLDINGS/a11oy Space.

Λ is Conjecture 1 (OPEN) — advisory only; uniqueness is not proven. No benchmark, joule, or count in this card is fabricated; energy is MEASURED-only. The Annex IV derivation is a DRAFT skeleton and is not legal advice or a declaration of conformity.


DOI

Citation

Cite this. Part of the SZL Holdings Ouroboros Thesis (Governed Post-Determinism).
Concept DOI (always-latest): 10.5281/zenodo.19944926.
Author: Stephen P. Lutar Jr. · ORCID 0009-0001-0110-4173 · License CC-BY-4.0.
Full DOI-pinned lineage (v1→v26) + the 8 papers: szl-papers PAPERS_INDEX.
No artifact-specific DOI is minted for this model; the concept DOI above covers the program.

Honesty (Doctrine v11): Λ unconditional uniqueness is Conjecture 1 (machine-checked FALSE as stated) — never a theorem; conditional uniqueness is Theorem U (axiom-free). Locked-proven formulas = exactly 8 {F1,F4,F7,F11,F12,F18,F19,F22}; ~185 experimental theorems are a separate CI-green tier; Khipu BFT safety = Conjecture 2. Trust never 100%.

@misc{lutar_szl_ouroboros,
  author    = {Lutar, Stephen P., Jr.},
  title     = {SZL Holdings --- The Ouroboros Thesis (Governed Post-Determinism)},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.19944926},
  url       = {https://doi.org/10.5281/zenodo.19944926},
  note      = {Concept DOI --- always resolves to the latest version. ORCID 0009-0001-0110-4173. CC-BY-4.0.}
}

Signed-off-by: Stephen Lutar stephenlutar2@gmail.com

Files in this repo

Path What it is
build/torch-universal/szl_blocked/__init__.py public API — governed_call, policies, selfcheck()
build/torch-universal/szl_blocked/_gate.py the honest-BLOCKED gate engine
build/torch-universal/szl_blocked/_chain.py receipt chain (SHA3-256)
build/torch-universal/szl_blocked/_rules.py built-in deny policies
build/torch-universal/szl_euaiact/__init__.py companion package — EU AI Act Annex IV DRAFT derivation
build/torch-universal/szl_euaiact/_annex_iv.py Annex IV skeleton generator (DRAFT — not legal advice)
build.toml · metadata.json Kernel Hub build/metadata manifests
LICENSE · SECURITY.md Apache-2.0 · security policy
Downloads last month
-
kernel
eu-ai-act
compliance
annex-iv
governance
10.5281/zenodo.19944926
apache-2.0