MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / failed_native

Function failed_native

tests/coverage_live_v2_native.py:218–241  ·  view source on GitHub ↗
(context, case)

Source from the content-addressed store, hash-verified

216
217
218def failed_native(context, case):
219 registry = context.registry(case)
220 process, destination = context.collect(case, registry, fault=True)
221 fault = json_read(case / "native-fault.json")
222 children = fault.get("children", [])
223 require(len(children) == 1, "native failure boundary was not reached (missing integration on baseline)")
224 child = children[0]
225 require(child.get("argv") == [context.runner, SUITE] and child.get("rlimit_nofile") == 7
226 and child.get("start_new_session") is True, "native fault custody boundary changed")
227 if not isinstance(child.get("exit"), int) or child["exit"] <= 0:
228 raise Infrastructure("fixed native RLIMIT_NOFILE=7 failure precondition unmet; no tuning/retry")
229 raw = retained_profiles(destination)
230 parents = [path for path in raw if path.name == TESTS[0] + ".parent.profraw"]
231 if len(parents) != 1:
232 raise Infrastructure("native fixed fault failed before genuine first-parent evidence existed")
233 actual = convert(context, parents[0], "failed-native-parent-text")
234 require(set(actual) == set(context.universe), "native failure parent universe changed")
235 require(any(any(values) for values in actual.values()), "failed native parent has no observed counters")
236 require(process["exit"] == 1, "native suite failure must publish conservative bundle and exit1")
237 rows, _, _ = bundle(context, destination, registry, TESTS, "failed", child["exit"])
238 require(all(b"suite_failed" in reasons for reasons, _ in rows.values()),
239 "failed native suite rows lost failure reason")
240 return {"native_exit": child["exit"], "fault": fault, "genuine_parent": str(parents[0]),
241 "bundle": str(destination), "all_rows_incomplete": True}

Callers 1

mainFunction · 0.90

Calls 12

requireFunction · 0.90
InfrastructureClass · 0.90
json_readFunction · 0.85
retained_profilesFunction · 0.85
convertFunction · 0.85
setFunction · 0.85
bundleFunction · 0.85
strFunction · 0.85
registryMethod · 0.80
collectMethod · 0.80
getMethod · 0.65
allFunction · 0.50

Tested by 1

mainFunction · 0.72