#2106·serena

onboarding 编写了一个项目文件,但没有标记为编辑工具

作者: feiiiiii5创建于 2026年9月26日更新于 2026年9月26日

`onboarding` writes a project file but is not marked as an editing tool `OnboardingTool` is the only tool that writes a project file without carrying `ToolMarkerCanEdit`. Two documented promises are enforced through exactly that marker, and both let the write through: - `read_only: true` — `src/serena/resources/project.template.yml:120-122`: "all editing tools will be disabled and attempts to use them will result in an error"; `docs/02-usage/070_security.md:120-121`: "Serena's own editing operations are refused." - `QueryProjectTool` — documented as executing "a read-only tool" in another project, enforced by `assert tool.is_readonly()` (`src/serena/tools/query_project_tools.py:57`). `Tool.is_readonly()` is `not self.can_edit()` (`tools_base.py:279-280`), and `can_edit()` comes from the marker, so the whole question is whether the class carries it. `onboarding` does not, while its four sibling memory tools do — and calling it goes `apply` → `MemoryApi.onboarding` → `ensure_memory_maintenance_memory` → `save_memory` → `write_file_atomic`, creating `.serena/memories/memory_maintenance.md` from the shipped template. I ran this on `main` at `7a296833` against a project with `read_only: true`: 20 editing tools are removed from the tool set and `onboarding` is not one of them; the call then wrote a 2043-byte memory file. No error, no warning. <details><summary>Reproduction, output, and the two possible fixes</summary>