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

Method publish

scripts/test-impact/coverage_live_v2.py:277–289  ·  view source on GitHub ↗
(self, meta)

Source from the content-addressed store, hash-verified

275 return self.write(relative, data)
276
277 def publish(self, meta):
278 # A partial JSON file is never a commit marker. The pending complete
279 # file remains evidence, and hard-link creation cannot overwrite a
280 # preexisting or symlink destination.
281 self.json("meta.pending.json", meta)
282 for name in ("profiles", "tests"):
283 data = _read(os.path.join(self.path, name + ".tsv"), self.args.max_map_bytes)
284 if hashlib.sha256(data).hexdigest() != meta[name + "_sha256"]:
285 _error("identity", "wire changed before publication")
286 self.check()
287 os.fsync(self.directory)
288 os.link("meta.pending.json", "meta.json", src_dir_fd=self.directory,
289 dst_dir_fd=self.directory, follow_symlinks=False)
290
291 def inventory(self):
292 """Bound scans while children run; never follow raw tree symlinks."""

Callers 1

collectFunction · 0.95

Calls 4

jsonMethod · 0.95
checkMethod · 0.95
_readFunction · 0.85
_errorFunction · 0.85

Tested by

no test coverage detected