fix: findings from the independent review
Scenario runner: stops when overridden base parameters leave the start out of balance (new field startlikevekt: krev, kalibrer, ubalanse); stops on non-finite results; says that models with a court queue drift slowly even without a shock and prints the drift before the shock; queue in months of inflow; never deletes files it did not write; stricter limits. Check: anchored on the note's own checksums for core and reference files, runs the scenario files too, exact comparison for the diagnosis, honest wording when parts were skipped or an extension is broken. Launcher: unknown field names in input are rejected with a suggestion; unwritable folders give a message, not a traceback. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
2669759f5a
commit
776325c680
14 changed files with 1524 additions and 199 deletions
|
|
@ -70,10 +70,11 @@ def hjem(tmp_path: Path) -> Path:
|
|||
|
||||
@pytest.fixture
|
||||
def kopi(tmp_path: Path) -> Path:
|
||||
"""En kopi av modell/, fasit/ og eksempler/ som testen kan endre. Returnerer kopiens rot."""
|
||||
"""En kopi av modell/, fasit/ og eksempler/ som testen kan endre. Returnerer kopiens rot.
|
||||
|
||||
Kopien er ikke merket som arbeidskopi (ingen LES-MEG.md), som en klone av repoet.
|
||||
"""
|
||||
rot = tmp_path / "kopi"
|
||||
for navn in ("modell", "fasit", "eksempler"):
|
||||
shutil.copytree(ROT / navn, rot / navn, ignore=shutil.ignore_patterns("__pycache__"))
|
||||
for navn in ("scenario.py", "arbeidskopi.py"):
|
||||
(rot / "modell" / navn).unlink(missing_ok=True)
|
||||
return rot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue