tmux observer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Move StartLimit* keys to [Unit] so systemd honors them

systemd rejects StartLimitIntervalSec and StartLimitBurst in [Service]
(they were renamed to [Unit] in systemd 230). In the previous template
they sat under [Service] and were silently ignored, so the observer had
no crash-loop rate-limiting in practice.

Existing installs pick up the fix on the next `make install-service`
run; no manual migration needed.

+20 -2
+2 -2
src/solstone_tmux/contrib/solstone-tmux.service.in
··· 1 1 [Unit] 2 2 Description=Solstone Tmux Terminal Observer 3 3 After=basic.target 4 + StartLimitIntervalSec=300 5 + StartLimitBurst=5 4 6 5 7 [Service] 6 8 Type=simple ··· 8 10 ExecStart={BINARY} run 9 11 Restart=on-failure 10 12 RestartSec=5 11 - StartLimitIntervalSec=300 12 - StartLimitBurst=5 13 13 14 14 [Install] 15 15 WantedBy=default.target
+18
tests/test_cli.py
··· 132 132 break 133 133 else: 134 134 raise AssertionError("No Environment=PATH= line found") 135 + 136 + def test_start_limit_keys_in_unit_section(self, tmp_path, monkeypatch): 137 + """StartLimit keys are rendered in [Unit], not [Service].""" 138 + binary = tmp_path / "venv" / "bin" / "solstone-tmux" 139 + binary.parent.mkdir(parents=True) 140 + binary.touch() 141 + 142 + content = self._run_install(tmp_path, monkeypatch, binary, "/usr/bin:/bin") 143 + sections = [chunk.lstrip("[") for chunk in content.split("\n[")] 144 + unit_chunk = next(chunk for chunk in sections if chunk.startswith("Unit]")) 145 + service_chunk = next( 146 + chunk for chunk in sections if chunk.startswith("Service]") 147 + ) 148 + 149 + assert "StartLimitIntervalSec=300" in unit_chunk 150 + assert "StartLimitBurst=5" in unit_chunk 151 + assert "StartLimitIntervalSec" not in service_chunk 152 + assert "StartLimitBurst" not in service_chunk