Repository navigation
Release 0.3.17: the authz/v1 authorization contract - #43
Merged
Merged
Conversation
…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
marked this pull request as ready for review
November 10, 2026 16:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
Release 0.3.17 of
runtime-contracts, cut frommainat91876276689927398fb00546699d3c69bed2f4b9(the merge of #41 and #42). Its content is theauthz/v1authorization contract and the #627 retrieval-lane qualification.Two commits: one documents
authz/v1in 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/v1is this release's headline content and it appeared in none of the three inventory docs. README enumerated contract surfaces throughqa/v1only;STATUS.md's shipped-and-tested table stopped at theqa/v1clarifications with a whole-suite row quoting1785 passed / 1 skippedfrom 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:
runtime_contracts.__all__changed?diffof the__all__block betweenv0.3.16and9187627requires-pythonchange?pyproject.tomluntouched by #41/#42git diff v0.3.16..9187627 -- pyproject.tomlis empty;authz/imports stdlib only__all__sschema_version?git diff --stat v0.3.16..9187627 -- golden/is emptygit diff v0.3.16..9187627 -- runtime_contracts/protocol/is emptycontent_hash({"a":1})=rcv1:015abd7f5cc57a2dd94…under 0.3.14, 0.3.16 and the 0.3.17 wheelOne discoverability asymmetry worth deciding on, not just noting.
qa/v1is reachable as an attribute afterimport runtime_contractsbecause__init__.pydoesfrom . import qa.authz/v1has no such line: after a plainimport runtime_contracts,hasattr(runtime_contracts, "authz")isFalse, andruntime_contracts.authzraisesAttributeErroruntil something imports the submodule. It is reachable asimport runtime_contracts.authz(verified from the installed wheel). I left this alone deliberately — addingfrom . import authzis an API change and does not belong in a release commit. If it should matchqa, it wants its own PR.Downstream compatibility — read before pinning anything
agentic-ospinsruntime-contracts @ git+…@v0.3.14(pyproject.toml:14, and its venv hasruntime_contracts-0.3.14.dist-info). The known enterprise credential-brokerTENANT_MISMATCHfailures are not caused by this release. Measured, not asserted — the same eight authority shapes through both versions (runtime_contracts.protocol.secrets.authorize_request):TENANT_MISMATCHTENANT_MISMATCHTENANT_MISMATCHsecret_refnamespace platform-wide, not the tenantTENANT_MISMATCHauthority_context_idnames neither id nor chainAUTHORITY_MISMATCHAUTHORITY_EXPIREDAUTHORITY_EXPIRED7 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:protocol/is byte-identical.agentic-os(and thepermissions-2026-11checkout) stay atv0.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 (
build1.6.1, setuptools, Python 3.12.16) — never in the repo used for development.SOURCE_DATE_EPOCHf5450ab3410d732a…SOURCE_DATE_EPOCH4d85c4b4…,9281200b…) — reproducibility requires the epoch pinnedSOURCE_DATE_EPOCHPKG-INFO, egg-info, directory entries) despite the epoch being setauthzmodules — nothing added, nothing removedRECORDMETADATAVersion: 0.3.17, AGPL-3.0-or-later WITH Commons-Clause,Requires-Python: >=3.11,pyyaml>=6roles_hashset-semantics reproduces; envelope round-trip preserves canonical form; role names never appear in the envelope (roles_hashonly); validator reportsallow_without_grant_or_elevation,policy_reason_unclassified,envelope_tenant_unset,tenant_mismatchTwo 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:adapters/,golden/,docs/orscripts/. The qualification this release is about cannot be re-run from a pin — it needs a clone.tests/but notgolden/, notdocs/, notscripts/, nottests/*.json(4 tracked vector files) and nottests/authz_contract/at all. Installing the sdist and running its own suite gives 24 collection errors, startingFileNotFoundError: …/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.py0 problems; both version strings agree; version-tag discipline tests pass; theauthz/v1contract itself passes 39 tests (tests/authz_contract, 83 skipped).Not verified, and said so where the claim lives:
python scripts/authz_matrix.py --checkexits 1 here — 14DEVIATION: expected PASS/FAIL/UNSUPPORTED, observed BLOCKEDrows, becauseagentic-os/agentic-os-enterprise/redevops-ragcheckouts 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.ymlrunspython -m pytest -qand nothing else, and no test shells out to it. The pinned-expectation guard fires only when a human with all three checkouts runs it.c453cd16…) returns 422 from the commits API, and the enterprise repo is private — those rows are not independently re-verifiable by a third party.Before the tag
v0.3.17, messageruntime-contracts 0.3.17: authz/v1 …— consistent withv0.3.14–v0.3.16and withtest_release_discipline.test_every_tag_names_the_version_its_commit_declares, which readspyproject.tomlat the tag.SOURCE_DATE_EPOCHpinned, 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.Not done here, deliberately: no merge, no tag, no
agentic-ospin change, no packaging change, and the AgenticOS 0.6.0-rc2 preparation branch and its signing work were not touched.