In-place E/I: G2 needs a changed seed contract object, G4 skips it; regenerate G0009/G0013/G0016/G0023 as G0188-G0191

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
Kral
2026-10-03 06:33:33 +02:00
parent 3550f0b651
commit fb576b0954
7 changed files with 33 additions and 11 deletions

View File

@@ -174,6 +174,11 @@ def lint_files(b):
errs.append(f"{rel}: name {name} has {len(name)} characters (ABAP max 30)")
t = b.get("task", {})
oos = {n.upper() for n in t.get("out_of_scope", [])}
if t.get("category") in ("E", "I"):
seed_names = {o.get("name", "").upper() for o in t.get("seed", [])}
if not any(c.get("name", "").upper() in seed_names for c in t.get("contract", [])):
errs.append(f"category {t['category']}: the contract object must be the seed object that the model "
"changes in place (same name in seed, contract and reference)")
test_names = {o.get("name", "").upper() for o in t.get("hidden_tests", [])}
for o in t.get("reference", []):
name = o.get("name", "")
@@ -384,6 +389,7 @@ def generate(task_id, pool, object_type, category, difficulty, model, base_url,
messages.append({"role": "assistant", "content": text})
try:
b = parse_bundle(text)
b.get("task", {}).setdefault("category", category)
found = {"structure": check_bundle(b), "static": lint_files(b), "abaplint": abaplint_files(b)}
except Exception as e: # noqa: BLE001
b, found = None, {"json": [f"invalid JSON: {e}"]}