From 786786d766804a87cc6322d97294eca22b0d5bd5 Mon Sep 17 00:00:00 2001 From: Meta Alchemist Date: Wed, 24 Jun 2026 13:18:12 +0400 Subject: [PATCH 01/15] fix: replace hardcoded Desktop path in registry DEFAULT_LAB_PATH registry.py DEFAULT_LAB_PATH hardcoded ~/Desktop/spark-personality-chip-labs/personalities, which breaks installs that don't have the lab checked out on the Desktop. Switch the default to the platform-safe ~/.spark/spark-personality-chip-labs/personalities location, consistent with the search paths already prioritized in chip_loader.DEFAULT_CHIP_LAB_PATHS. Narrowed from PR #28: the chip_loader.py hunk was dropped because HEAD already prioritizes ~/.spark/modules/... and ~/.spark/... ahead of Desktop and uses the stronger guard 'spark-personality-chip-labs' in path.parts (a better impl than the PR's 'in str(path)'). Only the still-unfixed registry.py one-line default is landed here. Co-authored-by: johncrossu Co-Authored-By: Claude Opus 4.8 --- src/spark_character/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spark_character/registry.py b/src/spark_character/registry.py index f3f0632..5935bd2 100644 --- a/src/spark_character/registry.py +++ b/src/spark_character/registry.py @@ -42,7 +42,7 @@ from .chip_loader import PersonalityChip, default_chip_lab_paths, validate_chip_yaml_spec DEFAULT_LAB_PATH = Path(os.path.expanduser( - "~/Desktop/spark-personality-chip-labs/personalities" + "~/.spark/spark-personality-chip-labs/personalities" )) From 230de943c5d303da539d6050b9412a18ca71387b Mon Sep 17 00:00:00 2001 From: Meta Alchemist Date: Thu, 25 Jun 2026 18:32:50 +0400 Subject: [PATCH 02/15] fix(security): detect .env exfiltration in prompt-guard secret pattern The secret-exfiltration guard used \b before the alternation, but \b does not match between a non-word char (.) and a word char in '.env', so 'curl ... .env' slipped past. Replace the leading \b with a (? --- src/spark_character/prompt_guard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spark_character/prompt_guard.py b/src/spark_character/prompt_guard.py index 97657d1..6f6b294 100644 --- a/src/spark_character/prompt_guard.py +++ b/src/spark_character/prompt_guard.py @@ -28,7 +28,7 @@ re.compile(PROMPT_BOUNDARY_PREFIX + r"(system|developer)\s+(prompt|message|instruction)s?\b.*\b(override|replace|ignore)\b", re.I), ), ("hidden-html", re.compile(r"