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
2 changes: 1 addition & 1 deletion loopx/capabilities/benchmark_toolkit/experiment_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def read_benchmark_experiment_board_rows(
return []
rows: list[dict[str, Any]] = []
for index, line in enumerate(
path.read_text(encoding="utf-8").splitlines(), start=1
path.read_text(encoding="utf-8").split("\n"), start=1
):
if not line.strip():
continue
Expand Down
2 changes: 1 addition & 1 deletion loopx/capabilities/benchmark_toolkit/study_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def _read_jsonl_objects(path: Path) -> list[dict[str, Any]]:
if not path.exists():
return []
rows: list[dict[str, Any]] = []
for index, line in enumerate(path.read_text(encoding="utf-8").splitlines(), 1):
for index, line in enumerate(path.read_text(encoding="utf-8").split("\n"), 1):
if not line.strip():
continue
try:
Expand Down
4 changes: 2 additions & 2 deletions loopx/capabilities/issue_fix/cli_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def load_jsonl_row(
raise ValueError(f"issue-fix domain-state source is missing: {path.name}")
match: dict[str, Any] | None = None
for line_number, line in enumerate(
path.read_text(encoding="utf-8").splitlines(), start=1
path.read_text(encoding="utf-8").split("\n"), start=1
):
if not line.strip():
continue
Expand Down Expand Up @@ -73,7 +73,7 @@ def load_jsonl_rows(path: Path) -> list[dict[str, Any]]:
raise ValueError(f"issue-fix domain-state source is missing: {path.name}")
rows: list[dict[str, Any]] = []
for line_number, line in enumerate(
path.read_text(encoding="utf-8").splitlines(), start=1
path.read_text(encoding="utf-8").split("\n"), start=1
):
if not line.strip():
continue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def _find_domain_row(
if not path.is_file():
return None
match = None
for line in path.read_text(encoding="utf-8").splitlines():
for line in path.read_text(encoding="utf-8").split("\n"):
if not line.strip():
continue
row = json.loads(line)
Expand Down
2 changes: 1 addition & 1 deletion loopx/capabilities/issue_fix/outcome_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ def _load_domain_packets(path: Path) -> tuple[list[dict[str, Any]], list[str]]:
packets: list[dict[str, Any]] = []
warnings: list[str] = []
for line_number, line in enumerate(
path.read_text(encoding="utf-8").splitlines(), start=1
path.read_text(encoding="utf-8").split("\n"), start=1
):
if not line.strip():
continue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
def _load_lifecycle_rows(path: Path) -> list[dict[str, Any]]:
rows: list[dict[str, Any]] = []
for line_number, raw_line in enumerate(
path.read_text(encoding="utf-8").splitlines(), start=1
path.read_text(encoding="utf-8").split("\n"), start=1
):
if not raw_line.strip():
continue
Expand Down
2 changes: 1 addition & 1 deletion loopx/capabilities/repository_change_window/ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _read_events(path: Path) -> list[dict[str, Any]]:
return []
result: list[dict[str, Any]] = []
for line_number, line in enumerate(
path.read_text(encoding="utf-8").splitlines(), 1
path.read_text(encoding="utf-8").split("\n"), 1
):
if not line.strip():
continue
Expand Down
2 changes: 1 addition & 1 deletion loopx/cli_commands/lark_inbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def _read_stdin_events() -> list[object]:
try:
payload = json.loads(raw)
except json.JSONDecodeError:
payload = [json.loads(line) for line in raw.splitlines() if line.strip()]
payload = [json.loads(line) for line in raw.split("\n") if line.strip()]
if isinstance(payload, list):
return payload
if isinstance(payload, dict):
Expand Down
4 changes: 2 additions & 2 deletions loopx/control_plane/coordination/runtime_shadow.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def read_evidence(path: Path) -> bytes | None:

rollout_bytes = read_evidence(rollout_event_log_path(runtime_root, goal_id))
rollout_events: list[dict[str, Any]] = []
for line in (rollout_bytes or b"").decode("utf-8").splitlines():
for line in (rollout_bytes or b"").decode("utf-8").split("\n"):
try:
value = json.loads(line)
except json.JSONDecodeError:
Expand All @@ -363,7 +363,7 @@ def read_evidence(path: Path) -> bytes | None:
data = read_evidence(path)
if not data:
continue
events = [normalize_state_event(json.loads(line)) for line in data.decode("utf-8").splitlines() if line.strip()]
events = [normalize_state_event(json.loads(line)) for line in data.decode("utf-8").split("\n") if line.strip()]
rendered = render_active_state_sections(build_state_projection(events, goal_id=goal_id))
fields = parse_active_state_todos(rendered, goal=dict(goal), state_path=state_path, item_limit=None, rollout_events=rollout_events)
if any(fields.get(f"{role}_todos") for role in ("user", "agent")):
Expand Down
2 changes: 1 addition & 1 deletion loopx/control_plane/quota/codex_session_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def session_usage_baseline(
snapshot_first_booked_at: Any = None
binding_recorded = False
seen_rows: set[tuple[str, str, str]] = set()
for line_number, line in enumerate(raw.splitlines(), start=1):
for line_number, line in enumerate(raw.split("\n"), start=1):
line = line.strip()
if not line:
continue
Expand Down
2 changes: 1 addition & 1 deletion loopx/control_plane/quota/slot_accounting.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def _load_goal_run_index_records(runtime_root: Path, goal_id: str) -> list[dict[
return []
records: list[dict[str, Any]] = []
try:
lines = index_path.read_text(encoding="utf-8").splitlines()
lines = index_path.read_text(encoding="utf-8").split("\n")
except OSError:
return []
for line in lines:
Expand Down
2 changes: 1 addition & 1 deletion loopx/control_plane/runtime/stride_observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def read_run_index(runtime_root: Path, goal_id: str) -> list[dict[str, Any]]:
if not index_path.exists():
return []
rows: list[dict[str, Any]] = []
for line in index_path.read_text(encoding="utf-8").splitlines():
for line in index_path.read_text(encoding="utf-8").split("\n"):
if not line.strip():
continue
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _rows(state: _QualificationState) -> list[dict[str, Any]]:
index = state.fixture.runtime_root / "goals" / goal_id / "runs" / "index.jsonl"
if not index.is_file():
return []
return [json.loads(line) for line in index.read_text(encoding="utf-8").splitlines() if line]
return [json.loads(line) for line in index.read_text(encoding="utf-8").split("\n") if line]


def dispatch_vision_closeout(
Expand Down
2 changes: 1 addition & 1 deletion loopx/experiments/planner_worker/traex.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _assistant_text_and_usage(jsonl: str) -> tuple[str, dict[str, int], bool]:
parts: list[str] = []
usage: dict[str, int] = {}
completed = False
for line in jsonl.splitlines():
for line in jsonl.split("\n"):
if not line.strip():
continue
try:
Expand Down
Loading