cctally 1.60.0 → 1.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -160,6 +160,14 @@ def _is_dev_checkout() -> bool:
160
160
  return (_repo_root() / ".git").exists()
161
161
 
162
162
 
163
+ def is_preview_channel() -> bool:
164
+ """True when running under the maintainer-local preview channel
165
+ (the `cctally-preview` wrapper sets CCTALLY_CHANNEL=preview). Single
166
+ source of truth for every preview-marker surface (dashboard port +
167
+ envelope, TUI header, --version, doctor) so the gate can't drift."""
168
+ return os.environ.get("CCTALLY_CHANNEL") == "preview"
169
+
170
+
163
171
  def _real_prod_data_dir() -> pathlib.Path:
164
172
  """The REAL user's prod data dir (~/.local/share/cctally), resolved from
165
173
  the password database rather than $HOME so it is immune to a faked HOME.