SAFETY-79: CI fixes - MUTATION.md pointer, no key-taking helper, fixture sized on the aim
checks / unit (pull_request) Successful in 11m36s
infra-pin / fresh (pull_request) Successful in 2s

test_peakguard's over-limit fixture now sizes its load against
cap - margin, so the floor it asks for is exact wherever in the quarter
the suite runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UBtqPrG1mDLXzTEBnhEkkV
This commit is contained in:
glenn schrooyen
2026-09-28 23:37:55 +02:00
co-authored by Claude Opus 5.5
parent 7c4c8f5c66
commit e5a0ba23d7
2 changed files with 7 additions and 9 deletions
+4 -8
View File
@@ -11,6 +11,8 @@ has the record. Drives the REAL Controller through tools/safety79_identity.py.
3. The bill and the reports still use the real cap.
4. Each call site in main.py passes the value its side needs.
5. The setting: default, range, refusals in plain words.
Mutations (MUTATION.md, purged copies) are listed in the pull request.
"""
import ast
@@ -219,14 +221,8 @@ check("test_aim_w: `peak_aim_w()` is cap - margin, and the forecast sizing "
print("\n5. the setting")
def _cfg_pair(key):
"""(default, schema) lines for `key` at two spaces in config.yaml."""
with open(os.path.join(HERE, "config.yaml"), encoding="utf-8") as f:
hits = re.findall(rf"^ {key}:\s*(\S+)", f.read(), re.M)
return hits
_hits = _cfg_pair("peak_margin_w")
with open(os.path.join(HERE, "config.yaml"), encoding="utf-8") as f:
_hits = re.findall(r"^ peak_margin_w:\s*(\S+)", f.read(), re.M)
print(f" config.yaml: {_hits}")
check("config.yaml ships 50, int(0,500), and the in-code mirror matches",
_hits == ["50", "int(0,500)"]