From 435f54b382004de28196aa44c9b1d2c7368ae212 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Mon, 7 Sep 2026 01:17:29 +0200 Subject: fix(node): remove --upload-dir rather than document it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Caught in review, and the review was right. The previous commit documented the flag as deprecated so that `--help` and the man page would agree. That solved the wrong problem: the flag contradicts the model this whole refactor exists to establish, and the coherent answer was to delete it. It wrote `upload_dir` into a *brand-new* `[[groups]]` block, and `GroupConfig.__post_init__` reads that key by forcing every other root read-only and appending that path as the one writable one. So `group add --dir X --writable --upload-dir Y` silently made X read-only — two mechanisms deciding which directories accept uploads, one of them invisible, in a group created after the model that replaced it. Gone from the CLI, from `ops.attach_group`, from the loopback API and from the MNP `group_attach` payload, which now carries `writable` instead. The *read* path in `config.py` is deliberately untouched: an existing node.toml using `upload_dir` must keep working, and that is the only legitimate use left. The man page says so under the config key, and no longer lists an option. The test that guarded the deprecation wording now guards its absence — and earned itself immediately by finding a `group add` usage string still offering the flag. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_011pvMdvLBG92jyhvD5pD6us --- man/meshbay-node.1 | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'man') diff --git a/man/meshbay-node.1 b/man/meshbay-node.1 index 890da89..7c7cf96 100644 --- a/man/meshbay-node.1 +++ b/man/meshbay-node.1 @@ -280,15 +280,6 @@ and makes the node treat the directory suddenly disappearing as an unannounced eject rather than as a deletion. . .TP -\fB\-\-upload\-dir\fR \fIpath\fR -Deprecated. A second, read\-write root, used with -.BR "group add" , -from before roots carried their own read\-write flag. Setting it makes every -other root of that group read\-only. Use -.B "meshbay\-node root add" \fIpath\fR \fB\-\-writable\fR -instead. -. -.TP \fB\-\-name\fR \fIname\fR Explicit name for a root, used with .BR "root add" . @@ -442,12 +433,15 @@ named after the directory's basename. Cannot be combined with . .TP .B upload_dir -Deprecated. A separate filesystem path for uploads, from before roots -carried their own read\-write flag. A configuration still using it is -read as a second, writable root and every other root is forced -read\-only. Use -.B writable -on the intended root instead. +Deprecated, and read only. A separate filesystem path for uploads, from before +roots carried their own read\-write flag. An existing configuration using it +still works: it is read as a second, writable root, and every other root of +that group is forced read\-only. Nothing writes it any more \(em there is no +\fB\-\-upload\-dir\fR option \(em because that would be a second mechanism +deciding which directories accept uploads, silently overriding +.BR writable . +To have two writable directories, mark them both +.BR "writable = true" . . .TP .B visibility -- cgit v1.2.3