From 6fc0114f40da28e88f238454319745c885aa7a04 Mon Sep 17 00:00:00 2001 From: Typosaurus Date: Sun, 19 Jul 2026 18:23:46 +0000 Subject: [PATCH] ticket #67 attempt 1 --- .venv/bin/python | 1 + .venv/bin/python3 | 1 + .venv/bin/python3.11 | 1 + .venv/lib64 | 1 + .venv/pyvenv.cfg | 5 +++++ devplacepy/project_files.py | 25 +++++++++++++++++++------ dpc.log | 8 ++++++++ 7 files changed, 36 insertions(+), 6 deletions(-) create mode 120000 .venv/bin/python create mode 120000 .venv/bin/python3 create mode 120000 .venv/bin/python3.11 create mode 120000 .venv/lib64 create mode 100644 .venv/pyvenv.cfg create mode 100644 dpc.log diff --git a/.venv/bin/python b/.venv/bin/python new file mode 120000 index 00000000..b8a0adbb --- /dev/null +++ b/.venv/bin/python @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/.venv/bin/python3 b/.venv/bin/python3 new file mode 120000 index 00000000..ae65fdaa --- /dev/null +++ b/.venv/bin/python3 @@ -0,0 +1 @@ +/usr/bin/python3 \ No newline at end of file diff --git a/.venv/bin/python3.11 b/.venv/bin/python3.11 new file mode 120000 index 00000000..b8a0adbb --- /dev/null +++ b/.venv/bin/python3.11 @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/.venv/lib64 b/.venv/lib64 new file mode 120000 index 00000000..7951405f --- /dev/null +++ b/.venv/lib64 @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/.venv/pyvenv.cfg b/.venv/pyvenv.cfg new file mode 100644 index 00000000..ba18d0b5 --- /dev/null +++ b/.venv/pyvenv.cfg @@ -0,0 +1,5 @@ +home = /usr/bin +include-system-site-packages = false +version = 3.11.2 +executable = /usr/bin/python3.11 +command = /usr/bin/python3 -m venv /workspace/repo/.venv diff --git a/devplacepy/project_files.py b/devplacepy/project_files.py index 1689ca01..57d8aece 100644 --- a/devplacepy/project_files.py +++ b/devplacepy/project_files.py @@ -468,6 +468,7 @@ def delete_node(project_uid: str, raw_path: str, deleted_by: str = "system") -> {"uid": row["uid"], "deleted_at": stamp, "deleted_by": deleted_by}, ["uid"], ) + _unlink_blob(row) def soft_delete_all_project_files(project_uid: str, deleted_by: str) -> None: @@ -578,9 +579,15 @@ def _export_node(row: dict, dest: Path) -> None: if target.is_symlink(): target.unlink() if row.get("is_binary") and row.get("stored_name") and row.get("directory"): - shutil.copyfile( - PROJECT_FILES_DIR / row["directory"] / row["stored_name"], target - ) + source = PROJECT_FILES_DIR / row["directory"] / row["stored_name"] + try: + shutil.copyfile(source, target) + except (FileNotFoundError, OSError) as exc: + logger.warning( + "Missing blob for node %s (%s): %s", + row.get("uid"), row.get("path"), exc, + ) + return else: target.write_text(row.get("content") or "", encoding="utf-8") @@ -708,9 +715,15 @@ def export_to_dir(project_uid: str, subpath: str, dest_dir) -> int: if target.is_symlink() or target.is_file(): target.unlink() if row.get("is_binary") and row.get("stored_name") and row.get("directory"): - shutil.copyfile( - PROJECT_FILES_DIR / row["directory"] / row["stored_name"], target - ) + source = PROJECT_FILES_DIR / row["directory"] / row["stored_name"] + try: + shutil.copyfile(source, target) + except (FileNotFoundError, OSError) as exc: + logger.warning( + "Missing blob during full export for node %s (%s): %s", + row.get("uid"), row.get("path"), exc, + ) + continue else: target.write_text(row.get("content") or "", encoding="utf-8") written += 1 diff --git a/dpc.log b/dpc.log new file mode 100644 index 00000000..720d90f5 --- /dev/null +++ b/dpc.log @@ -0,0 +1,8 @@ +2026-07-19T17:36:20 INFO logging initialised at /workspace/repo/dpc.log +2026-07-19T17:36:20 DEBUG model=molodetz-pro fps=30 +2026-07-19T17:36:20 INFO read task from file: /workspace/prompts/research-5.txt +2026-07-19T17:36:20 INFO settings merged: model= allow=0 deny=0 ask=0 +2026-07-19T18:22:05 INFO logging initialised at /workspace/repo/dpc.log +2026-07-19T18:22:05 DEBUG model=molodetz-pro fps=30 +2026-07-19T18:22:05 INFO read task from file: /workspace/prompts/execution-1.txt +2026-07-19T18:22:05 INFO settings merged: model= allow=0 deny=0 ask=0