From f3fb4eb9847416440acada284d8d43a9e69b6cac Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Fri, 23 Jan 2026 20:19:40 -0800 Subject: [PATCH 1/2] Minor tweaks to support relative paths and symlinks --- Fuser/compose_end_to_end.py | 6 +++++- Fuser/paths.py | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Fuser/compose_end_to_end.py b/Fuser/compose_end_to_end.py index 347cf5f..e85b4ad 100644 --- a/Fuser/compose_end_to_end.py +++ b/Fuser/compose_end_to_end.py @@ -84,6 +84,7 @@ def _load_kernels_from_summary(summary_path: Path) -> list[KernelItem]: if not isinstance(data, list): raise SystemExit("kernels summary must be a JSON array (from dispatch step)") items: list[KernelItem] = [] + summary_dir = summary_path.parent for it in data: if not isinstance(it, dict): continue @@ -95,6 +96,9 @@ def _load_kernels_from_summary(summary_path: Path) -> list[KernelItem]: if not sid or not kpath_str: continue kpath = Path(kpath_str) + # If path is relative, resolve it relative to summary.json location + if not kpath.is_absolute(): + kpath = summary_dir / kpath if not kpath.is_file(): continue code = _read_text(kpath) @@ -401,7 +405,7 @@ def compose( (attempts_dir / f"attempt_{i}.prompt.txt").write_text(prompt, encoding="utf-8") response = provider.get_response( - model_name, [{"role": "user", "content": prompt}], max_tokens=50000 + model_name, [{"role": "user", "content": prompt}], max_tokens=32000 ) last_usage = response.usage raw_text = response.content or "" diff --git a/Fuser/paths.py b/Fuser/paths.py index 90065c8..8c82897 100644 --- a/Fuser/paths.py +++ b/Fuser/paths.py @@ -25,14 +25,14 @@ def ensure_abs_regular_file(p: str | Path) -> Path: if not path.is_absolute(): raise PathSafetyError(f"problem path must be absolute: {path}") try: - st = path.lstat() + # Resolve symlinks to get the real path + resolved_path = path.resolve() + st = resolved_path.stat() except FileNotFoundError: raise PathSafetyError(f"problem path does not exist: {path}") - if stat.S_ISLNK(st.st_mode): - raise PathSafetyError(f"problem path must not be a symlink: {path}") if not stat.S_ISREG(st.st_mode): raise PathSafetyError(f"problem path must be a regular file: {path}") - return path + return resolved_path def make_run_dirs(base: Path, run_id: str) -> dict[str, Path]: From 478bd8c8a9e8b712dcfc7c1db5c429656d3c1ac7 Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Fri, 23 Jan 2026 20:21:21 -0800 Subject: [PATCH 2/2] Remove unintended number change --- Fuser/compose_end_to_end.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fuser/compose_end_to_end.py b/Fuser/compose_end_to_end.py index e85b4ad..3331090 100644 --- a/Fuser/compose_end_to_end.py +++ b/Fuser/compose_end_to_end.py @@ -405,7 +405,7 @@ def compose( (attempts_dir / f"attempt_{i}.prompt.txt").write_text(prompt, encoding="utf-8") response = provider.get_response( - model_name, [{"role": "user", "content": prompt}], max_tokens=32000 + model_name, [{"role": "user", "content": prompt}], max_tokens=50000 ) last_usage = response.usage raw_text = response.content or ""