Turn the production distribution API on by default.
Deploy Development / deploy (push) Successful in 53s
Test Suite / pytest-backend (push) Failing after 29s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Canceled after 2s
Test Suite / k6 /health Baseline (push) Canceled after 0s
Test Suite / playwright-tests (push) Canceled after 0s

The production compose file now forwards DISTRIBUTION_ENABLED into the API container and enables the catalog unless the env file turns it off. Cursor signatures fall back to the existing database password so a missing extra secret does not hide the catalog.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-23 18:40:24 +01:00
1 parent ae0acf9ad2
commit b408e8fd7a
4 files changed
+36 -3

No files matched your search

@@ -242,6 +242,26 @@ def test_distribution_read_is_hidden_while_disabled(client: TestClient, monkeypa
assert response.headers.get("cache-control") == "private, no-store"
def test_cursor_secret_uses_database_password_in_production(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("ENVIRONMENT", "production")
monkeypatch.delenv("DISTRIBUTION_CURSOR_SECRET", raising=False)
monkeypatch.setenv("DB_PASSWORD", "prod-db-secret")
first = cursor_secret()
assert first != "shinkan-distribution-dev-cursor"
assert "prod-db-secret" not in first
assert cursor_secret() == first
monkeypatch.setenv("DISTRIBUTION_CURSOR_SECRET", "explicit")
assert cursor_secret() == "explicit"
def test_cursor_secret_requires_material_in_production(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("ENVIRONMENT", "production")
monkeypatch.delenv("DISTRIBUTION_CURSOR_SECRET", raising=False)
monkeypatch.delenv("DB_PASSWORD", raising=False)
with pytest.raises(RuntimeError):
cursor_secret()
class _DroppingCursor:
"""Ein neues execute verwirft ein noch nicht gelesenes Ergebnis, wie psycopg2."""