Skip to content
Closed
9 changes: 6 additions & 3 deletions src/pyob/entrance.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def __init__(self, target_dir: str):
self.analysis_path = os.path.join(self.pyob_dir, "ANALYSIS.md")
self.history_path = os.path.join(self.pyob_dir, "HISTORY.md")
self.symbols_path = os.path.join(self.pyob_dir, "SYMBOLS.json")
self.memory_path = os.path.join(
self.pyob_dir, "MEMORY.md"
) # For interactive memory editor
self.llm_engine = AutoReviewer(self.target_dir)
self.code_parser = CodeParser()
self.ledger = self.load_ledger()
Expand Down Expand Up @@ -347,8 +350,8 @@ def execute_targeted_iteration(self, iteration: int):
)
for f_name in self.ENGINE_FILES:
src = os.path.join(self.target_dir, "src", "pyob", f_name)
if not os.path.exists(src):
src = os.path.join(self.target_dir, f_name)
# Assuming src/pyob is the canonical location for engine files,
# consistent with PYTHONPATH setup in reboot_pyob.
if os.path.exists(src):
shutil.copy(src, str(pod_path))
except Exception as e:
Expand Down Expand Up @@ -567,7 +570,7 @@ def detect_symbolic_ripples(
changed_text = "\n".join(
[line for line in diff if line.startswith("+") or line.startswith("-")]
)
potential_symbols = set(re.findall(r"([a-zA-Z0-9_$]{4,})", changed_text))
potential_symbols = set(re.findall(r"\b[a-zA-Z_][a-zA-Z0-9_]*\b", changed_text))
impacted_files = []
for sym in potential_symbols:
if self.ledger["definitions"].get(sym) == source_file:
Expand Down
Loading