Skip to content

Release 0.3.17: the authz/v1 authorization contract - #43

Merged
arybach merged 2 commits into
mainfrom
chore/release-0.3.17
Nov 10, 2026
Merged

arybach merged 2 commits into
mainfrom
chore/release-0.3.17

Conversation

@arybach

@arybach arybach commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

What this is

Release 0.3.17 of runtime-contracts, cut from main at 91876276689927398fb00546699d3c69bed2f4b9 (the merge of #41 and #42). Its content is the authz/v1 authorization contract and the #627 retrieval-lane qualification.

Two commits: one documents authz/v1 in the inventory docs it was missing from, one bumps the version and writes the changelog. Do not merge and tag in one motion — read "Before the tag" below first.

Why a release commit touches 7 files, not 6

authz/v1 is this release's headline content and it appeared in none of the three inventory docs. README enumerated contract surfaces through qa/v1 only; STATUS.md's shipped-and-tested table stopped at the qa/v1 clarifications with a whole-suite row quoting 1785 passed / 1 skipped from 2026-10-30. The docs commit adds the missing rows and states the scope limits in the row where the claim is made: kernel and enterprise cells are BLOCKED without sibling checkouts, and every retrieval figure is the DuckDB path, so the PostgreSQL / pgvector legs are unverified.

Public API and behavioural delta vs 0.3.16

Verified, not inferred:

Question Answer How it was checked
runtime_contracts.__all__ changed? No — byte-identical diff of the __all__ block between v0.3.16 and 9187627
New runtime deps / requires-python change? No — pyproject.toml untouched by #41/#42 git diff v0.3.16..9187627 -- pyproject.toml is empty; authz/ imports stdlib only
New names colliding with existing ones? None (21 authz names, 0 intersections) set intersection of the two __all__s
Golden files, canonicalization, schema_version? Unchanged — git diff --stat v0.3.16..9187627 -- golden/ is empty
Credential/protocol behaviour? Byte-identical to 0.3.16 — git diff v0.3.16..9187627 -- runtime_contracts/protocol/ is empty
Released hash promise intact? content_hash({"a":1}) = rcv1:015abd7f5cc57a2dd94… under 0.3.14, 0.3.16 and the 0.3.17 wheel three interpreters, same digest

One discoverability asymmetry worth deciding on, not just noting. qa/v1 is reachable as an attribute after import runtime_contracts because __init__.py does from . import qa. authz/v1 has no such line: after a plain import runtime_contracts, hasattr(runtime_contracts, "authz") is False, and runtime_contracts.authz raises AttributeError until something imports the submodule. It is reachable as import runtime_contracts.authz (verified from the installed wheel). I left this alone deliberately — adding from . import authz is an API change and does not belong in a release commit. If it should match qa, it wants its own PR.

Downstream compatibility — read before pinning anything

agentic-os pins runtime-contracts @ git+…@v0.3.14 (pyproject.toml:14, and its venv has runtime_contracts-0.3.14.dist-info). The known enterprise credential-broker TENANT_MISMATCH failures are not caused by this release. Measured, not asserted — the same eight authority shapes through both versions (runtime_contracts.protocol.secrets.authorize_request):

Authority shape 0.3.14 (pinned) 0.3.17
A tenant-bound authority, matching request tenant ALLOW ALLOW
B unscoped authority (principal has no tenant) ALLOW DENY TENANT_MISMATCH
C no tenant on either side ALLOW DENY TENANT_MISMATCH
D request tenant ≠ principal tenant ALLOW DENY TENANT_MISMATCH
E secret_ref namespace platform-wide, not the tenant ALLOW DENY TENANT_MISMATCH
F authority_context_id names neither id nor chain ALLOW DENY AUTHORITY_MISMATCH
G unparsable expiry ALLOW DENY AUTHORITY_EXPIRED
H timezone-naive future expiry (a broker writing naive UTC) ALLOW DENY AUTHORITY_EXPIRED

7 of 8 flip. The cause is the gate added in 0.3.15, and the digests are identical in both runs (rcv1:8bce761747c7744…, rcv1:b788c010c721385…) — nothing about the request's identity moved, only the verdict. Consequences:

  • 0.3.16 → 0.3.17 changes no credential decision. protocol/ is byte-identical.
  • 0.3.14 → 0.3.17 is a fail-closed behavioural break, and a broker that mints tenant-less or naive-expiry authorities will meet it on the first upgrade across the 0.3.15 boundary.
  • No downstream pin was touched here. agentic-os (and the permissions-2026-11 checkout) stay at v0.3.14, its venv is untouched. Upgrading that pin is a separate change with its own evidence, and cases B, C and H above are the things it has to settle first — B and C are the shapes that produce the reported broker failures, and H is the quiet one, because a naive-UTC expiry is a plausible broker bug that reads as permanently expired.

Artifact: built in isolation, contents and reproducibility measured

Built from a fresh clone of this branch into throwaway venvs (build 1.6.1, setuptools, Python 3.12.16) — never in the repo used for development.

Check Result
Wheel, two builds, same SOURCE_DATE_EPOCH byte-identical — f5450ab3410d732a…
Wheel, build without SOURCE_DATE_EPOCH differs (4d85c4b4…, 9281200b…) — reproducibility requires the epoch pinned
sdist, two builds, same SOURCE_DATE_EPOCH not byte-reproducible: same file list, content byte-identical, 18 members carry build-time nanosecond mtimes in pax headers (PKG-INFO, egg-info, directory entries) despite the epoch being set
Wheel content vs the 0.3.16 wheel file-list delta is exactly the 4 authz modules — nothing added, nothing removed
RECORD all entries verify (sha256 + size)
METADATA Version: 0.3.17, AGPL-3.0-or-later WITH Commons-Clause, Requires-Python: >=3.11, pyyaml>=6
Installed-wheel behaviour 21 authz names; roles_hash set-semantics reproduces; envelope round-trip preserves canonical form; role names never appear in the envelope (roles_hash only); validator reports allow_without_grant_or_elevation, policy_reason_unclassified, envelope_tenant_unset, tenant_mismatch

Two packaging gaps, both pre-existing (0.3.16 builds the same way), and both worse for this release than for previous ones. [tool.setuptools.packages.find] include = ["runtime_contracts*"] means:

  1. Neither artifact ships adapters/, golden/, docs/ or scripts/. The qualification this release is about cannot be re-run from a pin — it needs a clone.
  2. The sdist ships tests/ but not golden/, not docs/, not scripts/, not tests/*.json (4 tracked vector files) and not tests/authz_contract/ at all. Installing the sdist and running its own suite gives 24 collection errors, starting FileNotFoundError: …/tests/golden_seal_vectors.json. A shipped artifact whose bundled test suite cannot be collected is worse than one that ships no tests.

I did not change packaging in the release commit. Both want their own decision.

Verified vs unverified

Verified on this branch (Python 3.12.16, pytest 9.2.0, duckdb 2.0.0, full-history clone, no sibling checkouts): 1825 passed, 83 skipped, 0 failed; scripts/docs_check.py 0 problems; both version strings agree; version-tag discipline tests pass; the authz/v1 contract itself passes 39 tests (tests/authz_contract, 83 skipped).

Not verified, and said so where the claim lives:

  • python scripts/authz_matrix.py --check exits 1 here — 14 DEVIATION: expected PASS/FAIL/UNSUPPORTED, observed BLOCKED rows, because agentic-os / agentic-os-enterprise / redevops-rag checkouts are absent. That is correct fail-closed behaviour, but it means the PR authz/v1: production-profile qualification, exact-capability issuance, provenance bound to measured code (#626) #41 evidence line "--check → exit 0, no verdict drift" is environment-dependent, and nothing in CI runs the script: .github/workflows/tests.yml runs python -m pytest -q and nothing else, and no test shells out to it. The pinned-expectation guard fires only when a human with all three checkouts runs it.
  • PostgreSQL / pgvector legs: unverified. The probe never opens a Postgres connection; every retrieval figure, including the mutation results, is the DuckDB path.
  • Kernel provenance: the commit in the qualification table (c453cd16…) returns 422 from the commits API, and the enterprise repo is private — those rows are not independently re-verifiable by a third party.
  • Deployments: these are library seams in a test process. Nothing here describes a running stack.

Before the tag

  1. Merge, then tag the merge commit — annotated, v0.3.17, message runtime-contracts 0.3.17: authz/v1 … — consistent with v0.3.14–v0.3.16 and with test_release_discipline.test_every_tag_names_the_version_its_commit_declares, which reads pyproject.toml at the tag.
  2. Record the wheel sha256 at release time with SOURCE_DATE_EPOCH pinned, or don't publish an artifact hash at all: the wheel reproduces under a pinned epoch, the sdist does not reproduce byte-for-byte on this toolchain.
  3. No downstream pin is changed by this PR, and none should ride along with the tag.

Not done here, deliberately: no merge, no tag, no agentic-os pin change, no packaging change, and the AgenticOS 0.6.0-rc2 preparation branch and its signing work were not touched.

Alex Mats and others added 2 commits November 10, 2026 10:53
…g from

authz/v1 arrived in #41 and #42, but README still enumerated the contract surfaces only
through qa/v1, and STATUS.md's shipped-and-tested table stopped at the qa/v1 clarifications
with a whole-suite row quoting 1785 passed / 1 skipped from 2026-10-30. A release whose
headline content is absent from the three inventory docs is a release a consumer cannot
discover.

The qualification row states its own limits where the claim is made rather than leaving them
to a footnote: kernel and enterprise cells are BLOCKED without sibling checkouts, and every
retrieval figure is the DuckDB path, so the PostgreSQL / pgvector legs are unverified.
Docs only - no behaviour, no hash, no version change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The authz/v1 authorization contract: one decision envelope both authorization planes emit, a
qualification vocabulary that can say UNSUPPORTED without pretending to be a pass, and seven
cross-edition invariants run through each implementation's own enforcement seams - plus the
#627 retrieval lane, now measured as a property and proved by mutation, with its tenants-only
ACL defect recorded rather than patched.

Additive and stated as such: runtime_contracts.__all__ is byte-identical to v0.3.16, no golden
file, canonicalization rule or schema_version changes, and runtime_contracts/protocol/ is
unchanged since v0.3.16, so no credential decision moves in this release. Version bump, a
v0.3.17 CHANGELOG section, and the docs that name the tag.

Suite: 1825 passed / 83 skipped at 9187627 (Python 3.12.16, pytest 9.2.0, duckdb 2.0.0,
full-history clone, no sibling checkouts). docs_check: 0 problems. Tag not cut: merge first.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@arybach
arybach marked this pull request as ready for review November 10, 2026 16:03
@arybach
arybach merged commit f465e50 into main Nov 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant