Bootstrap governance without changing what the server exposes #95
Loading…
Reference in a new issue
No description provided.
Delete branch "worktree-agent-a69e9ab70b4a571cb"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
git-collab-server setup --config <path> --admin-key <file|->, themissing bootstrap: governance shipped in
b6dcbb7band the exposure model in1beeb03e, and nothing could create a settings.git. The live deployment provedit — five repositories, no settings repo, governance entirely inert.
An explicit command, never a startup step. Creating settings.git is what puts
the inverted default in force, so a server that seeded one on boot would make
every repository invisible the moment it upgraded.
Which is why the seed reproduces the policy already in force: it reads each
repository's server.toml and writes the rule that means the same thing today,
including
R = @anonymousandoption listed = yeswhere the repo is public.Enabling governance is behaviourally a no-op.
That claim is asserted end to end — stand up a server with repositories of
differing visibility, capture what each exposes over HTTP, run setup, assert
listed/readable/clonable are unchanged for every one. Both mutations of the
generator (closing everything, opening everything) fail that test, so it has
teeth. It is also machine-checked in-process before anything is written, by
parsing the generated rules and asking the real evaluator.
Both files land in one commit, put through
check_roster_has_rulesandvalidate_settings_tree— the same validation a push faces — so setup cannothand-create the roster-without-rules state that guard exists to prevent.
Also: refuses when settings.git exists,
--dry-run, reports the derivedidentity (and proves it works by pushing settings over SSH as that principal),
and leaves authorized_keys alone.
One spec gap found and handled: server.toml has two anonymous switches ([ui]
anonymous and [http] anonymous_clone) and the rule language has one grant
covering both, so a repository setting them differently has no faithful
translation. Setup writes the closed answer and names the repository in the
report and in a comment in the file — a bootstrap may narrow exposure, never
widen it by guessing.
Migrated from git-collab patche
0065cd957ee21a990204ac36c689ec3bbffd692b.Original author: a73x dev@a73x.sh.
Fixes #87
Revision 1:
690c31f46ee29825da4f366bb0f707038b00c944; base9a13fc36a85adc6fc8bf9fcd05de2f842ca6e0cf