You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
safety.toml entries can be keyed [databases."ENV/DATABASE"] or [databases."ENV/SERVER/DATABASE"], with environments.toml's names,
so a demo database can be made writable without opening production's
database of the same name. A qualified entry applies when patching, in pgman run, and in a TUI session opened from the environments
overview, where it wins over the bare name. A project's [safety]
block tightens qualified entries too.
A patch plan lists every statement a block guard stops, with its
file and line: all of them in the patch it stops at, and those in the
pending patches after it, so one change to safety.toml covers the run.
A patch can allow its own statement past a block guard with -- pgman: allow <guard> on the line before it. The plan names each
one, and confirming takes the environment's name typed, so --yes
doesn't confirm it. A mistyped or misplaced declaration refuses the
patch.
MCP's apply_patches puts a read-only database, or statements a
guard blocks, to the operator instead of refusing: the confirmation
lists each, and typing the environment's name lifts them for that one
run, leaving safety.toml as it is. The agent can't ask for it, and
what a project's .pgman/pgman.toml[safety] refuses on its own is
never lifted. The result's lifted_for_this_run and pgman's log say
what was lifted.
MCP's dump lets the operator confirm a project's masking rules
file that is committed but new or changed since they last confirmed
it, instead of refusing until pgman dump --masked runs at a
terminal. The question shows the file's commit and sha256, every
column it keeps that the defaults would mask, with its reason, and
every null, fixed and hash it sets; typing the database's name
confirms. The agent can't confirm it, a decline records nothing, and
an uncommitted or edited file is still refused. Confirmations, at a
terminal or over MCP, are recorded with when and how.
Fixed
Applying patches when the first pending one is refused (read-only, or
a blocked statement) says "refused, nothing applied" and why. MCP's apply_patches and pgman apply said "nothing to apply", which read
as up to date; the TUI's hint now says the first patch is refused.
A patch refused because the database is read-only names the file and
the narrowest entry to change: the environment's own. It also says
which tools read the change at the next apply, and warns that a bare [databases.<name>] entry opens that name on every server, protected
ones included. :readonly off and pgman run name the same entry.
A safety.toml key that can never match ([databases."a/b/c/d"], or
one with an empty part) is reported in the patch refusal, MCP's doctor and pgman's log rather than ignored.