NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::research::EvidenceLedger Class Referenceabstract

Durable coordination API. More...

#include <evidence_ledger.h>

Inheritance diagram for neograph::research::EvidenceLedger:
[legend]

Public Member Functions

virtual std::optional< ResearchTaskLease > acquire_lease (ResearchLeaseRequest request)=0
 Atomically claims a ready/expired task.
 
virtual std::vector< std::string > expire_leases (std::string_view owner_scope, std::uint64_t now_unix_ms)=0
 Makes this owner's expired leases ready for reassignment.
 
virtual EvidencePublishResult publish (const ResearchTaskLease &lease, EvidenceArtifact artifact, std::uint64_t now_unix_ms)=0
 Atomically commits evidence and terminally publishes the claimed task.
 
virtual bool renew_lease (const ResearchTaskLease &lease, std::uint64_t now_unix_ms)=0
 Extends only the exact live lease generation.
 
virtual std::vector< ResearchTask > tasks (std::string_view owner_scope, bool include_terminal) const =0
 Returns owner-scoped task snapshots in deterministic task-id order.
 

Detailed Description

Durable coordination API.

Implementations must serialize competing lease, publication, and expiry transitions. The API intentionally contains no scheduler policy: callers choose what to lease; this ledger ensures their evidence and ownership decisions remain recoverable and non-overwriting.

Definition at line 227 of file evidence_ledger.h.

Member Function Documentation

◆ acquire_lease()

virtual std::optional< ResearchTaskLease > neograph::research::EvidenceLedger::acquire_lease ( ResearchLeaseRequest  request)
pure virtual

Atomically claims a ready/expired task.

Returns nullopt when another unexpired worker holds it or it has reached a terminal state. Repeating the exact active lease request returns the same lease.

Implemented in neograph::research::SqliteEvidenceLedger.

◆ publish()

virtual EvidencePublishResult neograph::research::EvidenceLedger::publish ( const ResearchTaskLease &  lease,
EvidenceArtifact  artifact,
std::uint64_t  now_unix_ms 
)
pure virtual

Atomically commits evidence and terminally publishes the claimed task.

A retried identical publication is idempotent; a different artifact for an already published task is rejected rather than last-writer-wins.

Implemented in neograph::research::SqliteEvidenceLedger.


The documentation for this class was generated from the following file: