fix(setup): mounts step writes correct allowlist format and syncs group container_config#418
Open
msaelices wants to merge 1 commit intoqwibitai:mainfrom
Open
fix(setup): mounts step writes correct allowlist format and syncs group container_config#418msaelices wants to merge 1 commit intoqwibitai:mainfrom
msaelices wants to merge 1 commit intoqwibitai:mainfrom
Conversation
…up DB Two bugs fixed in the mounts setup step: 1. The allowlist was written with mode:"rw" which is not the AllowedRoot interface format. mount-security.ts checks allowReadWrite:boolean, so mode:"rw" was silently treated as read-only and the mount was rejected. The step now normalises incoming entries: mode:"rw" → allowReadWrite:true, mode:"ro"/anything else → allowReadWrite:false. Canonical allowReadWrite boolean input is also accepted directly. 2. The step only wrote the allowlist (the security boundary) but never set container_config.additionalMounts on registered groups in the database. container-runner.ts reads additionalMounts from the group DB row to decide what to actually bind-mount into the container, so without this the directories were never mounted even though the allowlist permitted them. The step now upserts each allowed root into additionalMounts for every registered group.
|
This fixes a real pain point — I just hit this during fresh setup. The allowlist gets written correctly but directories are never actually mounted because |
This was referenced Mar 3, 2026
darkostanimirovic
approved these changes
Mar 18, 2026
darkostanimirovic
left a comment
There was a problem hiding this comment.
LGTM - This comprehensively fixes the mount setup issue by both normalizing the allowlist format and syncing to container_config. Tested locally and works perfectly.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two bugs in the
/setupmounts step that together caused additional mounts to be silently ignored even when the user configured them:Wrong allowlist format — the step was writing
mode: "rw"inallowedRootsentries, butmount-security.tschecks forallowReadWrite: boolean. SinceallowReadWritewasundefined(falsy), every read-write mount request was silently downgraded to read-only. The step now normalises incoming entries:mode: "rw"→allowReadWrite: true; canonicalallowReadWriteboolean input is also accepted.container_config never set — the step only wrote the allowlist (the security boundary that gates what can be mounted), but never updated
container_config.additionalMountsin the registered groups table.container-runner.tsreadsgroup.containerConfig?.additionalMountsto decide what to actually bind-mount, so without this the directories were never mounted at all. The step now upserts each allowed root intoadditionalMountsfor every registered group after writing the allowlist.Test plan
/setupand configure a directory (e.g.~/projects) as read-write~/.config/nanoclaw/mount-allowlist.jsoncontainsallowReadWrite: true(notmode: "rw")container_configin SQLite containsadditionalMountswith the correct entry/workspace/extra/<name>inside the container