chore: archive mac mini automation baseline

This commit is contained in:
Adolfo Reyna
2026-08-03 11:47:09 -04:00
parent a0a26565f0
commit 6e2117188e
93 changed files with 10005 additions and 5 deletions
+1 -1
View File
@@ -27,5 +27,5 @@ def test_unit_content_matches_desktop_client_gui_session():
assert SERVICE_NAME == "reyna-desktop-client.service"
assert "Environment=WAYLAND_DISPLAY=wayland-0" in content
assert "Environment=XDG_RUNTIME_DIR=/run/user/1000" in content
assert "ExecStart=/usr/bin/python3 /home/adolforeyna/Projects/Screen/desktop_client/client.py" in content
assert "ExecStart=/usr/bin/python3 /Users/adolforeyna/Projects/Screen/desktop_client/client.py" in content
assert "Restart=always" in content
+77
View File
@@ -0,0 +1,77 @@
import json
from pathlib import Path
from typer.testing import CliRunner
from reyna_cli.cli import app
from reyna_cli.remarkable import build_launch_agent, build_sync_agent, data_root, extract_page_ids, parse_udp_message
runner = CliRunner()
def test_parse_udp_message_preserves_paperpro_identity_and_document_change():
message = (
"device=paperpro ts=2026-08-03T03:20:00Z ip=192.168.68.136 "
"event=document_change details=uuid=abc name=Quick_sheets file=abc/page.rm"
)
parsed = parse_udp_message(message)
assert parsed["device"] == "paperpro"
assert parsed["event"] == "document_change"
assert parsed["ip"] == "192.168.68.136"
assert parsed["details"] == "uuid=abc name=Quick_sheets file=abc/page.rm"
def test_extract_page_ids_handles_paperpro_cpages_last_opened_shape():
assert extract_page_ids({"cPages": {"lastOpened": {"value": "current-page"}}}) == ["current-page"]
def test_data_root_honors_environment_override(tmp_path, monkeypatch):
expected = tmp_path / "paperpro"
monkeypatch.setenv("REYNA_REMARKABLE_ROOT", str(expected))
assert data_root() == expected
def test_launch_agent_runs_reyna_cli_udp_listener_from_configured_root(tmp_path):
plist = build_launch_agent(
python_bin=Path("/usr/bin/python3"),
cli_module="reyna_cli.cli",
root=tmp_path / "paperpro",
)
serialized = json.dumps(plist)
assert plist["Label"] == "com.reynafamily.reyna-cli.remarkable-listener"
assert plist["ProgramArguments"] == [
"/usr/bin/python3",
"-m",
"reyna_cli.cli",
"remarkable",
"listen",
]
assert plist["KeepAlive"] is True
assert "REYNA_REMARKABLE_ROOT" in serialized
def test_sync_agent_runs_every_thirty_seconds_with_same_local_root(tmp_path):
plist = build_sync_agent(
python_bin=Path("/usr/bin/python3"),
cli_module="reyna_cli.cli",
root=tmp_path / "paperpro",
)
assert plist["Label"] == "com.reynafamily.reyna-cli.remarkable-sync"
assert plist["ProgramArguments"][-2:] == ["remarkable", "sync"]
assert plist["StartInterval"] == 30
assert plist["RunAtLoad"] is True
def test_remarkable_cli_exposes_service_management():
result = runner.invoke(app, ["remarkable", "--help"])
assert result.exit_code == 0
assert "listen" in result.stdout
assert "service-install" in result.stdout
assert "service-status" in result.stdout