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

Function positive

tests/coverage_live_v2_native.py:196–215  ·  view source on GitHub ↗
(context, case, missing=False)

Source from the content-addressed store, hash-verified

194
195
196def positive(context, case, missing=False):
197 tests = TESTS + ([MISSING] if missing else [])
198 registry = context.registry(case, tests=tests)
199 process, destination = context.collect(case, registry, poison=True)
200 require(process["exit"] == 0, "format2 native positive exited %r (missing integration on baseline)" % process["exit"])
201 rows, ids, _ = bundle(context, destination, registry, tests, "passed", 0)
202 for test in ["*"] + TESTS:
203 require(rows[(SUITE + ":" + test).encode()][0] == [b"row_evidence_missing"],
204 "positive native row has unexpected/missing evidence reasons")
205 hit_ids = {number for key, number in ids.items() if key[0] == FUNCTION}
206 require(bool(hit_ids.intersection(rows[(SUITE + ":*").encode()][1])), "actual setup hit lost in v2")
207 if missing:
208 require(rows[(SUITE + ":" + MISSING).encode()] == ([b"row_evidence_missing", b"missing_parent"], []),
209 "missing expected parent row must remain explicit and empty")
210 raw = retained_profiles(destination)
211 children = [path for path in raw if re.fullmatch(r"_setup\.child\.[0-9]+\.profraw", path.name)]
212 require(len(children) == 1, "native raw setup evidence not retained")
213 exact_native_hits(context, raw, rows, ids, case.name)
214 return {"bundle": str(destination), "rows": len(rows), "native_setup_hit": True,
215 "all_rows_incomplete": True, "missing_row": missing}
216
217
218def failed_native(context, case):

Callers 1

mainFunction · 0.90

Calls 7

requireFunction · 0.90
bundleFunction · 0.85
retained_profilesFunction · 0.85
exact_native_hitsFunction · 0.85
strFunction · 0.85
registryMethod · 0.80
collectMethod · 0.80

Tested by 1

mainFunction · 0.72