feat(cli): booth blur <name> with no files fogs the whole booth
The operator: "per booth blurring is now important since we are showing up to 4 images." The Desk is why. Measured on the live set: 84 images across 22 booths on the page he opens first, 10 of them blurred. Before the redesign the index showed one cover per booth; four-up multiplies the exposure by four, and NOTHING POSTED BEFORE THE REDESIGN OPTED INTO THAT. The storage landed with the flag; this is the half that makes it usable before design-dev's control ships. Seventeen handles call this script, so a session posting sensitive work can self-blur AT POST TIME — which is the durable fix, because the operator should not have to police 22 booths by hand. No files named means the whole booth, which is the mental model already: `blur <name> <file>...` was per item and required two arguments, so one argument could only ever have been an error. COMPOSES with the per-item list: `unblur <name>` clears the flag and leaves individual choices exactly as they were, the same promise the resolver makes. Also records both rulings routed this turn: x hides with the other Desk controls, and the theme toggle reaches the chrome inside verbatim pages. Verified under the system python3 with no venv, which is the only way most callers ever run it.
This commit is contained in:
@@ -659,3 +659,40 @@ def test_the_append_happens_INSIDE_the_lock(booth):
|
||||
fcntl.flock(lf, fcntl.LOCK_UN)
|
||||
assert (board / "links.md").read_text() == "", \
|
||||
"the row was appended while another writer held the lock"
|
||||
|
||||
|
||||
def test_blur_with_no_files_fogs_the_whole_booth(booth):
|
||||
"""The Desk shows up to four images from EVERY booth on the page the
|
||||
operator opens first, so a booth that should not be glanced at has to say
|
||||
so as a booth — and the session that posts it is the one that knows.
|
||||
|
||||
Seventeen handles call this script; a verb here is how they self-blur at
|
||||
post time without waiting for anyone to click anything."""
|
||||
data, b = booth
|
||||
(b / "a.png").write_bytes(b"x")
|
||||
|
||||
out = run(data, "blur", "b")
|
||||
assert out.returncode == 0, out.stderr
|
||||
assert (b / ".blurbooth").exists()
|
||||
assert "whole booth blurred" in out.stdout
|
||||
|
||||
out = run(data, "unblur", "b")
|
||||
assert out.returncode == 0, out.stderr
|
||||
assert not (b / ".blurbooth").exists()
|
||||
|
||||
|
||||
def test_unblurring_the_booth_keeps_per_item_choices(booth):
|
||||
"""COMPOSES, never overrides — the same promise the resolver makes. An
|
||||
agent's per-item blur must survive the booth flag being cleared.
|
||||
|
||||
Defeating change: `unblur <name>` also clearing `.blurred`."""
|
||||
data, b = booth
|
||||
for n in ("a.png", "b.png"):
|
||||
(b / n).write_bytes(b"x")
|
||||
|
||||
run(data, "blur", "b", "a.png")
|
||||
run(data, "blur", "b")
|
||||
run(data, "unblur", "b")
|
||||
|
||||
assert not (b / ".blurbooth").exists()
|
||||
assert (b / ".blurred").read_text().strip() == "a.png"
|
||||
|
||||
Reference in New Issue
Block a user