pub enum PostCommitEffect {
None,
ReindexEntity {
entity_id: Uuid,
},
ReindexNote {
note_id: Uuid,
},
GtdAudit {
task_id: Uuid,
from_status: String,
to_status: String,
note: Option<String>,
namespace: String,
},
NoteDeleted {
note_id: Uuid,
kind: String,
},
}Expand description
A deferred side effect recorded during prepare and run once, after the
atomic unit commits (ADR-099 D1, “post-commit pass”). v1’s admissible set
computes no embeddings during prepare (D3’s update/merge caveat), so
the only post-commit effects are reindex kicks computed from the
committed row content, plus the GAP-5 addition under B3: the
best-effort GTD lifecycle audit row.
Variants§
None
No deferred side effect for this op.
ReindexEntity
Re-embed and re-warm the given entity’s vector row from its committed
content (ADR-099 D3 update caveat: entity name/description change).
ReindexNote
Re-embed and re-warm the given note’s vector row from its committed
content (ADR-099 D3 update caveat: note name/content change).
GtdAudit
Append one gtd_lifecycle_audit row for a committed gtd.transition
or gtd.complete (ADR-099 B3, GAP-5): canonical handle_transition/
handle_complete call ensure_audit_schema + write_audit_record
(khive-pack-gtd::handlers) as a best-effort side write — a failed
audit insert must never roll back an already-committed transition.
Carries exactly the fields write_audit_record needs. Applied
outside khive-runtime (crate-direction: khive-pack-gtd depends on
khive-runtime, not the other way around) — this crate’s own
apply_post_commit_effects treats this variant as a no-op; the
kkernel caller that owns both crates applies it by calling the
canonical ensure_audit_schema/write_audit_record functions
directly.
NoteDeleted
A committed note delete (soft or hard) — fire the pack-installed
note-mutation hook with the deleted note’s kind (#750:
DeletePlan previously carried no post_commit
slot at all, so an atomic note delete never reached
KhiveRuntime::fire_note_mutation_hook, unlike operations.rs’s
delete_note, which fires it directly after a successful row
delete). Entity deletes have no equivalent — the hook system is
note-only (khive-pack-memory’s warm ANN cache is the only
installed consumer today).
Trait Implementations§
Source§impl Clone for PostCommitEffect
impl Clone for PostCommitEffect
Source§fn clone(&self) -> PostCommitEffect
fn clone(&self) -> PostCommitEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PostCommitEffect
impl Debug for PostCommitEffect
impl Eq for PostCommitEffect
Source§impl PartialEq for PostCommitEffect
impl PartialEq for PostCommitEffect
impl StructuralPartialEq for PostCommitEffect
Auto Trait Implementations§
impl Freeze for PostCommitEffect
impl RefUnwindSafe for PostCommitEffect
impl Send for PostCommitEffect
impl Sync for PostCommitEffect
impl Unpin for PostCommitEffect
impl UnsafeUnpin for PostCommitEffect
impl UnwindSafe for PostCommitEffect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more