Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9561984
fix(identity): admit explicit browser grants across resources
jeremi Nov 12, 2026
b59f470
feat(identity): isolate generated browser SSO flows
jeremi Nov 12, 2026
b6d6b5c
fix(identity): honor declared browser user claims
jeremi Nov 12, 2026
be5a706
fix(identity): reserve native ThunderID user fields
jeremi Nov 12, 2026
4466756
feat: add Python service connections and local grants
jeremi Nov 12, 2026
1ca793f
docs(breg): record local Python grant boundaries
jeremi Nov 12, 2026
08b8a4a
fix: close Python service admission and session gaps
jeremi Nov 12, 2026
47e2d2e
test: keep synthetic Python fixtures clear of secret scan
jeremi Nov 12, 2026
2d35855
fix: complete Python connection catalog and bounded recovery
jeremi Nov 12, 2026
2509cdc
test(platform): keep OIDC policy fixture in sync
jeremi Nov 12, 2026
35e42ca
fix(platform): align picker formats and native helper dependencies
jeremi Nov 12, 2026
8f4cb3f
test(coordinator): prove installed Python job recovery
jeremi Nov 12, 2026
5fefb47
chore(platform): include native helper license copies
jeremi Nov 12, 2026
8ba01d1
fix(platform): align picker read-back validation with producer authority
jeremi Nov 12, 2026
3ec9c43
fix(platform): bind Python checker reports to their source
jeremi Nov 12, 2026
8e8990c
fix(platform): require literal Python format headers
jeremi Nov 12, 2026
61475c9
fix(platform): retain Python AST import in merged checks
jeremi Nov 13, 2026
baa0727
fix(platform): refresh picker identifiers after schema bounds
jeremi Nov 13, 2026
0c5503a
ci: retain Linux Python wheel for runtime acceptance
jeremi Nov 13, 2026
d86e9bc
test(platform): acknowledge JSON configuration formats
jeremi Nov 13, 2026
6debf41
docs: include Python grants command in CLI catalog
jeremi Nov 13, 2026
2f7d740
fix(coordinator): bind external job receipts to verified callers
jeremi Nov 13, 2026
7c2491d
feat(platform): add FastAPI machine service and lifecycle guidance
jeremi Nov 13, 2026
1f11790
fix(platform): document machine service admission authority
jeremi Nov 13, 2026
0196b18
test(coordinator): run external job acceptance in CI
jeremi Nov 13, 2026
575bda3
test(release): qualify Python wheels without publishing
jeremi Nov 13, 2026
bb5550a
test(platform): exercise machine admission in FastAPI
jeremi Nov 13, 2026
acf2c9f
test(coordinator): prove durable Python job recovery
jeremi Nov 13, 2026
cc46f89
test(release): qualify macOS Python wheel on pull requests
jeremi Nov 13, 2026
3693ad8
test(coordinator): select durable Python recovery in CI
jeremi Nov 13, 2026
dd339e4
test(platform): pin machine service workload authority
jeremi Nov 13, 2026
6ead81f
test(ci): route Coordinator wheel acceptance edits
jeremi Nov 13, 2026
2f85ea6
test(platform): pin machine recovery to original authority and request
jeremi Nov 13, 2026
4b1d290
test(platform): match Messaging receipt expiry contract
jeremi Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/scripts/ci_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"registry-platform-metrics",
"registry-platform-objectstore",
"registry-platform-oidc",
"registry-platform-oidc-py",
"registry-platform-ratelimit",
"registry-platform-resilience",
"registry-platform-script",
Expand All @@ -48,6 +49,7 @@
"registry-platform-text",
"registry-platform-x509",
"registry-platform-yaml",
"registry-platform-yaml-py",
),
"mcp": (
"registry-mcp",
Expand Down Expand Up @@ -522,6 +524,7 @@
| SCHEDULING_BINDING_PACKAGES
| COORDINATOR_BINDING_PACKAGES
| frozenset({"registry-render-client-node", "registry-render-client-py"})
| frozenset({"registry-platform-oidc-py", "registry-platform-yaml-py"})
)

# The breg-contracts matrix lanes. Review runs the first two; the merge
Expand Down Expand Up @@ -559,7 +562,7 @@
# package, so a change under it already selects the complete matrix.
ASSEMBLED_PYTHON_CLIENT_PACKAGES = frozenset(
package for package in NATIVE_BINDING_PACKAGES if package.endswith("-client-py")
)
) | frozenset({"registry-platform-oidc-py", "registry-platform-yaml-py"})

# The gate builds and runs the registry, the tool that applies its package, and
# issuer tooling, because the `bregctl dev` session the tutorial starts issues
Expand Down Expand Up @@ -1512,8 +1515,19 @@ def classify(
complete
or bool(affected & NATIVE_BINDING_PACKAGES)
or unified_client_changed
or "release/scripts/smoke-registry-client-service.py" in changed_paths
or "release/scripts/smoke-registry-client-extras.py" in changed_paths
# This target's installed-wheel cases are ignored by the ordinary
# Coordinator PostgreSQL job and run in client-bindings instead.
or (
"crates/registry-coordinator/tests/external_wait_postgres.rs"
in changed_paths
)
or any(path.startswith((
"products/platform/examples/python-composition/",
"products/platform/examples/python-machine-service/",
"products/platform/examples/python-portal/",
"products/coordinator/examples/external-job/",
"products/coordinator/examples/reviewed-notice/",
)) for path in changed_paths)
)
Expand Down
81 changes: 80 additions & 1 deletion .github/scripts/test_ci_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,25 +1410,100 @@ def test_coordinator_postgres_proof_has_its_own_database_job(self) -> None:
self.assertIn("COORDINATOR_TEST_DATABASE_URL", proof["env"])
self.assertIn("COORDINATOR_MESSAGING_TEST_DATABASE_URL", proof["env"])
self.assertIn("COORDINATOR_SCHEDULING_TEST_DATABASE_URL", proof["env"])
self.assertIn("EXTERNAL_JOB_TEST_DATABASE_URL", proof["env"])
database_urls = (
proof["env"]["COORDINATOR_TEST_DATABASE_URL"],
proof["env"]["COORDINATOR_MESSAGING_TEST_DATABASE_URL"],
proof["env"]["COORDINATOR_SCHEDULING_TEST_DATABASE_URL"],
proof["env"]["EXTERNAL_JOB_TEST_DATABASE_URL"],
)
self.assertEqual(len(set(database_urls)), 3)
self.assertEqual(len(set(database_urls)), 4)
database_preparation = "\n".join(
step.get("run", "") for step in job["steps"]
)
self.assertTrue(database_urls[1].endswith("/coordinator_messaging"))
self.assertIn("createdb coordinator_messaging", database_preparation)
self.assertTrue(database_urls[2].endswith("/coordinator_scheduling"))
self.assertIn("createdb coordinator_scheduling", database_preparation)
self.assertTrue(database_urls[3].endswith("/coordinator_external_job"))
self.assertIn("createdb coordinator_external_job", database_preparation)
script = Path("products/coordinator/scripts/test-postgres.sh").read_text()
self.assertRegex(script, r"cargo test --locked -p registry-coordinator[^\n]*--lib")
self.assertIn("--test messaging_integration", script)
self.assertIn("--test process_restart", script)
self.assertIn("--test deployment_postgres", script)
self.assertIn("cargo build --locked -p registry-messaging -p registry-messagingctl", script)
self.assertIn("external-job/tests/test_service.py", script)
self.assertIn("external-job/tests/test_postgres.py", script)
self.assertIn(
"uv run --project products/coordinator/examples/external-job", script
)

def test_external_job_routes_postgres_and_installed_wheel_acceptance(self) -> None:
outputs = classify(
self.workspace,
("products/coordinator/examples/external-job/service.py",),
)
self.assertTrue(outputs["coordinator"])
self.assertTrue(outputs["client_bindings"])
acceptance_test_outputs = classify(
self.workspace,
("crates/registry-coordinator/tests/external_wait_postgres.rs",),
)
self.assertTrue(acceptance_test_outputs["coordinator"])
self.assertTrue(acceptance_test_outputs["client_bindings"])
self.assertFalse(
classify(
self.workspace,
("products/coordinator/examples/delayed-follow-up/workflow.yaml",),
)["client_bindings"]
)

job = self.workflow_jobs["client-bindings"]
self.assertIn("postgres", job.get("services", {}))
acceptance = next(
step
for step in job["steps"]
if step.get("name") == "Test installed-wheel Coordinator external job"
)
self.assertIn("COORDINATOR_TEST_DATABASE_URL", acceptance["env"])
self.assertIn("EXTERNAL_JOB_TEST_DATABASE_URL", acceptance["env"])
self.assertNotEqual(
acceptance["env"]["COORDINATOR_TEST_DATABASE_URL"],
acceptance["env"]["EXTERNAL_JOB_TEST_DATABASE_URL"],
)
self.assertIn("test_acceptance_server.py", acceptance["run"])
self.assertEqual(
acceptance["run"].count(
'uv run --with "${REGISTRY_CLIENT_PY_WHEEL}"'
),
2,
)
installed_acceptance = Path(
"crates/registry-coordinator/tests/external_wait_postgres.rs"
).read_text(encoding="utf-8")
installed_tests = set(
re.findall(
r'#\[ignore = "[^"]*installed-wheel Python interpreter"\]\s*'
r"async fn (installed_python_[a-z0-9_]+)\(",
installed_acceptance,
)
)
self.assertEqual(
installed_tests,
{
"installed_python_encoding_failure_keeps_the_committed_job_recoverable",
"installed_python_job_recovers_the_original_command_after_commit",
"installed_python_job_survives_process_death_after_commit_and_restart",
},
)
normalized_acceptance = " ".join(
acceptance["run"].replace("\\\n", " ").split()
)
self.assertIn(
"--test external_wait_postgres -- --include-ignored --nocapture",
normalized_acceptance,
)

def test_shared_review_protocol_selects_casework_and_breg_consumers(self) -> None:
outputs = classify(
Expand Down Expand Up @@ -2865,6 +2940,10 @@ def test_python_composition_and_release_client_example_run_native_clients(self)
for path in (
"products/platform/examples/python-composition/service.py",
"products/platform/examples/python-composition/uv.lock",
"products/platform/examples/python-machine-service/service.py",
"products/platform/examples/python-portal/portal_example.py",
"release/scripts/smoke-registry-client-service.py",
"release/scripts/smoke-registry-client-extras.py",
"products/coordinator/examples/reviewed-notice/released_client.py",
"products/coordinator/examples/reviewed-notice/tests/test_released_client.py",
):
Expand Down
125 changes: 123 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1463,8 +1463,14 @@ jobs:
cache-targets: false
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: "0.11.16"

# The suite composes with real Messaging and Scheduling runtimes, which
# each need a database of their own beside the Coordinator's.
# each need a database of their own beside the Coordinator's. The
# application-owned external job keeps its receipt in a fourth database.
- name: Prepare the product test databases
env:
PGHOST: 127.0.0.1
Expand All @@ -1474,11 +1480,13 @@ jobs:
run: |
createdb coordinator_messaging
createdb coordinator_scheduling
createdb coordinator_external_job
- name: Verify coordinator restart, fencing, and native product recovery
env:
COORDINATOR_TEST_DATABASE_URL: postgresql://coordinator:coordinator_test@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/coordinator
COORDINATOR_MESSAGING_TEST_DATABASE_URL: postgresql://coordinator:coordinator_test@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/coordinator_messaging
COORDINATOR_SCHEDULING_TEST_DATABASE_URL: postgresql://coordinator:coordinator_test@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/coordinator_scheduling
EXTERNAL_JOB_TEST_DATABASE_URL: postgresql://coordinator:coordinator_test@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/coordinator_external_job
run: products/coordinator/scripts/test-postgres.sh

messaging-smtp:
Expand Down Expand Up @@ -2695,7 +2703,8 @@ jobs:
cargo build --locked \
-p registry-casework -p registry-caseworkctl \
-p registry-breg --features registry-breg/runtime \
-p registry-bregctl -p registry-rstack --bins
-p registry-bregctl -p registry-messaging -p registry-messagingctl \
-p registry-rstack --bins

- name: Install native PostgreSQL 18 and PostGIS for project development
# The Ubuntu runner's PostgreSQL 16 is below BReg's minimum.
Expand Down Expand Up @@ -3274,6 +3283,20 @@ jobs:
if: needs.changes.outputs.client_bindings == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 45
services:
postgres:
image: docker.io/library/postgres:17.11@sha256:67f41722b7a8cbdb868a44a4995c846eddfdc2973bccb291ce937dce88ad5675
env:
POSTGRES_DB: client_bindings
POSTGRES_USER: client_bindings
POSTGRES_PASSWORD: client_bindings_test
options: >-
--health-cmd "pg_isready -U client_bindings -d client_bindings"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432/tcp
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
Expand Down Expand Up @@ -3341,12 +3364,29 @@ jobs:
cmp ../../LICENSE LICENSE
)
done
for client in registry-platform-oidc-py registry-platform-yaml-py; do
cargo build --locked -p "${client}" --lib --features "${client}/extension-module"
(
cd "crates/${client}"
python3 -m unittest discover -s tests/python -v
cmp ../../LICENSE LICENSE
)
done

- name: Install uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: "0.11.16"

- name: Test Python connection facade
working-directory: crates/registry-stack-client-py
shell: bash
run: |
set -euo pipefail
uv run --locked --all-extras --with httpx==0.28.1 \
python -W error::ResourceWarning -m unittest discover \
-s tests -p 'test_*.py' -v

- name: Test direct Python composition with the exact checkout client
working-directory: products/platform/examples/python-composition
shell: bash
Expand Down Expand Up @@ -3376,11 +3416,92 @@ jobs:
fi
uv run --locked --with "${wheels[0]}" \
python -m unittest discover -s tests -v
printf 'REGISTRY_CLIENT_PY_WHEEL=%s\n' "${wheels[0]}" >>"${GITHUB_ENV}"

- name: Exercise installed Python service client on Linux
working-directory: products/platform/examples/python-portal
shell: bash
run: |
set -euo pipefail
uv run --locked --with "${REGISTRY_CLIENT_PY_WHEEL}" \
python -I "${GITHUB_WORKSPACE}/release/scripts/smoke-registry-client-service.py"

- name: Test Python machine service
working-directory: products/platform/examples/python-machine-service
shell: bash
run: |
set -euo pipefail
uv run --locked python -W error::ResourceWarning \
-m unittest discover -s tests -p 'test_*.py' -v

- name: Check isolated Python service extras
shell: bash
run: |
set -euo pipefail
for mode in core flask fastapi human-flask human-fastapi; do
environment="${RUNNER_TEMP}/client-${mode}"
uv venv "${environment}"
case "${mode}" in
core)
uv pip install --python "${environment}/bin/python" \
--no-deps "${REGISTRY_CLIENT_PY_WHEEL}"
;;
flask)
uv pip install --python "${environment}/bin/python" \
"${REGISTRY_CLIENT_PY_WHEEL}[flask]"
;;
fastapi)
uv pip install --python "${environment}/bin/python" \
"${REGISTRY_CLIENT_PY_WHEEL}[fastapi]" httpx==0.28.1
;;
human-flask)
uv pip install --python "${environment}/bin/python" \
"${REGISTRY_CLIENT_PY_WHEEL}[human,flask,postgres]"
;;
human-fastapi)
uv pip install --python "${environment}/bin/python" \
"${REGISTRY_CLIENT_PY_WHEEL}[human,fastapi,postgres]"
;;
esac
"${environment}/bin/python" -I \
release/scripts/smoke-registry-client-extras.py "${mode}"
done

- name: Test released-client Coordinator example
working-directory: products/coordinator/examples/reviewed-notice
run: uv run --locked python -m unittest discover -s tests -v

- name: Test installed-wheel Coordinator external job
working-directory: products/coordinator/examples/external-job
shell: bash
env:
COORDINATOR_TEST_DATABASE_URL: postgresql://client_bindings:client_bindings_test@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/client_bindings
EXTERNAL_JOB_TEST_DATABASE_URL: postgresql://client_bindings:client_bindings_test@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/client_bindings_external_job
EXTERNAL_JOB_PYTHON: python
PGHOST: 127.0.0.1
PGPORT: ${{ job.services.postgres.ports['5432'] }}
PGUSER: client_bindings
PGPASSWORD: client_bindings_test
run: |
set -euo pipefail
createdb client_bindings_external_job
uv run --with "${REGISTRY_CLIENT_PY_WHEEL}" \
python -W error::ResourceWarning -m unittest \
tests/test_acceptance_server.py -v
uv run --with "${REGISTRY_CLIENT_PY_WHEEL}" \
cargo test --locked -p registry-coordinator \
--features postgres-test --test external_wait_postgres \
-- --include-ignored --nocapture

- name: Retain Linux Python client candidate for runtime acceptance
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: python-client-linux-x64-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ env.REGISTRY_CLIENT_PY_WHEEL }}
if-no-files-found: error
retention-days: 2
compression-level: 0

release-linux-node-clients:
name: Release Linux native clients (${{ matrix.asset }})
needs: changes
Expand Down
Loading
Loading