phlo-api 0.16.2__tar.gz → 0.17.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. {phlo_api-0.16.2 → phlo_api-0.17.0}/PKG-INFO +4 -4
  2. {phlo_api-0.16.2 → phlo_api-0.17.0}/pyproject.toml +5 -5
  3. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/Dockerfile +20 -8
  4. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/security_manifest.py +11 -0
  5. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/service.yaml +1 -1
  6. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api.egg-info/PKG-INFO +4 -4
  7. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api.egg-info/requires.txt +2 -2
  8. {phlo_api-0.16.2 → phlo_api-0.17.0}/README.md +0 -0
  9. {phlo_api-0.16.2 → phlo_api-0.17.0}/setup.cfg +0 -0
  10. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/__init__.py +0 -0
  11. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/api/__init__.py +0 -0
  12. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/api/authentication.py +0 -0
  13. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/api/authoring.py +0 -0
  14. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/api/authorization.py +0 -0
  15. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/api/continuity.py +0 -0
  16. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/api/maintenance.py +0 -0
  17. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/api/observability.py +0 -0
  18. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/api/operation_controls.py +0 -0
  19. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/entrypoint.sh +0 -0
  20. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/main.py +0 -0
  21. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/__init__.py +0 -0
  22. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/contributing.py +0 -0
  23. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/dagster.py +0 -0
  24. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/extension_settings.py +0 -0
  25. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/extensions.py +0 -0
  26. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/iceberg.py +0 -0
  27. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/lineage.py +0 -0
  28. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/loki.py +0 -0
  29. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/nessie.py +0 -0
  30. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory.py +0 -0
  31. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_actions.py +0 -0
  32. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_cache.py +0 -0
  33. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_capabilities.py +0 -0
  34. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_durable_state.py +0 -0
  35. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_metadata.py +0 -0
  36. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_models.py +0 -0
  37. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_operation_journal.py +0 -0
  38. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_runs.py +0 -0
  39. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_saved_queries.py +0 -0
  40. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_search.py +0 -0
  41. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_services.py +0 -0
  42. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/observatory_workflow_wizard.py +0 -0
  43. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/orchestrator_operations.py +0 -0
  44. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/package_install.py +0 -0
  45. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/quality.py +0 -0
  46. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/run_action_contract.py +0 -0
  47. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/run_report.py +0 -0
  48. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/search.py +0 -0
  49. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/settings.py +0 -0
  50. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/trino.py +0 -0
  51. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/observatory_api/trino_sql.py +0 -0
  52. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/pagination.py +0 -0
  53. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/plugin.py +0 -0
  54. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/regulated_surface_adapter.py +0 -0
  55. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api/run_evidence.py +0 -0
  56. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api.egg-info/SOURCES.txt +0 -0
  57. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api.egg-info/dependency_links.txt +0 -0
  58. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api.egg-info/entry_points.txt +0 -0
  59. {phlo_api-0.16.2 → phlo_api-0.17.0}/src/phlo_api.egg-info/top_level.txt +0 -0
  60. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_api_backend_endpoints.py +0 -0
  61. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_api_import_boundaries.py +0 -0
  62. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_auth_helper_meta.py +0 -0
  63. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_authentication_api.py +0 -0
  64. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_authoring_api.py +0 -0
  65. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_authorization_api.py +0 -0
  66. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_continuity_api.py +0 -0
  67. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_cors.py +0 -0
  68. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_dataset_cutover_parity.py +0 -0
  69. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_dataset_overlay_retirement.py +0 -0
  70. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_integration_api.py +0 -0
  71. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_lakehouse_compatibility.py +0 -0
  72. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_lineage_api.py +0 -0
  73. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_loki_api.py +0 -0
  74. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_maintenance_api.py +0 -0
  75. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observability_api.py +0 -0
  76. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_actions.py +0 -0
  77. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_api.py +0 -0
  78. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_capabilities.py +0 -0
  79. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_legacy_api.py +0 -0
  80. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_operation_journal.py +0 -0
  81. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_package_install.py +0 -0
  82. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_read_models.py +0 -0
  83. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_run_action_contract.py +0 -0
  84. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_surfaces.py +0 -0
  85. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_observatory_workflow_wizard.py +0 -0
  86. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_operation_controls.py +0 -0
  87. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_pagination.py +0 -0
  88. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_security_manifest.py +0 -0
  89. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_service_correlation_runtime.py +0 -0
  90. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_service_url_resolution.py +0 -0
  91. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_trino_defaults.py +0 -0
  92. {phlo_api-0.16.2 → phlo_api-0.17.0}/tests/test_trino_sql.py +0 -0
@@ -1,15 +1,15 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: phlo-api
3
- Version: 0.16.2
3
+ Version: 0.17.0
4
4
  Summary: Phlo API - Backend service exposing Phlo internals to Observatory
5
5
  Author-email: Phlo Team <team@phlo.dev>
6
6
  License: MIT
7
- Requires-Python: >=3.11
7
+ Requires-Python: >=3.12
8
8
  Description-Content-Type: text/plain
9
- Requires-Dist: phlo<0.17,>=0.16.2
9
+ Requires-Dist: phlo<0.18,>=0.17.0
10
10
  Requires-Dist: fastapi>=0.127.0
11
11
  Requires-Dist: httpx>=0.28.1
12
- Requires-Dist: anyio>=4.11.0
12
+ Requires-Dist: anyio>=4.14.2
13
13
  Requires-Dist: psycopg2-binary>=2.9.11
14
14
  Requires-Dist: pydantic>=2.0
15
15
  Requires-Dist: pyyaml>=6.0.1
@@ -7,10 +7,10 @@ requires = [
7
7
 
8
8
  [project]
9
9
  dependencies = [
10
- "phlo>=0.16.2,<0.17",
10
+ "phlo>=0.17.0,<0.18",
11
11
  "fastapi>=0.127.0",
12
12
  "httpx>=0.28.1",
13
- "anyio>=4.11.0",
13
+ "anyio>=4.14.2",
14
14
  "psycopg2-binary>=2.9.11",
15
15
  "pydantic>=2.0",
16
16
  "pyyaml>=6.0.1",
@@ -18,8 +18,8 @@ dependencies = [
18
18
  ]
19
19
  description = "Phlo API - Backend service exposing Phlo internals to Observatory"
20
20
  name = "phlo-api"
21
- requires-python = ">=3.11"
22
- version = "0.16.2"
21
+ requires-python = ">=3.12"
22
+ version = "0.17.0"
23
23
 
24
24
  [[project.authors]]
25
25
  email = "team@phlo.dev"
@@ -44,7 +44,7 @@ text = "Phlo API backend for Observatory."
44
44
 
45
45
  [tool.ruff]
46
46
  line-length = 100
47
- target-version = "py311"
47
+ target-version = "py312"
48
48
 
49
49
  [tool.setuptools]
50
50
  include-package-data = true
@@ -1,4 +1,4 @@
1
- FROM python:3.11-alpine AS phlo-build-context
1
+ FROM python:3.12-alpine AS phlo-build-context
2
2
 
3
3
  WORKDIR /opt/phlo-build-context
4
4
 
@@ -8,7 +8,7 @@ RUN set -eux; \
8
8
  install -m 0755 "$entrypoint" /opt/phlo-build-context/phlo-api-entrypoint.sh; \
9
9
  mkdir -p /opt/phlo-build-context/wheelhouse
10
10
 
11
- FROM python:3.11-alpine AS runtime
11
+ FROM python:3.12-alpine AS runtime
12
12
 
13
13
  WORKDIR /app
14
14
 
@@ -16,11 +16,16 @@ ARG PHLO_VERSION=
16
16
  ARG PHLO_API_VERSION=
17
17
  ARG PHLO_WHEELHOUSE=
18
18
 
19
+ # Alpine packages stay unpinned: the branch archive drops superseded versions,
20
+ # so an exact version becomes a hard build failure for consumers running
21
+ # `phlo services start --build` weeks after the phlo release. The floating base
22
+ # tag and `apk upgrade` below already resolve the current branch versions.
23
+ # hadolint ignore=DL3018
19
24
  RUN apk upgrade --no-cache \
20
- && apk add --no-cache ca-certificates=20260611-r0 \
25
+ && apk add --no-cache ca-certificates \
21
26
  && apk add --no-cache --virtual .build-deps \
22
- gcc=15.2.0-r5 \
23
- musl-dev=1.2.6-r2 \
27
+ gcc \
28
+ musl-dev \
24
29
  && pip install --no-cache-dir \
25
30
  "setuptools==83.0.0" \
26
31
  "wheel==0.47.0" \
@@ -28,6 +33,8 @@ RUN apk upgrade --no-cache \
28
33
 
29
34
  COPY --from=phlo-build-context /opt/phlo-build-context/wheelhouse /opt/phlo-wheelhouse
30
35
 
36
+ # Phlo currently pins the unpublished observe packages by URL. uv requires
37
+ # transitive URL dependencies to be repeated as direct installation inputs.
31
38
  RUN set -eux; \
32
39
  PHLO_REQUIREMENT="phlo"; \
33
40
  if [ -n "$PHLO_VERSION" ]; then PHLO_REQUIREMENT="phlo==$PHLO_VERSION"; fi; \
@@ -36,12 +43,17 @@ RUN set -eux; \
36
43
  if [ -n "$PHLO_WHEELHOUSE" ]; then \
37
44
  test -d /opt/phlo-wheelhouse; \
38
45
  uv pip install --system --no-index --no-deps --reinstall --find-links /opt/phlo-wheelhouse "$PHLO_REQUIREMENT" "$PHLO_API_REQUIREMENT"; \
39
- uv pip install --system --prerelease explicit --find-links /opt/phlo-wheelhouse "$PHLO_REQUIREMENT" "$PHLO_API_REQUIREMENT"; \
46
+ python -c 'import importlib.metadata as md; print("\n".join(r.split(";", 1)[0].strip() for r in (md.metadata("phlo").get_all("Requires-Dist") or []) if " @ " in r))' > /tmp/phlo-url-requirements.txt; \
47
+ uv pip install --system --prerelease explicit --find-links /opt/phlo-wheelhouse --requirement /tmp/phlo-url-requirements.txt "$PHLO_REQUIREMENT" "$PHLO_API_REQUIREMENT"; \
40
48
  uv pip install --system --no-index --no-deps --reinstall --find-links /opt/phlo-wheelhouse "$PHLO_REQUIREMENT" "$PHLO_API_REQUIREMENT"; \
41
49
  elif [ -n "$PHLO_VERSION" ]; then \
42
- uv pip install --system --prerelease explicit "$PHLO_REQUIREMENT" "$PHLO_API_REQUIREMENT"; \
50
+ uv pip install --system --no-deps --prerelease explicit "$PHLO_REQUIREMENT"; \
51
+ python -c 'import importlib.metadata as md; print("\n".join(r.split(";", 1)[0].strip() for r in (md.metadata("phlo").get_all("Requires-Dist") or []) if " @ " in r))' > /tmp/phlo-url-requirements.txt; \
52
+ uv pip install --system --prerelease explicit --requirement /tmp/phlo-url-requirements.txt "$PHLO_REQUIREMENT" "$PHLO_API_REQUIREMENT"; \
43
53
  else \
44
- uv pip install --system phlo "$PHLO_API_REQUIREMENT"; \
54
+ uv pip install --system --no-deps phlo; \
55
+ python -c 'import importlib.metadata as md; print("\n".join(r.split(";", 1)[0].strip() for r in (md.metadata("phlo").get_all("Requires-Dist") or []) if " @ " in r))' > /tmp/phlo-url-requirements.txt; \
56
+ uv pip install --system --requirement /tmp/phlo-url-requirements.txt phlo "$PHLO_API_REQUIREMENT"; \
45
57
  fi && apk del .build-deps
46
58
 
47
59
  # Do not retain uv's downloaded archives in the runtime image; they are not needed to run Phlo.
@@ -729,6 +729,16 @@ def _enforce_scoped_run_report_service_identity(
729
729
  )
730
730
 
731
731
 
732
+ _READ_ONLY_ACTION_SUFFIXES = (".read", ".query")
733
+
734
+
735
+ def _requires_durable_audit(action: str) -> bool:
736
+ """Return whether an action mutates state and so must persist audit
737
+ evidence to succeed — a permitted mutation without durable evidence is
738
+ itself a production failure (fail-closed, ADR 0047)."""
739
+ return not action.endswith(_READ_ONLY_ACTION_SUFFIXES)
740
+
741
+
732
742
  async def enforce_http_operation(
733
743
  request: Request,
734
744
  spec: OperationSpec,
@@ -777,6 +787,7 @@ async def enforce_http_operation(
777
787
  request_id=correlation_id,
778
788
  surface="phlo-api",
779
789
  correlation_id=correlation_id,
790
+ require_durable_audit=_requires_durable_audit(spec.action),
780
791
  )
781
792
  if result.variant == "error":
782
793
  raise HTTPException(
@@ -5,7 +5,7 @@ default: false
5
5
  profile: api
6
6
  phlo_dev: true
7
7
 
8
- image: ghcr.io/phlohouse/phlo-api:0.16.2
8
+ image: ghcr.io/phlohouse/phlo-api:0.17.0
9
9
  build:
10
10
  context: .
11
11
  dockerfile: phlo-api/Dockerfile
@@ -1,15 +1,15 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: phlo-api
3
- Version: 0.16.2
3
+ Version: 0.17.0
4
4
  Summary: Phlo API - Backend service exposing Phlo internals to Observatory
5
5
  Author-email: Phlo Team <team@phlo.dev>
6
6
  License: MIT
7
- Requires-Python: >=3.11
7
+ Requires-Python: >=3.12
8
8
  Description-Content-Type: text/plain
9
- Requires-Dist: phlo<0.17,>=0.16.2
9
+ Requires-Dist: phlo<0.18,>=0.17.0
10
10
  Requires-Dist: fastapi>=0.127.0
11
11
  Requires-Dist: httpx>=0.28.1
12
- Requires-Dist: anyio>=4.11.0
12
+ Requires-Dist: anyio>=4.14.2
13
13
  Requires-Dist: psycopg2-binary>=2.9.11
14
14
  Requires-Dist: pydantic>=2.0
15
15
  Requires-Dist: pyyaml>=6.0.1
@@ -1,7 +1,7 @@
1
- phlo<0.17,>=0.16.2
1
+ phlo<0.18,>=0.17.0
2
2
  fastapi>=0.127.0
3
3
  httpx>=0.28.1
4
- anyio>=4.11.0
4
+ anyio>=4.14.2
5
5
  psycopg2-binary>=2.9.11
6
6
  pydantic>=2.0
7
7
  pyyaml>=6.0.1
File without changes
File without changes
File without changes