-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
memory-wiki: "Refusing to write imported source page through symlink" fires for non-symlink FsSafeError causes #83740
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
wiki_status(and any bridge import write) reportsRefusing to write imported source page through symlink: <path>even when no symlink exists anywhere on the page path. The catch inwriteImportedSourcePagere-wraps everyFsSafeErrorwith a "through symlink" message, hiding the real cause (in my case, a restrictive-permissions/atomic-replace failure on a bridge-imported page written at mode 600).Where
extensions/memory-wiki/src/source-page-shared.ts, inwriteImportedSourcePage:FsSafeErrorcovers a family of codes (invalid-path,outside-workspace,path-alias, plus the symlink-parent / perms hardening from #66636, #69797/8, #80331). Any of them surface as "through symlink", which is misleading.extensions/memory-wiki/src/bridge.test.tsasserts on the exact "through symlink" string, so changing the message has a test impact — flagging in case maintainers want to decide direction.Repro
600in an otherwise normal (non-symlinked) directory tree. In my case this happened on first write because the source file (workspace-bulletin/memory/.dreams/events.jsonl) was 600 and the writer inherited restrictive perms.wiki_status, which re-runs imported-source writes).Result:
Error: Refusing to write imported source page through symlink: wiki/main/sources/<page>.md— even thoughrealpathof every component shows no symlink.In my case:
wiki/main/sources/bridge-workspace-bulletin-075c90ca-memory-dreams-events-jsonl-38a7dd37.md-rw-------(only file insources/with that mode; all others 664)Expected
Either:
FsSafeError.code(e.g.Refusing to write imported source page (perms-denied): <path>), orFsSafeErrors bubble with their own message.Either way: surface the real reason so users can fix it (in my case,
chmod 644resolves it instantly once you know what's happening).Sketch fix
bridge.test.tswould need its assertion updated alongside.Environment
npm i -g openclaw(whichever was current on 2026-05-18 NZT)Happy to send a PR if maintainers confirm the preferred direction (message rewrite vs. tightened catch).