From 7d19a252f2014c02dbaef1a7538479ec57d268c9 Mon Sep 17 00:00:00 2001 From: brianvans <1323225+brianvans@users.noreply.github.com> Date: Tue, 22 Sep 2026 22:57:31 -0700 Subject: [PATCH] Add POST /automation/trigger to ingress rules --- braintrust/README.md | 2 +- .../api-workload-isolation-routes.yaml | 3 +++ braintrust/tests/virtualservice_test.yaml | 19 ++++++++++++++----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/braintrust/README.md b/braintrust/README.md index 9fa8f31..48bac42 100644 --- a/braintrust/README.md +++ b/braintrust/README.md @@ -260,7 +260,7 @@ route these paths: | --- | --- | | `braintrust-api` (default) | All requests not matched by an explicit ingest or background route | | `braintrust-api-ingest` | `POST /logs3`, `POST /otel/v1/traces`, `POST /attachment`, `POST /attachment/status` | -| `braintrust-api-background` | `POST /v1/eval`, `POST /v1/eval/*`, `POST /function/eval`, `POST /function/sandbox`, `POST /function/use`, `POST /function/invoke-async-batch`, `POST /function/insert-functions`, `POST /automation/logs/trigger`; all methods for `/v1/proxy/chat/completions`, `/v1/proxy/responses` | +| `braintrust-api-background` | `POST /v1/eval`, `POST /v1/eval/*`, `POST /function/eval`, `POST /function/sandbox`, `POST /function/use`, `POST /function/invoke-async-batch`, `POST /function/insert-functions`, `POST /automation/logs/trigger`, `POST /automation/trigger`; all methods for `/v1/proxy/chat/completions`, `/v1/proxy/responses` | By default, Brainstore's internal `BRAINSTORE_AI_PROXY_URL` targets the background Service while isolation is enabled. For an existing deployment, diff --git a/braintrust/files/contracts/api-workload-isolation-routes.yaml b/braintrust/files/contracts/api-workload-isolation-routes.yaml index d37f441..be730d1 100644 --- a/braintrust/files/contracts/api-workload-isolation-routes.yaml +++ b/braintrust/files/contracts/api-workload-isolation-routes.yaml @@ -49,6 +49,9 @@ pools: - path: /automation/logs/trigger pathType: exact method: POST + - path: /automation/trigger + pathType: exact + method: POST - path: /v1/proxy/chat/completions pathType: exact - path: /v1/proxy/responses diff --git a/braintrust/tests/virtualservice_test.yaml b/braintrust/tests/virtualservice_test.yaml index 99913b2..40fb1ee 100644 --- a/braintrust/tests/virtualservice_test.yaml +++ b/braintrust/tests/virtualservice_test.yaml @@ -292,18 +292,27 @@ tests: path: spec.http[5].match[0].method.exact value: POST - equal: - path: spec.http[13].match[0].uri.exact + path: spec.http[12].match[0].uri.exact + value: /automation/trigger + - equal: + path: spec.http[12].route[0].destination.host + value: custom-background + - equal: + path: spec.http[12].match[0].method.exact + value: POST + - equal: + path: spec.http[14].match[0].uri.exact value: /v1/proxy/responses - equal: - path: spec.http[13].route[0].destination.host + path: spec.http[14].route[0].destination.host value: custom-background - isNull: - path: spec.http[13].match[0].method + path: spec.http[14].match[0].method - equal: - path: spec.http[14].match[0].uri.prefix + path: spec.http[15].match[0].uri.prefix value: / - equal: - path: spec.http[14].route[0].destination.host + path: spec.http[15].route[0].destination.host value: braintrust-api - it: should reject workload-isolation routes without the API pools