Skip to content

Commit f50c971

Browse files
illeatmyhatclaude
andcommitted
fix(platform-integrations): address CodeRabbit review on PR #266
- entity_io.write_entity_file: sanitize the explicit `filename` arg through slugify() to harden against path traversal (.., /, \ collapse to a safe single segment); slugify is idempotent on already-slugged input so all existing callers/tests stay green. - provenance.read_recall_rows: fix docstring — it returns a list, not a generator, so "Yield ..." becomes "Return a list of ... tuples ...". - EVOLVE.md.j2: add `bash` language to the bare fenced audit_recall command blocks so all rendered platform EVOLVE.md files get a fenced language. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 91fc722 commit f50c971

15 files changed

Lines changed: 16 additions & 16 deletions

File tree

platform-integrations/bob/evolve-lite/EVOLVE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function, command, or flag, verify it still exists before relying on it.
2323
After recall, log which entries you actually opened, so the value of this memory
2424
can be measured over time. Run:
2525

26-
```
26+
```bash
2727
python3 ~/.bob/evolve-lite/audit_recall.py <file> [<file> ...]
2828
```
2929

platform-integrations/bob/evolve-lite/lib/evolve-lite/entity_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def write_entity_file(directory, entity, filename=None, overwrite=False):
382382
type_dir = Path(directory) / entity_type
383383
type_dir.mkdir(parents=True, exist_ok=True)
384384

385-
slug = filename if filename else slugify(entity.get("content", "entity"))
385+
slug = slugify(filename) if filename else slugify(entity.get("content", "entity"))
386386
content = entity_to_markdown(entity)
387387

388388
# Write to a unique temp file first (avoids predictable .tmp collisions)

platform-integrations/bob/evolve-lite/skills/evolve-lite-provenance/scripts/provenance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def locate_trajectory(session_id, evolve_dir, *, project_root=None, home=None):
148148

149149

150150
def read_recall_rows(evolve_dir):
151-
"""Yield ``(session_id, [entity_id, ...])`` for every ``recall`` audit row.
151+
"""Return a list of ``(session_id, [entity_id, ...])`` tuples for every ``recall`` audit row.
152152
153153
Rows with no ``session_id`` or an empty ``entities`` list are skipped.
154154
"""

platform-integrations/claude/plugins/evolve-lite/EVOLVE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ once per memory you saved.
1818
After you read or consult native memories this turn, log which ones you actually
1919
opened, so the value of this memory can be measured over time. Run:
2020

21-
```
21+
```bash
2222
python3 ~/.claude/evolve-lite/audit_recall.py <id> [<id> ...]
2323
```
2424

platform-integrations/claude/plugins/evolve-lite/lib/evolve-lite/entity_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def write_entity_file(directory, entity, filename=None, overwrite=False):
382382
type_dir = Path(directory) / entity_type
383383
type_dir.mkdir(parents=True, exist_ok=True)
384384

385-
slug = filename if filename else slugify(entity.get("content", "entity"))
385+
slug = slugify(filename) if filename else slugify(entity.get("content", "entity"))
386386
content = entity_to_markdown(entity)
387387

388388
# Write to a unique temp file first (avoids predictable .tmp collisions)

platform-integrations/claude/plugins/evolve-lite/skills/evolve-lite/provenance/scripts/provenance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def locate_trajectory(session_id, evolve_dir, *, project_root=None, home=None):
148148

149149

150150
def read_recall_rows(evolve_dir):
151-
"""Yield ``(session_id, [entity_id, ...])`` for every ``recall`` audit row.
151+
"""Return a list of ``(session_id, [entity_id, ...])`` tuples for every ``recall`` audit row.
152152
153153
Rows with no ``session_id`` or an empty ``entities`` list are skipped.
154154
"""

platform-integrations/claw-code/plugins/evolve-lite/EVOLVE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function, command, or flag, verify it still exists before relying on it.
2323
After recall, log which entries you actually opened, so the value of this memory
2424
can be measured over time. Run:
2525

26-
```
26+
```bash
2727
python3 ~/.claw/evolve-lite/audit_recall.py <file> [<file> ...]
2828
```
2929

platform-integrations/claw-code/plugins/evolve-lite/lib/evolve-lite/entity_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def write_entity_file(directory, entity, filename=None, overwrite=False):
382382
type_dir = Path(directory) / entity_type
383383
type_dir.mkdir(parents=True, exist_ok=True)
384384

385-
slug = filename if filename else slugify(entity.get("content", "entity"))
385+
slug = slugify(filename) if filename else slugify(entity.get("content", "entity"))
386386
content = entity_to_markdown(entity)
387387

388388
# Write to a unique temp file first (avoids predictable .tmp collisions)

platform-integrations/claw-code/plugins/evolve-lite/skills/evolve-lite/provenance/scripts/provenance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def locate_trajectory(session_id, evolve_dir, *, project_root=None, home=None):
148148

149149

150150
def read_recall_rows(evolve_dir):
151-
"""Yield ``(session_id, [entity_id, ...])`` for every ``recall`` audit row.
151+
"""Return a list of ``(session_id, [entity_id, ...])`` tuples for every ``recall`` audit row.
152152
153153
Rows with no ``session_id`` or an empty ``entities`` list are skipped.
154154
"""

platform-integrations/codex/plugins/evolve-lite/EVOLVE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function, command, or flag, verify it still exists before relying on it.
2323
After recall, log which entries you actually opened, so the value of this memory
2424
can be measured over time. Run:
2525

26-
```
26+
```bash
2727
python3 ~/.codex/evolve-lite/audit_recall.py <file> [<file> ...]
2828
```
2929

0 commit comments

Comments
 (0)