Skip to content

Commit a05cdfe

Browse files
committed
fix(sanity): delete BOOTSTRAP.md instead of emptying it
OpenClaw injects the bootstrap preamble when BOOTSTRAP.md EXISTS, regardless of whether it's empty. Writing empty content still triggers the preamble. Changes: 1. Added workspace_files 'delete: true' support to lib_agent.py 2. Changed sanity task to delete BOOTSTRAP.md instead of emptying it This ensures no bootstrap preamble is injected for the sanity check.
1 parent ed54884 commit a05cdfe

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

BENCHMARK_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0-rc6
1+
2.0.0-rc7

scripts/lib_agent.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,14 @@ def _remove_readonly(func, path, _):
437437
(workspace / fname).write_bytes(content)
438438

439439
for file_spec in task.workspace_files:
440+
# Support delete: true to remove a file (e.g., BOOTSTRAP.md for sanity check)
441+
if file_spec.get("delete"):
442+
dest = workspace / file_spec["path"]
443+
if dest.exists():
444+
dest.unlink()
445+
logger.info("Deleted workspace file: %s", file_spec["path"])
446+
continue
447+
440448
if "content" in file_spec:
441449
dest = workspace / file_spec["path"]
442450
dest.parent.mkdir(parents=True, exist_ok=True)

tasks/task_sanity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ grading_type: automated
66
timeout_seconds: 60
77
workspace_files:
88
- path: BOOTSTRAP.md
9-
content: ""
9+
delete: true
1010
---
1111

1212
## Prompt

0 commit comments

Comments
 (0)