rlsbl v0.113.0 /rlsbl.observe_allowlist
On this page

The list of argv prefixes a preview may really execute, the written standard every entry satisfies -- no user-visible mutation -- and the category each one declares.

#rlsbl.observe_allowlist

#rlsbl.observe_allowlist

The observe allowlist and the written standard every entry must satisfy.

An observe is a subprocess that really executes under --dry-run instead of being recorded. strictcli matches an argv against these prefixes element-wise by string equality; a match means the run is performed for real and is legal even inside a read_only command. That makes this list the one place where a preview is allowed to touch the outside world, so every entry needs a reason that survives being read out loud.

The standard: no user-visible mutation --------------------------------------

An allowlisted program may not change anything a user would notice.

Legal under the standard:

  • Reads of local state -- the working tree, the object database, refs,

config, the filesystem.

  • Reads of a remote over the network -- an HTTP GET against a registry or

the GitHub API changes nothing on the far side.

  • Cache writes -- a package manager populating its own download cache is

invisible plumbing: it changes no project state, no output, and no later decision. Deleting the cache costs a re-download and nothing else.

Not legal under the standard:

  • Ref updates -- writing any ref, including remote-tracking refs and

FETCH_HEAD. A preview that moves refs has changed the repository.

  • Index writes -- anything that takes index.lock. In a worktree

shared by several sessions the lock is a real hazard, not a formality: a preview must not be able to make a concurrent commit fail.

  • Credential emission -- printing a live token to stdout. A preview

must not put a secret on a pipe, into a captured buffer, or into a log, no matter what the caller intends to do with it.

Consequences of the standard, entry by entry --------------------------------------------

  • git fetch is pinned to the exact argv ``["git", "fetch", "origin",

"--quiet"]rather than the two-token prefix it used to carry. Fetching downloads objects and rewritesFETCH_HEADand the remote-tracking refs, which is a ref update; the narrow prefix keeps the one call site the release flow needs while refusing--pruneand--tags``, which the old prefix silently legalized.

  • git status / git diff / git diff-index carry

--no-optional-locks, both here and at every call site. Without it those commands refresh the index and take index.lock.

  • npm view and go list stay. Both are registry/module reads whose

only write is to the tool's own cache.

  • gh auth token is gone. It printed a live credential to stdout, so

it was never observe-safe under any reading of the standard. Its three former callers now let gh resolve and use the credential internally (gh api), so the token never transits an rlsbl pipe.

Purity, which this list also defines ------------------------------------

rlsbl/data/checks.toml declares each check pure or not, and the rule is stated in terms of this list: a pure check starts only programs whose argv matches one of these prefixes. Two consequences worth recording, because they used to be accidents rather than decisions:

  • local-tag shells out to git tag --list and config-schema can

reach go list on its error path. Both were declared pure under the older "starts no program" rule and were therefore misdeclared. Under the standard above they are legitimately pure, and stay declared that way deliberately.

  • Nine further checks that spawn only read-only local git flipped from impure

to pure for the same reason.

Adding an entry ---------------

Every entry declares a category from :data:OBSERVE_CATEGORIES and a reason. tests/test_observe_allowlist.py asserts the shape (declared category, non-empty reason, at least two tokens) and runs a corpus of known-mutating argvs past every prefix. A new entry that cannot be justified in one of the three categories does not belong here.

#prefixes

python
def prefixes()

The allowlist in the shape strictcli.App takes it.

Search