Persistent extensions on by default, with a deliberate off switch - #298
Merged
Merged
Conversation
|
Coverage
|
An extension without persistence is half-installed: it runs, but its `@name` command namespace never exists and nothing survives a restart. `--allow-persistent-extensions` gated that, so the commonest first experience of the feature was an extension that started and then did none of what its README promised — a gate whose off position silently breaks the feature is one operators discover by being confused. Persistence is durability, not privilege: an endpoint that can install an extension can already run an arbitrary command through CREATE2(HAS_COMMAND). So the default flips to on, and the switch becomes a deliberate off — `--no-persistent-extensions` (or BLIT_ALLOW_EXT_PERSIST=0), which is still the recovery path for a `--restart always` definition that kills each server it starts in. `--allow-persistent-extensions` is gone rather than kept as a hidden no-op; it was never in a real release, so nothing is written against it. clap answers it with "a similar argument exists: --no-persistent- extensions". The NixOS `extensions.persistent` option defaults to true and now passes the env var only to turn persistence off. Verified against a private server: `ext run --persist` installs and reaches `running` with no flags at all; restarting the same state with `--no-persistent-extensions` reports `blocked` with detail "persistent extensions are disabled on this server" and refuses the install with PERMISSION; BLIT_ALLOW_EXT_PERSIST=0 disables it the same way. Co-Authored-By: Claude <noreply@anthropic.com>
pcarrier
force-pushed
the
default-persistent-extensions
branch
from
August 19, 2026 19:44
c451a94 to
6e4d83c
Compare
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.
--allow-persistent-extensionsbecomes the default and the flag is removed. Thegate is now
--no-persistent-extensions(orBLIT_ALLOW_EXT_PERSIST=0).Why
An extension without persistence is half-installed: it runs, but its
@namecommand namespace never exists and nothing survives a restart. So the commonest
first experience of extensions was one that started and then did none of what
its README promised, with
blit ext commandssilently empty. A gate whose offposition quietly breaks the feature is one operators find by being confused.
Persistence is durability, not privilege — an endpoint that can install an
extension can already run an arbitrary command through
CREATE2(HAS_COMMAND),which is the argument docs/design/extensions.md
already makes. What the switch is genuinely good for is recovery: a
--restart alwaysdefinition that sendsC2S_QUITwould otherwise stop everynew server process. That stays, as an explicit off.
What changed
--no-persistent-extensionsrefuses create/update/control and startuprestore;
BLIT_ALLOW_EXT_PERSISTis now read as=0to disable, mirroringthe
BLIT_PROCESS=0/--no-processesprecedent next to it.--allow-persistent-extensionsis deleted, not kept as a hidden no-op — itwas never in a real release. clap answers it with
tip: a similar argument exists: '--no-persistent-extensions'.blit.extensions.persistentdefaults totrueand passes the env varonly to turn persistence off.
PERMISSIONandBLOCKEDdetails no longer name a flag that is now thedefault: "persistent extensions are disabled on this server".
process-compose.ymlande2e/start-servers.shdrop the flag; the RFC,docs/systemd-user-units.md,docs/design/env.md, and both extensionREADMEs are updated.
Verified
Against a private server (short socket path, private
XDG_STATE_HOMEandBLIT_EXTENSION_PATH):ext run --persist --restart always session session.wasminstalls and
ext listshowsrunning.--no-persistent-extensions:ext listshowsblocked,ext statusdetails "persistent extensions are disabled on thisserver", and
ext run --persistfails withpermission denied: persistent extensions are disabled on this server.BLIT_ALLOW_EXT_PERSIST=0disables it the same way.cargo test -p blit-server --lib extension(81 passed), clippy clean onblit-server/blit-cli--all-targets.