G: EPOD acceptance tests; harness: hide and clean other runs' mid-name objects (proxy, teardown, sweep); lock leak cause (Eclipse restart during a write)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,9 @@ def activation_messages(text, is_error=False):
|
||||
|
||||
|
||||
RUN_PREFIX = re.compile(r"^Z\d[0-9A-Z]{5,6}_", re.I)
|
||||
# The model sometimes names its own helper or test class with the prefix inside the name (ZCL_Z4CGT1HJ_JOB_COST_TEST). Such objects of
|
||||
# other runs stay behind in A4H and show up in lists and searches (57 of 90 accepted trajectories saw them, 2026-10-06).
|
||||
MID_PREFIX = re.compile(r"^[A-Z]{1,5}_(Z\d[0-9A-Z]{6}_)", re.I)
|
||||
|
||||
|
||||
class BudgetExceeded(Exception):
|
||||
@@ -111,7 +114,10 @@ class ToolProxy:
|
||||
|
||||
def _foreign(self, name):
|
||||
n = (name or "").upper()
|
||||
return bool(RUN_PREFIX.match(n)) and not n.startswith(self.prefix)
|
||||
if RUN_PREFIX.match(n):
|
||||
return not n.startswith(self.prefix)
|
||||
m = MID_PREFIX.match(n)
|
||||
return bool(m) and m.group(1).upper() != self.prefix
|
||||
|
||||
def _filter(self, tool, text):
|
||||
if tool == "sap_short_dumps": # only dumps of this run: other runs (and mutants) also write dumps
|
||||
@@ -124,7 +130,7 @@ class ToolProxy:
|
||||
data["count"] = len(data["dumps"])
|
||||
return json.dumps(data)
|
||||
return text
|
||||
if tool not in ("sap_search_object", "sap_usage_references"):
|
||||
if tool not in ("sap_search_object", "sap_usage_references", "sap_inactive_objects"):
|
||||
return text
|
||||
try:
|
||||
data = json.loads(text)
|
||||
@@ -148,7 +154,9 @@ class ToolProxy:
|
||||
else:
|
||||
self.calls += 1
|
||||
name = str(args.get("objectName", "")).upper()
|
||||
if tool in WRITE_TOOLS and self._foreign(name):
|
||||
if (tool in WRITE_TOOLS or tool in ("sap_pull_source", "sap_object_structure", "sap_object_members", "sap_element_info",
|
||||
"sap_run_unit_test", "sap_check_object", "sap_syntax_check", "sap_atc_run")) \
|
||||
and self._foreign(name):
|
||||
result = (True, f"{name} is not available.")
|
||||
else:
|
||||
if tool in WRITE_TOOLS and (tool == "sap_activate" or args.get("activate", True)):
|
||||
|
||||
Reference in New Issue
Block a user