feat(orchestrator)!: S0 English everywhere, Sécurité, NATO hashes, ICAO digits
Requirement 001 phase 6, S0: - Speech: the security class shows as "Sécurité" and is spoken as in maritime radio, "say-cure-ee-tay" three times. A hex run of 7 or more characters with a letter and a digit (commit, session, message ids) is spelled in the NATO alphabet; every other digit is spoken on its own in ICAO pronunciation (42305: four two tree zero fife). The spelling runs inside clip() before the length cut, so a phrase still fits SPEECH_LIMIT; the displayed text keeps its digits and hashes. - English: every orchestrator label, tooltip, message, error, script output, document and test string is English (Regeln -> Firewall, Hierarchie -> Hierarchy, Steuerung -> Controls, Ausführen -> Run, ...); the page declares lang="en" and formats dates as en-GB. Task filter ids are English. German stays only in the skill trigger phrases that quote the operator, and as identifiers: the view keys (view=) and the leitstand id. - tests/test_english.py scans every tracked text file for umlauts and German words, with an allowlist of the quoted trigger phrases. BREAKING CHANGE: the Stream search tokens art: and seit: are now kind: and since:; an old art: or seit: token counts as a plain word. Evidence: make test 657 OK, ruff and markdownlint clean (/tmp/s0-make-test-1.log); e2e 17 OK, none skipped (/tmp/s0-e2e-1.log); MEDUSA 86 files, 24 findings on reworded strings accepted after an independent skeptic (21 path:line, 0 rejected, no behaviour change in signing, approving, rules, denying, offices, events), rescan 0 open. 🎯 Fix: 93 % 💥 Break: 4 % 💸 Cost: 100 % ⏱️ Time: – 🛡️ Security: 100 % 🏆 Score: 89 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a388c6ef77
commit
c035373518
86 files changed
+1027
-930
No files matched your search
@@ -17,18 +17,18 @@ from .register import status_of
|
||||
from .transcripts import LOG_KEEP, STREAM_CUT, STREAM_KINDS
|
||||
|
||||
KINDS = (
|
||||
("radio", "Funk"), ("review", "Reviews"), ("ask", "Asks"), ("decision", "Entscheidungen"), ("operator", "Operator"), ("register", "Register"),
|
||||
("rename", "Namen"), ("cron", "Crons"), ("rule", "Regeln"), ("approval", "Freigaben"), ("run", "Runner"), ("transcript", "Transkripte"),
|
||||
("radio", "Radio"), ("review", "Reviews"), ("ask", "Asks"), ("decision", "Decisions"), ("operator", "Operator"), ("register", "Register"),
|
||||
("rename", "Names"), ("cron", "Crons"), ("rule", "Firewall"), ("approval", "Grants"), ("run", "Runner"), ("transcript", "Transcripts"),
|
||||
)
|
||||
EVENT_KINDS = tuple(name for name, _ in KINDS)
|
||||
WORK = [name for name in EVENT_KINDS if name not in ("radio", "transcript")]
|
||||
VIEWS = {
|
||||
"fuer-dich": {"label": "Für dich", "kinds": ["radio", *WORK], "waiting": True},
|
||||
"funk": {"label": "Funk", "kinds": ["radio"], "waiting": False},
|
||||
"arbeit": {"label": "Arbeit", "kinds": WORK, "waiting": False},
|
||||
"transkripte": {"label": "Transkripte", "kinds": ["transcript"], "waiting": False},
|
||||
"fuer-dich": {"label": "For you", "kinds": ["radio", *WORK], "waiting": True},
|
||||
"funk": {"label": "Radio", "kinds": ["radio"], "waiting": False},
|
||||
"arbeit": {"label": "Work", "kinds": WORK, "waiting": False},
|
||||
"transkripte": {"label": "Transcripts", "kinds": ["transcript"], "waiting": False},
|
||||
}
|
||||
ART = {word: name for name, label in KINDS for word in (name, label.lower())}
|
||||
KIND_WORDS = {word: name for name, label in KINDS for word in (name, label.lower())}
|
||||
SPAN = re.compile(r"(\d{1,4})([mhd])")
|
||||
UNITS = {"m": 60, "h": 3600, "d": 86400}
|
||||
|
||||
@@ -44,14 +44,14 @@ def since_of(word: str, now: float) -> float:
|
||||
try:
|
||||
return datetime.datetime.fromisoformat(word).timestamp()
|
||||
except ValueError:
|
||||
raise ToolError("seit: takes 30m, 2h, 3d or a date like 2026-11-06 or 2026-11-06T08:30") from None
|
||||
raise ToolError("since: takes 30m, 2h, 3d or a date like 2026-11-06 or 2026-11-06T08:30") from None
|
||||
|
||||
|
||||
def search(text: str, now: float) -> dict:
|
||||
"""Args:
|
||||
text: the search line: words, `agent:<name>`, `art:<kind or label>`
|
||||
and `seit:<span or date>`.
|
||||
now: the clock `seit:` spans count back from.
|
||||
text: the search line: words, `agent:<name>`, `kind:<kind or label>`
|
||||
and `since:<span or date>`.
|
||||
now: the clock `since:` spans count back from.
|
||||
|
||||
Returns:
|
||||
The plain words as `q`, plus `agent`, `kinds` and `since` for each
|
||||
@@ -60,16 +60,16 @@ def search(text: str, now: float) -> dict:
|
||||
found: dict = {"q": []}
|
||||
for word in text.split():
|
||||
key, colon, value = word.partition(":")
|
||||
if not colon or key not in ("agent", "art", "seit"):
|
||||
if not colon or key not in ("agent", "kind", "since"):
|
||||
found["q"].append(word)
|
||||
elif not value:
|
||||
raise ToolError(f"{key}: needs a value")
|
||||
elif key == "agent":
|
||||
found["agent"] = value
|
||||
elif key == "art":
|
||||
if value.lower() not in ART:
|
||||
raise ToolError(f"art: takes one of {', '.join(EVENT_KINDS)}")
|
||||
found.setdefault("kinds", set()).add(ART[value.lower()])
|
||||
elif key == "kind":
|
||||
if value.lower() not in KIND_WORDS:
|
||||
raise ToolError(f"kind: takes one of {', '.join(EVENT_KINDS)}")
|
||||
found.setdefault("kinds", set()).add(KIND_WORDS[value.lower()])
|
||||
else:
|
||||
found["since"] = since_of(value, now)
|
||||
found["q"] = " ".join(found["q"]).lower()
|
||||
@@ -128,7 +128,7 @@ def register_changes(before: dict[str, dict], after: dict[str, dict], now: float
|
||||
continue
|
||||
if old is None or new is None:
|
||||
row = new if old is None else old
|
||||
change = f"neu: {shown(row.get('title'))}" if old is None else "entfernt"
|
||||
change = f"new: {shown(row.get('title'))}" if old is None else "removed"
|
||||
else:
|
||||
keys = sorted(key for key in set(old) | set(new) if old.get(key) != new.get(key))
|
||||
change = "; ".join(f"{key}: {described(old.get(key))} → {described(new.get(key))}" for key in keys)
|
||||
|
||||
Reference in new issue
Block a user