mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-05 12:24:28 +01:00
- I18: the proxy, the cockpit and opencode-web restart only when they are not running, when the run changed what they run, or when they started before a file they read changed (stale_since); units, the proxy copy and the generated opencode config are written only when their content changes. The proxy still follows an engine restart. On 1m, step 7 keeps a fitted pair under the table's bounds (oc-merge-limits.py --keep-lower, and the generator), instead of writing the bounds for the end fit to undo: 49 opencode-web and 36 cockpit starts on 2026-09-23, 79 config backups - I13: engine-inputs.py resolves a branch revision through refs/ and counts the ref, and reads the image wherever it is named (a moving tag); the flash draft vocabulary is built for MODEL_REV=main - I14: an explicit CONTEXT_MODE=native writes the native opencode limits - I15: an oc at ~/.local/bin/oc that is not ours is left alone; the command offered instead carries OPENCODE_CONFIG (I35) - I16/I17: the summary sends clients to the proxy; --no-service names what ./uninstall.sh --list shows, the key-reading provider included - tests: the smoke extraction ends at its own last check; the abort test's fake engine registers a request before its headers, as SGLang does (an abort landed in that gap once in a CI run) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.7 KiB
Python
41 lines
1.7 KiB
Python
#!/usr/bin/env python3
|
|
"""The install summary sends clients to the proxy.
|
|
|
|
It printed http://<host>:$PORT for the OpenAI and Anthropic endpoints: the engine's own
|
|
port, bound to loopback since v1.17, so unreachable from the machine the summary is read
|
|
for, and without the proxy's guards, which refuse what takes the engine down (found in
|
|
review, 2026-09-24). The README has told clients to use :30001 since v1.5.
|
|
"""
|
|
import pathlib
|
|
import re
|
|
import unittest
|
|
|
|
REPO = pathlib.Path(__file__).resolve().parents[1]
|
|
TEXT = (REPO / "install.sh").read_text()
|
|
|
|
|
|
class TheSummaryNamesTheProxy(unittest.TestCase):
|
|
def test_every_client_endpoint_is_the_proxy(self):
|
|
lines = [ln for ln in TEXT.splitlines() if re.search(r'echo " (OpenAI|Anthropic|Clients) +:', ln)]
|
|
self.assertGreaterEqual(len(lines), 3, "the summary's endpoint lines moved")
|
|
for ln in lines:
|
|
self.assertIn("$PROXY_PORT", ln, ln)
|
|
self.assertNotRegex(ln, r":\$PORT\b", ln)
|
|
|
|
|
|
|
|
class TheNoServiceSummaryNamesWhatItLeft(unittest.TestCase):
|
|
"""It said the install lived in two folders, delete those to remove it: the serving
|
|
image, opencode, the oc launcher and the provider added to the user's opencode config
|
|
were left out, and that provider reads the key in one of the two folders, so deleting
|
|
it as told left an opencode that refuses to start (found in review, 2026-09-24)."""
|
|
|
|
def test_it_points_at_the_inventory_and_the_provider(self):
|
|
block = TEXT[TEXT.index("Prepared (no systemd"):TEXT.index("exit 0", TEXT.index("Prepared (no systemd"))]
|
|
self.assertIn("./uninstall.sh --list", block)
|
|
self.assertIn("provider", block)
|
|
self.assertNotIn("delete those to remove", block)
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main(verbosity=2)
|