feat(firecracker): enumerate running bottles
lint / lint (push) Failing after 1m5s
test / integration-docker (pull_request) Successful in 1m5s
test / image-input-builds (pull_request) Successful in 9m38s
test / unit (pull_request) Failing after 13m30s
prd-number-check / require-numbered-prds (pull_request) Failing after 13m35s
tracker-policy-pr / check-pr (pull_request) Failing after 13m23s
test / coverage (pull_request) Has been skipped

This commit is contained in:
2026-07-26 22:57:16 +00:00
parent 826106f76a
commit 0e8124adc7
2 changed files with 86 additions and 4 deletions
+22 -4
View File
@@ -1,14 +1,32 @@
"""Active-agent enumeration for the Firecracker backend.
The backend is disabled during the companion-container removal (#385) — it can't
launch bottles, so there are none to enumerate. Real enumeration returns
with the backend's consolidated relaunch (#354).
Running bottles are the Firecracker processes whose ``--config-file`` points
at an existing per-bottle run directory. The same authoritative process scan
protects cleanup from deleting live VMs; operational scan failures propagate
as ``EnumerationError`` instead of masquerading as an empty host.
"""
from __future__ import annotations
from ...bottle_state import read_metadata
from .. import ActiveAgent
from .cleanup import live_run_dirs
def enumerate_active() -> list[ActiveAgent]:
return []
out: list[ActiveAgent] = []
for run_dir in live_run_dirs():
slug = run_dir.name
metadata = read_metadata(slug)
out.append(ActiveAgent(
backend_name="firecracker",
slug=slug,
agent_name=metadata.agent_name if metadata else "?",
started_at=metadata.started_at if metadata else "",
# Firecracker uses the shared gateway, so there are no
# per-bottle gateway service containers to report.
services=(),
label=metadata.label if metadata else "",
color=metadata.color if metadata else "",
))
return out