diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-07 01:17:29 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-07 01:17:29 +0200 |
| commit | 435f54b382004de28196aa44c9b1d2c7368ae212 (patch) | |
| tree | 7cb177304de9acba08813fdbc8611742254d357d /docs | |
| parent | 2d3cbdec301c592daa2faff8e1ca1cab155ebb58 (diff) | |
| download | meshbay-435f54b382004de28196aa44c9b1d2c7368ae212.tar.gz | |
fix(node): remove --upload-dir rather than document it
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011pvMdvLBG92jyhvD5pD6us
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/refactor-groups.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/refactor-groups.md b/docs/refactor-groups.md index d63d858..147afda 100644 --- a/docs/refactor-groups.md +++ b/docs/refactor-groups.md @@ -859,6 +859,16 @@ flag is the same opt-in shape as `transport.js`'s `?trace=1`. ### The CLI +**`--upload-dir` is gone, not deprecated.** It was documented as the old +spelling first, which was wrong and was caught in review. 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. The +*read* path stays, because an existing node.toml must keep working; that is the +only legitimate use, and nothing writes the key any more. + `member upload` reached the generic usage line for the other `member` verbs — "usage: meshbay-node member upload <username>" — which advertises a removed feature and sends the operator looking for a username it would then reject. It |