Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ LLM_GATEWAY_API_KEY=
LLM_GATEWAY_EMBEDDING_MODEL=
LLM_API_GATEWAY=
LLM_API_KEY=
CALDAV_BASE_URL=
# Optional Naruon calendar projection consume (ADR 0203 step 2 / #336).
# Empty keeps observed events fail-closed. Never put an end-user bearer here.
# CALDAV_BASE_URL is not a fallback for this audience.
NARUON_CALENDAR_BASE_URL=
NARUON_CALENDAR_SERVICE_TOKEN=
RANKWEAVE_DISABLED=
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.d/remove-obsolete-caldav-boundary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Changed

- Removed the superseded direct pseudo-CalDAV adapter and `CALDAV_BASE_URL` runtime/deployment configuration. External calendar observations remain available only through the strict audience-scoped Naruon projection consumer defined by ADR 0203; historical ADR text describing the retired `/events` experiment remains as migration evidence.
2 changes: 0 additions & 2 deletions backend/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class Settings:
searxng_base_url: str
tepp_transport_url: str
tepp_api_key: str
caldav_base_url: str
naruon_calendar_base_url: str
naruon_calendar_service_token: str
rankweave_disabled: bool
Expand Down Expand Up @@ -207,7 +206,6 @@ def load_settings() -> Settings:
searxng_base_url=os.environ.get("SEARXNG_BASE_URL", ""),
tepp_transport_url=os.environ.get("TEPP_TRANSPORT_URL", ""),
tepp_api_key=os.environ.get("TEPP_API_KEY", "").strip(),
caldav_base_url=os.environ.get("CALDAV_BASE_URL", "").strip(),
naruon_calendar_base_url=os.environ.get("NARUON_CALENDAR_BASE_URL", "").strip(),
naruon_calendar_service_token=os.environ.get(
"NARUON_CALENDAR_SERVICE_TOKEN", ""
Expand Down
4 changes: 0 additions & 4 deletions backend/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@
ContextualOrchestratorAdjudicationClient,
NullAdjudicationClient,
)
from lineageweave.caldav_client import (
CALDAV_UNAVAILABLE_NEXT_ACTION,
build_caldav_client,
)
from lineageweave.commitment_extraction import (
ContextualOrchestratorCommitmentExtractionClient,
NullCommitmentExtractionClient,
Expand Down
8 changes: 4 additions & 4 deletions backend/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,21 @@ def test_local_keycloak_discovery_uses_backend_reachable_base_url(monkeypatch) -
assert settings.keyverse_claim_binding_required is False


def test_naruon_calendar_audience_defaults_empty_and_is_not_caldav(monkeypatch) -> None:
"""Missing Naruon settings keep the observed-event channel dropped."""
def test_naruon_calendar_audience_defaults_empty_and_ignores_legacy_caldav_env(monkeypatch) -> None:
"""Only the audience-scoped Naruon consumer can configure calendar observations."""
monkeypatch.delenv("NARUON_CALENDAR_BASE_URL", raising=False)
monkeypatch.delenv("NARUON_CALENDAR_SERVICE_TOKEN", raising=False)
monkeypatch.setenv("CALDAV_BASE_URL", "https://calendar.example/caldav/")
settings = load_settings()
assert settings.naruon_calendar_base_url == ""
assert settings.naruon_calendar_service_token == ""
assert settings.caldav_base_url == "https://calendar.example/caldav/"
assert not hasattr(settings, "caldav_base_url")
monkeypatch.setenv("NARUON_CALENDAR_BASE_URL", "https://naruon.example/projection")
monkeypatch.setenv("NARUON_CALENDAR_SERVICE_TOKEN", "service-secret")
wired = load_settings()
assert wired.naruon_calendar_base_url == "https://naruon.example/projection"
assert wired.naruon_calendar_service_token == "service-secret"
assert wired.naruon_calendar_service_token != wired.caldav_base_url
assert not hasattr(wired, "caldav_base_url")


def test_rankweave_disabled_defaults_off(monkeypatch) -> None:
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ services:
SEARXNG_BASE_URL: http://searxng:8080
TEPP_TRANSPORT_URL: ${TEPP_TRANSPORT_URL:-}
TEPP_API_KEY: ${TEPP_API_KEY:-}
CALDAV_BASE_URL: ${CALDAV_BASE_URL:-}
NARUON_CALENDAR_BASE_URL: ${NARUON_CALENDAR_BASE_URL:-}
NARUON_CALENDAR_SERVICE_TOKEN: ${NARUON_CALENDAR_SERVICE_TOKEN:-}
RANKWEAVE_DISABLED: ${RANKWEAVE_DISABLED:-}
Expand Down
67 changes: 0 additions & 67 deletions lineageweave/caldav_client.py

This file was deleted.

58 changes: 0 additions & 58 deletions tests/test_caldav_client.py

This file was deleted.

29 changes: 29 additions & 0 deletions tests/test_calendar_authority_fitness.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""Architecture fitness for external calendar authority boundaries."""

from pathlib import Path


ROOT = Path(__file__).resolve().parents[1]


def test_obsolete_direct_caldav_adapter_and_configuration_are_absent() -> None:
"""LineageWeave must not retain a direct pseudo-CalDAV provider boundary."""
assert not (ROOT / "lineageweave" / "caldav_client.py").exists()
assert not (ROOT / "tests" / "test_caldav_client.py").exists()

config_source = (ROOT / "backend" / "app" / "config.py").read_text(encoding="utf-8")
main_source = (ROOT / "backend" / "app" / "main.py").read_text(encoding="utf-8")
env_example = (ROOT / ".env.example").read_text(encoding="utf-8")
compose_source = (ROOT / "docker-compose.yml").read_text(encoding="utf-8")

assert "caldav_base_url" not in config_source
assert "CALDAV_BASE_URL" not in config_source
assert "lineageweave.caldav_client" not in main_source
assert "CALDAV_UNAVAILABLE_NEXT_ACTION" not in main_source
assert "build_caldav_client" not in main_source
assert "\nCALDAV_BASE_URL=" not in env_example
assert "CALDAV_BASE_URL:" not in compose_source

# The versioned consumer/ACL remains explicit while the provider authority stays external.
assert "NARUON_CALENDAR_BASE_URL" in config_source
assert "NARUON_CALENDAR_SERVICE_TOKEN" in config_source
Loading