Skip to content

The agent that grows with you

docs(state): call the macOS synchronous rule a floor, not a pin

Jack Lau19445707087a
diff --git a/cli-config.yaml.example b/cli-config.yaml.example
index e9d26f4c152..37248c3f953 100644
--- a/cli-config.yaml.example
+++ b/cli-config.yaml.example
@@ -22,8 +22,9 @@ database:
# (or 0-3). Unset leaves SQLite's default, which is baked in at compile time
# (SQLITE_DEFAULT_WAL_SYNCHRONOUS) and therefore differs between the bundled
# interpreter, a distro python3 and a Homebrew one. Set it if you need to
- # know which one you are running rather than infer it. macOS is always held
- # at FULL regardless: Darwin's fsync() does not guarantee write ordering.
+ # know which one you are running rather than infer it. On macOS this is a
+ # floor, not a pin: values below FULL are refused because Darwin's fsync()
+ # does not guarantee write ordering, while EXTRA is honored normally.
# synchronous: FULL
# =============================================================================
diff --git a/tests/test_state_synchronous_pragma.py b/tests/test_state_synchronous_pragma.py
index d903a6500b6..6c565e1eae0 100644
--- a/tests/test_state_synchronous_pragma.py
+++ b/tests/test_state_synchronous_pragma.py
@@ -226,3 +226,22 @@ def test_example_config_documents_the_key():
text = Path(__file__).resolve().parents[1] / "cli-config.yaml.example"
body = text.read_text(encoding="utf-8")
assert "synchronous: FULL" in body
+
+
+def test_example_config_calls_the_darwin_rule_a_floor_not_a_pin():
+ """The macOS wording has to match _apply_synchronous_pragma's actual rule.
+
+ Saying macOS is "always held at FULL" reads as "your setting is ignored
+ here", which would talk an operator out of choosing EXTRA -- the one level
+ that IS honored on Darwin. Only sub-FULL values are refused. The wording
+ is the whole interface for a key nobody can otherwise observe, so pin the
+ distinction rather than just the key's presence.
+ """
+ from pathlib import Path
+
+ body = (
+ Path(__file__).resolve().parents[1] / "cli-config.yaml.example"
+ ).read_text(encoding="utf-8")
+ assert "floor, not a pin" in body
+ assert "EXTRA is honored" in body
+ assert "always held" not in body