Skip to content
Merged
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
4 changes: 2 additions & 2 deletions docker/catalog/services/agent-actions-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ depends_on:
restart: unless-stopped
resources:
cpus: '0.5'
memory: 256M
memory: 512M
cpus_reservation: '0.1'
memory_reservation: 64M
memory_reservation: 128M
stop_grace_period: 60s
command:
- python
Expand Down
4 changes: 2 additions & 2 deletions docker/catalog/services/intelligence-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ depends_on:
restart: unless-stopped
resources:
cpus: '0.5'
memory: 256M
memory: 768M
cpus_reservation: '0.1'
memory_reservation: 64M
memory_reservation: 128M
stop_grace_period: 30s
command:
- uvicorn
Expand Down
4 changes: 2 additions & 2 deletions docker/catalog/services/skill-lifecycle-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ depends_on:
restart: unless-stopped
resources:
cpus: '0.5'
memory: 256M
memory: 512M
cpus_reservation: '0.1'
memory_reservation: 64M
memory_reservation: 128M
stop_grace_period: 60s
command:
- python
Expand Down
12 changes: 6 additions & 6 deletions docker/docker-compose.infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1066,10 +1066,10 @@ services:
resources:
limits:
cpus: '0.5'
memory: 256M
memory: 512M
reservations:
cpus: '0.1'
memory: 64M
memory: 128M
labels:
- "com.omninode.service=agent-actions-consumer"
- "com.omninode.layer=runtime"
Expand Down Expand Up @@ -1116,10 +1116,10 @@ services:
resources:
limits:
cpus: '0.5'
memory: 256M
memory: 512M
reservations:
cpus: '0.1'
memory: 64M
memory: 128M
labels:
- "com.omninode.service=skill-lifecycle-consumer"
- "com.omninode.layer=runtime"
Expand Down Expand Up @@ -1268,10 +1268,10 @@ services:
resources:
limits:
cpus: '0.5'
memory: 256M
memory: 768M
reservations:
cpus: '0.1'
memory: 64M
memory: 128M
labels:
- "com.omninode.service=intelligence-api"
- "com.omninode.layer=runtime"
Expand Down
18 changes: 18 additions & 0 deletions tests/unit/infra/test_compose_invariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,21 @@ def test_container_internal_addresses_are_hardcoded() -> None:
assert "${" not in str(actual), (
f"{var} must be a hardcoded literal, got: {actual}"
)


@pytest.mark.unit
def test_hot_runtime_services_have_expanded_memory_limits() -> None:
"""Services observed near 256M cgroup limits must render larger caps."""
with open(COMPOSE_FILE) as f:
compose = yaml.safe_load(f)

expected = {
"agent-actions-consumer": ("512M", "128M"),
"skill-lifecycle-consumer": ("512M", "128M"),
"intelligence-api": ("768M", "128M"),
}

for service_name, (limit, reservation) in expected.items():
resources = compose["services"][service_name]["deploy"]["resources"]
assert resources["limits"]["memory"] == limit
assert resources["reservations"]["memory"] == reservation
Loading