chalk-remote-call-python 1.10.3__tar.gz → 1.10.5__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 (76) hide show
  1. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/PKG-INFO +45 -4
  2. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/README.md +42 -2
  3. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/Cargo.lock +83 -43
  4. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.auth.v1.rs +40 -0
  5. chalk_remote_call_python-1.10.5/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.runtime.v1.rs +506 -0
  6. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.runtime.v1.tonic.rs +562 -0
  7. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/descriptor.bin +0 -0
  8. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-server/Cargo.toml +12 -3
  9. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-server/src/async_service.rs +20 -3
  10. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-server/src/coalesce.rs +13 -13
  11. chalk_remote_call_python-1.10.5/chalk-remote-call-rs/chalk-remote-call-server/src/fnq_client.rs +203 -0
  12. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-server/src/lib.rs +16 -6
  13. chalk_remote_call_python-1.10.5/chalk-remote-call-rs/chalk-remote-call-server/src/metrics.rs +423 -0
  14. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-server/src/self_consumer.rs +377 -96
  15. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-server/src/server.rs +5 -5
  16. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-server/src/service.rs +6 -6
  17. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/rust-toolchain.toml +1 -1
  18. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/auth/v1/permissions_pb2.py +43 -33
  19. chalk_remote_call_python-1.10.5/chalk_remote_call/_gen/chalk/runtime/v1/fnq_consumer_pb2.py +53 -0
  20. chalk_remote_call_python-1.10.5/chalk_remote_call/_gen/chalk/runtime/v1/fnq_consumer_pb2_grpc.py +138 -0
  21. chalk_remote_call_python-1.10.5/chalk_remote_call/_gen/chalk/runtime/v1/remote_python_call_pb2.py +104 -0
  22. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/runtime/v1/remote_python_call_pb2_grpc.py +35 -0
  23. chalk_remote_call_python-1.10.5/chalk_remote_call/_gen/chalk/utils/v1/large_pb2.py +26 -0
  24. chalk_remote_call_python-1.10.5/chalk_remote_call/_gen/chalk/utils/v1/sensitive_pb2_grpc.py +4 -0
  25. chalk_remote_call_python-1.10.5/chalk_remote_call/_version.py +1 -0
  26. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/arrow_utils.py +6 -2
  27. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/errors.py +16 -0
  28. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/servicer.py +26 -49
  29. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/tracing.py +102 -20
  30. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call_python.egg-info/PKG-INFO +45 -4
  31. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call_python.egg-info/SOURCES.txt +5 -0
  32. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/pyproject.toml +2 -1
  33. chalk_remote_call_python-1.10.3/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.runtime.v1.rs +0 -242
  34. chalk_remote_call_python-1.10.3/chalk-remote-call-rs/chalk-remote-call-server/src/metrics.rs +0 -149
  35. chalk_remote_call_python-1.10.3/chalk_remote_call/_gen/chalk/runtime/v1/remote_python_call_pb2.py +0 -80
  36. chalk_remote_call_python-1.10.3/chalk_remote_call/_version.py +0 -1
  37. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/MANIFEST.in +0 -0
  38. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/Cargo.toml +0 -0
  39. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-proto/Cargo.toml +0 -0
  40. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.common.v1.rs +0 -0
  41. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.utils.v1.rs +0 -0
  42. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-proto/src/lib.rs +0 -0
  43. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk-remote-call-rs/chalk-remote-call-server/src/python_bridge.rs +0 -0
  44. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/__init__.py +0 -0
  45. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/__main__.py +0 -0
  46. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/__init__.py +0 -0
  47. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/__init__.py +0 -0
  48. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/auth/__init__.py +0 -0
  49. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/auth/v1/__init__.py +0 -0
  50. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/auth/v1/permissions_pb2_grpc.py +0 -0
  51. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/common/__init__.py +0 -0
  52. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/common/v1/__init__.py +0 -0
  53. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/common/v1/chalk_error_pb2.py +0 -0
  54. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/common/v1/chalk_error_pb2_grpc.py +0 -0
  55. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/runtime/__init__.py +0 -0
  56. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/runtime/v1/__init__.py +0 -0
  57. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/utils/__init__.py +0 -0
  58. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/utils/v1/__init__.py +0 -0
  59. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/utils/v1/encoding_pb2.py +0 -0
  60. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/utils/v1/encoding_pb2_grpc.py +0 -0
  61. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/utils/v1/field_change_pb2.py +0 -0
  62. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/utils/v1/field_change_pb2_grpc.py +0 -0
  63. /chalk_remote_call_python-1.10.3/chalk_remote_call/_gen/chalk/utils/v1/sensitive_pb2_grpc.py → /chalk_remote_call_python-1.10.5/chalk_remote_call/_gen/chalk/utils/v1/large_pb2_grpc.py +0 -0
  64. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_gen/chalk/utils/v1/sensitive_pb2.py +0 -0
  65. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/_native.pyi +0 -0
  66. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/cli.py +0 -0
  67. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/handler_loader.py +0 -0
  68. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/input_transform.py +0 -0
  69. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/logging.py +0 -0
  70. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call/server.py +0 -0
  71. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call_python.egg-info/dependency_links.txt +0 -0
  72. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call_python.egg-info/entry_points.txt +0 -0
  73. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call_python.egg-info/requires.txt +0 -0
  74. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/chalk_remote_call_python.egg-info/top_level.txt +0 -0
  75. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/setup.cfg +0 -0
  76. {chalk_remote_call_python-1.10.3 → chalk_remote_call_python-1.10.5}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chalk-remote-call-python
3
- Version: 1.10.3
3
+ Version: 1.10.5
4
4
  Summary: Chalk remote call Python runtime interface client
5
5
  Author: Chalk AI, Inc.
6
6
  Project-URL: Homepage, https://chalk.ai
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Programming Language :: Python :: 3.13
14
14
  Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Programming Language :: Python :: 3.15
15
16
  Classifier: Programming Language :: Python
16
17
  Classifier: Typing :: Typed
17
18
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -19,7 +20,7 @@ Classifier: Topic :: Scientific/Engineering :: Information Analysis
19
20
  Classifier: Topic :: Software Development :: Code Generators
20
21
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
21
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
- Requires-Python: <3.15,>=3.10
23
+ Requires-Python: <3.16,>=3.10
23
24
  Description-Content-Type: text/markdown
24
25
  Requires-Dist: pyarrow>=14.0.0
25
26
  Provides-Extra: dev
@@ -45,7 +46,7 @@ The server receives Arrow IPC record batches over a bidirectional gRPC stream, t
45
46
  ## Requirements
46
47
 
47
48
  - Python >= 3.10
48
- - Rust toolchain (for building the native extension)
49
+ - Rust 1.99.0 (for building the native extension)
49
50
  - `pyarrow >= 14.0.0`
50
51
 
51
52
  ## Usage
@@ -116,6 +117,12 @@ invalid environment configuration, and exceptions escaping startup or the server
116
117
  emit a single ERROR record with the full traceback and exit with status 1.
117
118
  Calls to `serve()` from Python retain the embedding application's logging configuration.
118
119
 
120
+ On Linux, server shutdown drains buffered function-call metrics before the runtime exits,
121
+ including when the server returns an error. Draining waits up to 10 seconds; a timeout or
122
+ publisher failure is logged as a warning.
123
+ Routine drain messages are logged at DEBUG; set `RUST_LOG=info,_native::metrics=debug`
124
+ to include them.
125
+
119
126
  Missing optional StatsD endpoints or a metrics-bus topic do not emit warnings.
120
127
  Failures initializing configured metrics sinks still warn. Routine customer
121
128
  StatsD configuration messages are emitted at DEBUG by the shared metrics library;
@@ -126,6 +133,8 @@ set `RUST_LOG=info,chalk_metrics::metrics::config=debug` to include them.
126
133
  | Variable | Description |
127
134
  |----------|-------------|
128
135
  | `CHALK_INPUT_ARGS` | Comma-separated list of column names (e.g. `x,y,z`). Renames incoming RecordBatch columns by index. If unset, the original column names are used. Reserved columns (below) are held out of this mapping and keep their own name. |
136
+ | `CHALK_FNQ_CONSUMER_ENDPOINT` | Opt into DP API `FnqConsumerService` consumption (HTTP or HTTPS gRPC endpoint). Unset preserves direct Redis consumption. API errors never fall back to Redis. |
137
+ | `CHALK_FUNCTION_QUEUE_TOKEN_FILE` | Controller-mounted working JWT, reopened per RPC to observe rotation. Defaults to `/var/run/secrets/chalk-function-queue/identity-token`. The shim does not exchange credentials. |
129
138
  | `CHALK_FNQ_QUEUE_PROTOCOL` | Self-consumer work transport: `list_v1` (default/backward compatible) or `stream_v1`. Deployment tooling sets this from immutable scaling-group revision metadata. |
130
139
 
131
140
  #### Reserved columns
@@ -216,6 +225,15 @@ uv pip install -e ".[dev]"
216
225
  pytest tests/ -v
217
226
  ```
218
227
 
228
+ The Linux metrics shutdown regression tests use an in-memory bus publisher:
229
+
230
+ ```bash
231
+ PYO3_PYTHON=python3 cargo test --manifest-path chalk-remote-call-rs/chalk-remote-call-server/Cargo.toml --no-default-features --lib metrics::tests
232
+ ```
233
+
234
+ `--no-default-features` links Python into the test executable; wheel builds retain
235
+ the default `extension-module` feature.
236
+
219
237
  ### Rust code
220
238
 
221
239
  Rust source lives in `chalk-remote-call-rs/`:
@@ -230,7 +248,10 @@ PYO3_PYTHON=python3 cargo check --manifest-path chalk-remote-call-rs/chalk-remot
230
248
 
231
249
  Handler failures retain their original exception type, message, traceback,
232
250
  exception chains, and exception groups. Runtime dispatch frames are excluded
233
- from the user traceback; full diagnostics are retained in server logs.
251
+ from the user traceback, along with callers above the handler dispatch boundary.
252
+ Handler frames and their downstream calls remain visible (except for Chalk SDK
253
+ and marked generated dispatch frames); full diagnostics are retained in server
254
+ logs and `internal_stacktrace`.
234
255
 
235
256
  All call modes carry a JSON payload with `chalk_remote_error: 1` and an
236
257
  `exception` object containing the `ChalkException` fields `kind`, `message`,
@@ -245,3 +266,23 @@ Payloads are bounded for gRPC header limits. Truncation is marked explicitly,
245
266
  with complete tracebacks kept in server logs. Exception objects and locals are
246
267
  never pickled or sent. Chalk SDK-generated handlers identify their dispatch
247
268
  frames, and notebook source maps identify the deployed snapshot's lines.
269
+
270
+ ### Fnq integration test
271
+
272
+ On Linux, build the native extension and the paired `chalk-private` test harness:
273
+
274
+ ```bash
275
+ # chalk-private, inside the Nix dev shell
276
+ bazel build //rust-crates/chalk/dataplane-api-server:fnq_test_server
277
+
278
+ # chalk-remote-call-python
279
+ uv pip install -e ".[dev]" redis PyJWT cryptography
280
+ FNQ_TEST_SERVER=/path/to/chalk-private/bazel-bin/rust-crates/chalk/dataplane-api-server/fnq_test_server \
281
+ REDIS_URL=redis://127.0.0.1:6379 .venv/bin/pytest tests/test_fnq_api_e2e.py -v
282
+ ```
283
+
284
+ Use an isolated Redis instance. The tests create temporary signing keys and start
285
+ the production JWT layer and Fnq service, then exercise real native-shim execution,
286
+ lease renewal, result writes, token rotation, and environment isolation. These tests
287
+ skip unless `FNQ_TEST_SERVER` and `REDIS_URL` are set. Deploy the service before
288
+ setting `CHALK_FNQ_CONSUMER_ENDPOINT` on a workload.
@@ -7,7 +7,7 @@ The server receives Arrow IPC record batches over a bidirectional gRPC stream, t
7
7
  ## Requirements
8
8
 
9
9
  - Python >= 3.10
10
- - Rust toolchain (for building the native extension)
10
+ - Rust 1.99.0 (for building the native extension)
11
11
  - `pyarrow >= 14.0.0`
12
12
 
13
13
  ## Usage
@@ -78,6 +78,12 @@ invalid environment configuration, and exceptions escaping startup or the server
78
78
  emit a single ERROR record with the full traceback and exit with status 1.
79
79
  Calls to `serve()` from Python retain the embedding application's logging configuration.
80
80
 
81
+ On Linux, server shutdown drains buffered function-call metrics before the runtime exits,
82
+ including when the server returns an error. Draining waits up to 10 seconds; a timeout or
83
+ publisher failure is logged as a warning.
84
+ Routine drain messages are logged at DEBUG; set `RUST_LOG=info,_native::metrics=debug`
85
+ to include them.
86
+
81
87
  Missing optional StatsD endpoints or a metrics-bus topic do not emit warnings.
82
88
  Failures initializing configured metrics sinks still warn. Routine customer
83
89
  StatsD configuration messages are emitted at DEBUG by the shared metrics library;
@@ -88,6 +94,8 @@ set `RUST_LOG=info,chalk_metrics::metrics::config=debug` to include them.
88
94
  | Variable | Description |
89
95
  |----------|-------------|
90
96
  | `CHALK_INPUT_ARGS` | Comma-separated list of column names (e.g. `x,y,z`). Renames incoming RecordBatch columns by index. If unset, the original column names are used. Reserved columns (below) are held out of this mapping and keep their own name. |
97
+ | `CHALK_FNQ_CONSUMER_ENDPOINT` | Opt into DP API `FnqConsumerService` consumption (HTTP or HTTPS gRPC endpoint). Unset preserves direct Redis consumption. API errors never fall back to Redis. |
98
+ | `CHALK_FUNCTION_QUEUE_TOKEN_FILE` | Controller-mounted working JWT, reopened per RPC to observe rotation. Defaults to `/var/run/secrets/chalk-function-queue/identity-token`. The shim does not exchange credentials. |
91
99
  | `CHALK_FNQ_QUEUE_PROTOCOL` | Self-consumer work transport: `list_v1` (default/backward compatible) or `stream_v1`. Deployment tooling sets this from immutable scaling-group revision metadata. |
92
100
 
93
101
  #### Reserved columns
@@ -178,6 +186,15 @@ uv pip install -e ".[dev]"
178
186
  pytest tests/ -v
179
187
  ```
180
188
 
189
+ The Linux metrics shutdown regression tests use an in-memory bus publisher:
190
+
191
+ ```bash
192
+ PYO3_PYTHON=python3 cargo test --manifest-path chalk-remote-call-rs/chalk-remote-call-server/Cargo.toml --no-default-features --lib metrics::tests
193
+ ```
194
+
195
+ `--no-default-features` links Python into the test executable; wheel builds retain
196
+ the default `extension-module` feature.
197
+
181
198
  ### Rust code
182
199
 
183
200
  Rust source lives in `chalk-remote-call-rs/`:
@@ -192,7 +209,10 @@ PYO3_PYTHON=python3 cargo check --manifest-path chalk-remote-call-rs/chalk-remot
192
209
 
193
210
  Handler failures retain their original exception type, message, traceback,
194
211
  exception chains, and exception groups. Runtime dispatch frames are excluded
195
- from the user traceback; full diagnostics are retained in server logs.
212
+ from the user traceback, along with callers above the handler dispatch boundary.
213
+ Handler frames and their downstream calls remain visible (except for Chalk SDK
214
+ and marked generated dispatch frames); full diagnostics are retained in server
215
+ logs and `internal_stacktrace`.
196
216
 
197
217
  All call modes carry a JSON payload with `chalk_remote_error: 1` and an
198
218
  `exception` object containing the `ChalkException` fields `kind`, `message`,
@@ -207,3 +227,23 @@ Payloads are bounded for gRPC header limits. Truncation is marked explicitly,
207
227
  with complete tracebacks kept in server logs. Exception objects and locals are
208
228
  never pickled or sent. Chalk SDK-generated handlers identify their dispatch
209
229
  frames, and notebook source maps identify the deployed snapshot's lines.
230
+
231
+ ### Fnq integration test
232
+
233
+ On Linux, build the native extension and the paired `chalk-private` test harness:
234
+
235
+ ```bash
236
+ # chalk-private, inside the Nix dev shell
237
+ bazel build //rust-crates/chalk/dataplane-api-server:fnq_test_server
238
+
239
+ # chalk-remote-call-python
240
+ uv pip install -e ".[dev]" redis PyJWT cryptography
241
+ FNQ_TEST_SERVER=/path/to/chalk-private/bazel-bin/rust-crates/chalk/dataplane-api-server/fnq_test_server \
242
+ REDIS_URL=redis://127.0.0.1:6379 .venv/bin/pytest tests/test_fnq_api_e2e.py -v
243
+ ```
244
+
245
+ Use an isolated Redis instance. The tests create temporary signing keys and start
246
+ the production JWT layer and Fnq service, then exercise real native-shim execution,
247
+ lease renewal, result writes, token rotation, and environment isolation. These tests
248
+ skip unless `FNQ_TEST_SERVER` and `REDIS_URL` are set. Deploy the service before
249
+ setting `CHALK_FNQ_CONSUMER_ENDPOINT` on a workload.
@@ -537,6 +537,8 @@ name = "chalk-remote-call-server"
537
537
  version = "0.1.0"
538
538
  dependencies = [
539
539
  "arrow",
540
+ "async-trait",
541
+ "base64 0.22.1",
540
542
  "bytes",
541
543
  "chalk-queue",
542
544
  "chalk-remote-call-proto",
@@ -1634,15 +1636,6 @@ dependencies = [
1634
1636
  "serde_core",
1635
1637
  ]
1636
1638
 
1637
- [[package]]
1638
- name = "indoc"
1639
- version = "2.0.7"
1640
- source = "registry+https://github.com/rust-lang/crates.io-index"
1641
- checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
1642
- dependencies = [
1643
- "rustversion",
1644
- ]
1645
-
1646
1639
  [[package]]
1647
1640
  name = "ipnet"
1648
1641
  version = "2.12.0"
@@ -1856,15 +1849,6 @@ version = "2.8.0"
1856
1849
  source = "registry+https://github.com/rust-lang/crates.io-index"
1857
1850
  checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
1858
1851
 
1859
- [[package]]
1860
- name = "memoffset"
1861
- version = "0.9.1"
1862
- source = "registry+https://github.com/rust-lang/crates.io-index"
1863
- checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
1864
- dependencies = [
1865
- "autocfg",
1866
- ]
1867
-
1868
1852
  [[package]]
1869
1853
  name = "metrics-generator"
1870
1854
  version = "0.1.0"
@@ -2402,35 +2386,32 @@ dependencies = [
2402
2386
 
2403
2387
  [[package]]
2404
2388
  name = "pyo3"
2405
- version = "0.27.1"
2389
+ version = "0.29.3"
2406
2390
  source = "registry+https://github.com/rust-lang/crates.io-index"
2407
- checksum = "37a6df7eab65fc7bee654a421404947e10a0f7085b6951bf2ea395f4659fb0cf"
2391
+ checksum = "700d18fa267b73b9b521fd7e13580e2f446916f176cacee1ab63fcc8191f1655"
2408
2392
  dependencies = [
2409
- "indoc",
2410
2393
  "libc",
2411
- "memoffset",
2412
2394
  "once_cell",
2413
2395
  "portable-atomic",
2414
2396
  "pyo3-build-config",
2415
2397
  "pyo3-ffi",
2416
2398
  "pyo3-macros",
2417
- "unindent",
2418
2399
  ]
2419
2400
 
2420
2401
  [[package]]
2421
2402
  name = "pyo3-build-config"
2422
- version = "0.27.1"
2403
+ version = "0.29.3"
2423
2404
  source = "registry+https://github.com/rust-lang/crates.io-index"
2424
- checksum = "f77d387774f6f6eec64a004eac0ed525aab7fa1966d94b42f743797b3e395afb"
2405
+ checksum = "7b3fc0c4d08f6bb10e71fe39dfb9e2f59c6eb6854e22ec8092f50c69a4499adb"
2425
2406
  dependencies = [
2426
2407
  "target-lexicon",
2427
2408
  ]
2428
2409
 
2429
2410
  [[package]]
2430
2411
  name = "pyo3-ffi"
2431
- version = "0.27.1"
2412
+ version = "0.29.3"
2432
2413
  source = "registry+https://github.com/rust-lang/crates.io-index"
2433
- checksum = "2dd13844a4242793e02df3e2ec093f540d948299a6a77ea9ce7afd8623f542be"
2414
+ checksum = "dfc0b8e19df29aad7086cf977bb0c2a2f143e30567eb113e9cf72b62ca698330"
2434
2415
  dependencies = [
2435
2416
  "libc",
2436
2417
  "pyo3-build-config",
@@ -2438,9 +2419,9 @@ dependencies = [
2438
2419
 
2439
2420
  [[package]]
2440
2421
  name = "pyo3-macros"
2441
- version = "0.27.1"
2422
+ version = "0.29.3"
2442
2423
  source = "registry+https://github.com/rust-lang/crates.io-index"
2443
- checksum = "eaf8f9f1108270b90d3676b8679586385430e5c0bb78bb5f043f95499c821a71"
2424
+ checksum = "6100e8a4b5eba53afaa5ed078364851a0b2499c553a44c31026b929049b49dc6"
2444
2425
  dependencies = [
2445
2426
  "proc-macro2",
2446
2427
  "pyo3-macros-backend",
@@ -2450,13 +2431,12 @@ dependencies = [
2450
2431
 
2451
2432
  [[package]]
2452
2433
  name = "pyo3-macros-backend"
2453
- version = "0.27.1"
2434
+ version = "0.29.3"
2454
2435
  source = "registry+https://github.com/rust-lang/crates.io-index"
2455
- checksum = "70a3b2274450ba5288bc9b8c1b69ff569d1d61189d4bff38f8d22e03d17f932b"
2436
+ checksum = "6143877a16e82b5a727b7127ff4cd86858a24a28d745d72f43e6f227c7b1bdb3"
2456
2437
  dependencies = [
2457
2438
  "heck 0.5.0",
2458
2439
  "proc-macro2",
2459
- "pyo3-build-config",
2460
2440
  "quote",
2461
2441
  "syn 2.0.117",
2462
2442
  ]
@@ -2773,10 +2753,37 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e"
2773
2753
  dependencies = [
2774
2754
  "log",
2775
2755
  "ring",
2776
- "rustls-webpki",
2756
+ "rustls-webpki 0.101.7",
2777
2757
  "sct",
2778
2758
  ]
2779
2759
 
2760
+ [[package]]
2761
+ name = "rustls"
2762
+ version = "0.23.43"
2763
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2764
+ checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06"
2765
+ dependencies = [
2766
+ "log",
2767
+ "once_cell",
2768
+ "ring",
2769
+ "rustls-pki-types",
2770
+ "rustls-webpki 0.103.15",
2771
+ "subtle",
2772
+ "zeroize",
2773
+ ]
2774
+
2775
+ [[package]]
2776
+ name = "rustls-native-certs"
2777
+ version = "0.8.4"
2778
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2779
+ checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d"
2780
+ dependencies = [
2781
+ "openssl-probe",
2782
+ "rustls-pki-types",
2783
+ "schannel",
2784
+ "security-framework",
2785
+ ]
2786
+
2780
2787
  [[package]]
2781
2788
  name = "rustls-pemfile"
2782
2789
  version = "1.0.4"
@@ -2786,6 +2793,15 @@ dependencies = [
2786
2793
  "base64 0.21.7",
2787
2794
  ]
2788
2795
 
2796
+ [[package]]
2797
+ name = "rustls-pemfile"
2798
+ version = "2.2.0"
2799
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2800
+ checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
2801
+ dependencies = [
2802
+ "rustls-pki-types",
2803
+ ]
2804
+
2789
2805
  [[package]]
2790
2806
  name = "rustls-pki-types"
2791
2807
  version = "1.14.1"
@@ -2805,6 +2821,17 @@ dependencies = [
2805
2821
  "untrusted",
2806
2822
  ]
2807
2823
 
2824
+ [[package]]
2825
+ name = "rustls-webpki"
2826
+ version = "0.103.15"
2827
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2828
+ checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2"
2829
+ dependencies = [
2830
+ "ring",
2831
+ "rustls-pki-types",
2832
+ "untrusted",
2833
+ ]
2834
+
2808
2835
  [[package]]
2809
2836
  name = "rustversion"
2810
2837
  version = "1.0.22"
@@ -3068,6 +3095,12 @@ version = "1.2.1"
3068
3095
  source = "registry+https://github.com/rust-lang/crates.io-index"
3069
3096
  checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
3070
3097
 
3098
+ [[package]]
3099
+ name = "subtle"
3100
+ version = "2.6.1"
3101
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3102
+ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
3103
+
3071
3104
  [[package]]
3072
3105
  name = "syn"
3073
3106
  version = "1.0.109"
@@ -3312,7 +3345,17 @@ version = "0.24.1"
3312
3345
  source = "registry+https://github.com/rust-lang/crates.io-index"
3313
3346
  checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
3314
3347
  dependencies = [
3315
- "rustls",
3348
+ "rustls 0.21.12",
3349
+ "tokio",
3350
+ ]
3351
+
3352
+ [[package]]
3353
+ name = "tokio-rustls"
3354
+ version = "0.26.4"
3355
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3356
+ checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61"
3357
+ dependencies = [
3358
+ "rustls 0.23.43",
3316
3359
  "tokio",
3317
3360
  ]
3318
3361
 
@@ -3418,10 +3461,10 @@ dependencies = [
3418
3461
  "percent-encoding",
3419
3462
  "pin-project",
3420
3463
  "prost 0.12.6",
3421
- "rustls",
3422
- "rustls-pemfile",
3464
+ "rustls 0.21.12",
3465
+ "rustls-pemfile 1.0.4",
3423
3466
  "tokio",
3424
- "tokio-rustls",
3467
+ "tokio-rustls 0.24.1",
3425
3468
  "tokio-stream",
3426
3469
  "tower 0.4.13",
3427
3470
  "tower-layer",
@@ -3451,8 +3494,11 @@ dependencies = [
3451
3494
  "percent-encoding",
3452
3495
  "pin-project",
3453
3496
  "prost 0.13.5",
3497
+ "rustls-native-certs",
3498
+ "rustls-pemfile 2.2.0",
3454
3499
  "socket2 0.5.10",
3455
3500
  "tokio",
3501
+ "tokio-rustls 0.26.4",
3456
3502
  "tokio-stream",
3457
3503
  "tower 0.4.13",
3458
3504
  "tower-layer",
@@ -3663,12 +3709,6 @@ version = "0.2.6"
3663
3709
  source = "registry+https://github.com/rust-lang/crates.io-index"
3664
3710
  checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
3665
3711
 
3666
- [[package]]
3667
- name = "unindent"
3668
- version = "0.2.4"
3669
- source = "registry+https://github.com/rust-lang/crates.io-index"
3670
- checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
3671
-
3672
3712
  [[package]]
3673
3713
  name = "untrusted"
3674
3714
  version = "0.9.0"
@@ -1,5 +1,33 @@
1
1
  // @generated
2
2
  // This file is @generated by prost-build.
3
+ /// Principal types that a permission may be assigned to directly. User-role
4
+ /// assignment is managed separately; this metadata controls non-user principals.
5
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6
+ #[repr(i32)]
7
+ pub enum PermissionPrincipal {
8
+ Unspecified = 0,
9
+ ServiceToken = 1,
10
+ }
11
+ impl PermissionPrincipal {
12
+ /// String value of the enum field names used in the ProtoBuf definition.
13
+ ///
14
+ /// The values are not transformed in any way and thus are considered stable
15
+ /// (if the ProtoBuf definition does not change) and safe for programmatic use.
16
+ pub fn as_str_name(&self) -> &'static str {
17
+ match self {
18
+ PermissionPrincipal::Unspecified => "PERMISSION_PRINCIPAL_UNSPECIFIED",
19
+ PermissionPrincipal::ServiceToken => "PERMISSION_PRINCIPAL_SERVICE_TOKEN",
20
+ }
21
+ }
22
+ /// Creates an enum from field names used in the ProtoBuf definition.
23
+ pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
24
+ match value {
25
+ "PERMISSION_PRINCIPAL_UNSPECIFIED" => Some(Self::Unspecified),
26
+ "PERMISSION_PRINCIPAL_SERVICE_TOKEN" => Some(Self::ServiceToken),
27
+ _ => None,
28
+ }
29
+ }
30
+ }
3
31
  #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4
32
  #[repr(i32)]
5
33
  pub enum Permission {
@@ -42,6 +70,10 @@ pub enum Permission {
42
70
  InternalWorkingTokenExchange = 34,
43
71
  BillingWrite = 35,
44
72
  QueryOfflineRead = 36,
73
+ InternalResourceShareView = 37,
74
+ InternalExchangeTokenRenew = 38,
75
+ AgentsWrite = 39,
76
+ AgentsRead = 40,
45
77
  }
46
78
  impl Permission {
47
79
  /// String value of the enum field names used in the ProtoBuf definition.
@@ -87,6 +119,10 @@ impl Permission {
87
119
  Permission::InternalWorkingTokenExchange => "PERMISSION_INTERNAL_WORKING_TOKEN_EXCHANGE",
88
120
  Permission::BillingWrite => "PERMISSION_BILLING_WRITE",
89
121
  Permission::QueryOfflineRead => "PERMISSION_QUERY_OFFLINE_READ",
122
+ Permission::InternalResourceShareView => "PERMISSION_INTERNAL_RESOURCE_SHARE_VIEW",
123
+ Permission::InternalExchangeTokenRenew => "PERMISSION_INTERNAL_EXCHANGE_TOKEN_RENEW",
124
+ Permission::AgentsWrite => "PERMISSION_AGENTS_WRITE",
125
+ Permission::AgentsRead => "PERMISSION_AGENTS_READ",
90
126
  }
91
127
  }
92
128
  /// Creates an enum from field names used in the ProtoBuf definition.
@@ -129,6 +165,10 @@ impl Permission {
129
165
  "PERMISSION_INTERNAL_WORKING_TOKEN_EXCHANGE" => Some(Self::InternalWorkingTokenExchange),
130
166
  "PERMISSION_BILLING_WRITE" => Some(Self::BillingWrite),
131
167
  "PERMISSION_QUERY_OFFLINE_READ" => Some(Self::QueryOfflineRead),
168
+ "PERMISSION_INTERNAL_RESOURCE_SHARE_VIEW" => Some(Self::InternalResourceShareView),
169
+ "PERMISSION_INTERNAL_EXCHANGE_TOKEN_RENEW" => Some(Self::InternalExchangeTokenRenew),
170
+ "PERMISSION_AGENTS_WRITE" => Some(Self::AgentsWrite),
171
+ "PERMISSION_AGENTS_READ" => Some(Self::AgentsRead),
132
172
  _ => None,
133
173
  }
134
174
  }