MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / mark_committed

Method mark_committed

openkb/mutation.py:166–177  ·  view source on GitHub ↗

Mark the journal committed without removing the backup. Call this the instant the mutation is durably applied (e.g. the registry write has landed) so a subsequent :func:`recover_pending_journals` discards the journal instead of rolling it back. This is the commit sig

(self)

Source from the content-addressed store, hash-verified

164 atomic_write_json(self.journal_path, self._journal_data(status))
165
166 def mark_committed(self) -> None:
167 """Mark the journal committed without removing the backup.
168
169 Call this the instant the mutation is durably applied (e.g. the
170 registry write has landed) so a subsequent
171 :func:`recover_pending_journals` discards the journal instead of
172 rolling it back. This is the commit signal; :meth:`discard` is the
173 post-commit cleanup that also removes the backup dir and journal
174 file and must itself be best-effort — it runs *after* the commit
175 point and its failure must never trigger a rollback.
176 """
177 self.write_journal("committed")
178
179 def track_new(self, paths: list[Path]) -> None:
180 """Register paths created *after* the snapshot for removal on rollback.

Calls 1

write_journalMethod · 0.95