feat(identity): rename user-visible identity to voculinux with one-time legacy import
The fork takes its own name everywhere a user can see it: binaries (voculinux, voculinux-gui), desktop entry, autostart, tray, D-Bus namespace (com.voculinux.Voculinux, no alias for the old name), config/data/cache dirs, single-instance lock, IBus engine identity, tray icons, resource prefixes, VOCULINUX_* environment names, and the update-checker user agent. The internal Python module stays vocalinux and the distribution metadata keeps the upstream URLs as provenance. On first run a previous Vocalinux install's config.json, custom dictionary, and portal restore token are copied once into the new locations (new config always wins, no merge, no write-back); models re-resolve through the pinned-checksum download path. An offline naming-sweep test proves no old-name strings remain on user-visible surfaces outside the allowlist. Refs #18
This commit is contained in:
+41
-26
@@ -7,7 +7,7 @@ Seams under test (per spec Testing Decisions):
|
||||
the rename ticket must flip (or deliberately keep) without network access.
|
||||
|
||||
No user-visible behaviour, name, path, or string changes: all asserted values
|
||||
are the pre-rename Vocalinux/vocalinux literals.
|
||||
are the pre-rename Voculinux/voculinux literals.
|
||||
"""
|
||||
|
||||
import ast
|
||||
@@ -26,27 +26,27 @@ def _load_identity():
|
||||
def test_central_values_are_current_names():
|
||||
"""Shared definition still carries the pre-rename literals."""
|
||||
identity = _load_identity()
|
||||
assert identity.APP_NAME == "Vocalinux"
|
||||
assert identity.APP_ID == "vocalinux"
|
||||
assert identity.APP_DIR_NAME == "vocalinux"
|
||||
assert identity.CLI_PROG == "vocalinux"
|
||||
assert identity.BUS_NAME == "com.vocalinux.Vocalinux"
|
||||
assert identity.OBJECT_PATH == "/com/vocalinux/Vocalinux"
|
||||
assert identity.INTERFACE_NAME == "com.vocalinux.Vocalinux"
|
||||
assert identity.DESKTOP_FILENAME == "vocalinux.desktop"
|
||||
assert identity.DESKTOP_ICON_NAME == "vocalinux"
|
||||
assert identity.ENGINE_NAME == "vocalinux"
|
||||
assert identity.ENGINE_LONGNAME == "Vocalinux"
|
||||
assert identity.COMPONENT_NAME == "org.freedesktop.IBus.Vocalinux"
|
||||
assert identity.IBUS_DIR_NAME == "vocalinux-ibus"
|
||||
assert identity.UPDATE_CHECKER_USER_AGENT == "Vocalinux-UpdateChecker"
|
||||
assert identity.RESOURCE_DIR_NAME == "vocalinux"
|
||||
assert identity.VERIFICATION_STAMP_NAME == ".vocalinux_verified"
|
||||
assert identity.LOG_FILE_PREFIX == "vocalinux_logs_"
|
||||
assert identity.PORTAL_TOKEN_PREFIX == "vocalinux_"
|
||||
assert identity.ENV_FORCE_BACKEND == "VOCALINUX_FORCE_BACKEND"
|
||||
assert identity.ENV_INJECT_MODIFIER_WAIT == "VOCALINUX_INJECT_MODIFIER_WAIT"
|
||||
assert identity.ENV_YDOTOOL_KEY_DELAY == "VOCALINUX_YDOTOOL_KEY_DELAY"
|
||||
assert identity.APP_NAME == "Voculinux"
|
||||
assert identity.APP_ID == "voculinux"
|
||||
assert identity.APP_DIR_NAME == "voculinux"
|
||||
assert identity.CLI_PROG == "voculinux"
|
||||
assert identity.BUS_NAME == "com.voculinux.Voculinux"
|
||||
assert identity.OBJECT_PATH == "/com/voculinux/Voculinux"
|
||||
assert identity.INTERFACE_NAME == "com.voculinux.Voculinux"
|
||||
assert identity.DESKTOP_FILENAME == "voculinux.desktop"
|
||||
assert identity.DESKTOP_ICON_NAME == "voculinux"
|
||||
assert identity.ENGINE_NAME == "voculinux"
|
||||
assert identity.ENGINE_LONGNAME == "Voculinux"
|
||||
assert identity.COMPONENT_NAME == "org.freedesktop.IBus.Voculinux"
|
||||
assert identity.IBUS_DIR_NAME == "voculinux-ibus"
|
||||
assert identity.UPDATE_CHECKER_USER_AGENT == "Voculinux-UpdateChecker"
|
||||
assert identity.RESOURCE_DIR_NAME == "voculinux"
|
||||
assert identity.VERIFICATION_STAMP_NAME == ".voculinux_verified"
|
||||
assert identity.LOG_FILE_PREFIX == "voculinux_logs_"
|
||||
assert identity.PORTAL_TOKEN_PREFIX == "voculinux_"
|
||||
assert identity.ENV_FORCE_BACKEND == "VOCULINUX_FORCE_BACKEND"
|
||||
assert identity.ENV_INJECT_MODIFIER_WAIT == "VOCULINUX_INJECT_MODIFIER_WAIT"
|
||||
assert identity.ENV_YDOTOOL_KEY_DELAY == "VOCULINUX_YDOTOOL_KEY_DELAY"
|
||||
|
||||
|
||||
def _imports_app_identity(path: Path) -> bool:
|
||||
@@ -108,13 +108,13 @@ def test_source_pinned_literals_reserved_for_rename():
|
||||
"""
|
||||
about = (SRC_ROOT / "ui" / "settings_about.py").read_text(encoding="utf-8")
|
||||
for literal in (
|
||||
'VOCALINUX_SITE_URL = "https://vocalinux.com"',
|
||||
'title="Vocalinux"',
|
||||
'get_icon_path("vocalinux")',
|
||||
'VOCULINUX_SITE_URL = "https://voculinux.com"',
|
||||
'title="Voculinux"',
|
||||
'get_icon_path("voculinux")',
|
||||
):
|
||||
assert literal in about, literal
|
||||
pad = (SRC_ROOT / "ui" / "dictation_pad.py").read_text(encoding="utf-8")
|
||||
assert 'window.set_title("Vocalinux Dictation Pad")' in pad
|
||||
assert 'window.set_title("Voculinux Dictation Pad")' in pad
|
||||
|
||||
|
||||
def test_rename_inventory_files_exist():
|
||||
@@ -134,3 +134,18 @@ def test_retained_inventory_records_internal_names():
|
||||
import vocalinux
|
||||
|
||||
assert vocalinux.__name__ == "vocalinux"
|
||||
|
||||
|
||||
def test_legacy_names_recorded_and_unclaimed():
|
||||
"""The old install identity is recorded for the one-time import only.
|
||||
|
||||
No compatibility alias: the legacy D-Bus name differs from the claimed
|
||||
one, and no source claims it.
|
||||
"""
|
||||
identity = _load_identity()
|
||||
assert identity.LEGACY_APP_DIR_NAME == "vocalinux"
|
||||
assert identity.LEGACY_APP_DIR_NAME != identity.APP_DIR_NAME
|
||||
assert identity.LEGACY_BUS_NAME == "com.vocalinux.Vocalinux"
|
||||
assert identity.LEGACY_BUS_NAME != identity.BUS_NAME
|
||||
service = (SRC_ROOT / "dbus_service.py").read_text(encoding="utf-8")
|
||||
assert identity.LEGACY_BUS_NAME not in service
|
||||
|
||||
Reference in New Issue
Block a user