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

Function summary

scripts/test-impact/predict.py:172–191  ·  view source on GitHub ↗
(result, meta)

Source from the content-addressed store, hash-verified

170
171
172def summary(result, meta):
173 g = result["graph"]
174 whole = sum(1 for v in result["suites"].values() if v == "ALL")
175 tests = sum(len(v) for v in result["suites"].values() if v != "ALL")
176 lines = ["### Test-impact shadow (report-only, never gates)", "",
177 "| | |", "|---|---|",
178 f"| selector | {result['selector']['tier']} (full: {'yes' if result['selector']['full'] else 'no'}) |",
179 f"| prediction | **{result['mode']}**: {result['selected_suites']} of {result['universe']} "
180 f"suites ({whole} whole, {tests} tests in the rest) |"]
181 if g.get("consulted"):
182 lines.append(f"| graph | {g.get('impacted_shown')} of {g.get('impacted_total')} impacted rows at "
183 f"depth {result['depth']}, {g.get('test_rows')} test rows"
184 f"{', saturated' if g.get('saturated') else ''} |")
185 for key in sorted(meta):
186 lines.append(f"| {key} | {meta[key]} |")
187 if result["reasons"]:
188 lines += ["", "Reasons: " + "; ".join(result["reasons"][:12])]
189 if result["mode"] == "graph" and result["suites"]:
190 lines += ["", "Suites: " + ", ".join(result["suites"])[:1500]]
191 return "\n".join(lines) + "\n"
192
193
194def main():

Callers 1

mainFunction · 0.70

Calls 2

sumFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected