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

Function cmd_ratchet

scripts/sanitizer-coverage-map.py:233–246  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

231
232
233def cmd_ratchet(args) -> int:
234 current_path = os.path.join(os.path.abspath(args.out), "never-executed.txt")
235 current = set(open(current_path).read().splitlines())
236 if not os.path.exists(BASELINE):
237 print(f"no baseline yet: copy {current_path} to {BASELINE} to arm the ratchet")
238 return 0
239 base = set(l for l in open(BASELINE).read().splitlines() if l and not l.startswith("#"))
240 new = sorted(current - base)
241 gone = sorted(base - current)
242 for line in new:
243 print(f"NEW never-executed: {line}")
244 if gone:
245 print(f"{len(gone)} function(s) now executed: lower the baseline (remove them from {BASELINE})")
246 return 1 if new else 0
247
248
249def cmd_map(args) -> int:

Callers

nothing calls this directly

Calls 3

setFunction · 0.85
openFunction · 0.50
readMethod · 0.45

Tested by

no test coverage detected