20namespace neograph::program {
28struct ProgramJournalRecord;
29class ProgramRunGeneration;
30class ProgramRunLineage;
31class ProgramRunRecord;
32struct ProgramTransitionPublication;
36 std::string_view run_id,
37 std::string_view core_generation_id);
43struct ProgramExecutionLeaseData {
44 std::string owner_scope;
46 std::uint64_t attempt = 0;
47 std::string program_version_id;
48 std::string bundle_id;
49 std::string core_name;
50 std::string core_generation_id;
51 std::string core_thread_id;
52 std::string holder_id;
53 std::int64_t acquired_at_ms = 0;
54 std::int64_t expires_at_ms = 0;
60 static constexpr std::uint32_t STORAGE_SCHEMA_VERSION = 1;
65 const std::string& id()
const noexcept;
66 const std::string& owner_scope()
const noexcept;
67 const std::string& run_id()
const noexcept;
68 std::uint64_t attempt()
const noexcept;
69 const std::string& program_version_id()
const noexcept;
70 const std::string& bundle_id()
const noexcept;
71 const std::string& core_name()
const noexcept;
72 const std::string& core_generation_id()
const noexcept;
73 const std::string& core_thread_id()
const noexcept;
74 const std::string& holder_id()
const noexcept;
75 std::int64_t acquired_at_ms()
const noexcept;
76 std::int64_t expires_at_ms()
const noexcept;
77 std::string serialize_canonical()
const;
82 std::shared_ptr<const Impl> impl_;
88 const ProgramTransitionPublication& publication,
94 const ProgramBundle& bundle()
const noexcept;
95 const ProgramVersion& version()
const noexcept;
100 ProgramVersion version,
103 std::shared_ptr<const Impl> impl_;
105 friend class detail::RunControl;
116 static constexpr std::uint32_t STORAGE_SCHEMA_VERSION = 1;
121 const ProgramVersion& version,
125 const std::string& id()
const noexcept;
126 const std::string& owner_scope()
const noexcept;
127 const std::string& lineage_id()
const noexcept;
128 std::uint64_t source_generation()
const noexcept;
129 const std::string& source_generation_id()
const noexcept;
130 const std::string& source_lineage_head_id()
const noexcept;
131 const std::string& source_run_id()
const noexcept;
132 const std::string& source_program_version_id()
const noexcept;
133 const std::string& source_bundle_id()
const noexcept;
134 const CoreCheckpointIdentity& core_checkpoint()
const noexcept;
136 std::string serialize_canonical()
const;
141 std::shared_ptr<const Impl> impl_;
165 static constexpr std::uint32_t STORAGE_SCHEMA_VERSION = 1;
168 const ProgramBundle& source_bundle,
169 const ProgramVersion& target_version,
170 const ProgramBundle& target_bundle);
173 const std::string& id()
const noexcept;
174 const std::string& owner_scope()
const noexcept;
175 const std::string& source_program_version_id()
const noexcept;
176 const std::string& source_bundle_id()
const noexcept;
177 const std::string& target_program_version_id()
const noexcept;
178 const std::string& target_bundle_id()
const noexcept;
179 const std::string& source_core_name()
const noexcept;
180 const std::string& target_core_name()
const noexcept;
181 const std::string& source_core_generation_id()
const noexcept;
182 const std::string& target_core_generation_id()
const noexcept;
183 const std::string& topology_shape_id()
const noexcept;
194 bool binds(const ProgramVersion& source_version, const ProgramBundle& source_bundle,
195 const ProgramVersion& target_version, const ProgramBundle& target_bundle) const;
203 const ProgramBundle& source_bundle,
204 const ProgramVersion& target_version,
205 const ProgramBundle& target_bundle) const;
206 std::
string serialize_canonical() const;
211 std::shared_ptr<const Impl> impl_;
214struct ProgramGraphMigrationReceiptData {
216 ProgramBundle source_bundle;
217 ProgramVersion source_version;
218 ProgramBundle target_bundle;
219 ProgramVersion target_version;
220 std::string migration_plan_id;
221 std::uint64_t target_generation = 0;
222 std::string target_run_id;
223 std::string target_program_version_id;
224 std::string target_bundle_id;
225 std::string target_invocation_id;
226 std::string target_binding_fingerprint;
227 std::string target_initial_run_record_id;
228 std::string target_initial_journal_head;
229 CoreCheckpointIdentity target_core_checkpoint;
231 std::optional<GraphSemanticMigrationAdapter> semantic_adapter;
237 static constexpr std::uint32_t STORAGE_SCHEMA_VERSION = 2;
238 static constexpr std::uint32_t PREVIOUS_STORAGE_SCHEMA_VERSION = 1;
243 const std::string& id()
const noexcept;
245 const ProgramBundle& source_bundle()
const noexcept;
246 const ProgramVersion& source_version()
const noexcept;
247 const ProgramBundle& target_bundle()
const noexcept;
248 const ProgramVersion& target_version()
const noexcept;
249 const std::optional<GraphSemanticMigrationAdapter>& semantic_adapter()
const noexcept;
250 const std::string& migration_plan_id()
const noexcept;
251 std::uint64_t target_generation()
const noexcept;
252 const std::string& target_run_id()
const noexcept;
253 const std::string& target_program_version_id()
const noexcept;
254 const std::string& target_bundle_id()
const noexcept;
255 const std::string& target_invocation_id()
const noexcept;
256 const std::string& target_binding_fingerprint()
const noexcept;
257 const std::string& target_initial_run_record_id()
const noexcept;
258 const std::string& target_initial_journal_head()
const noexcept;
259 const CoreCheckpointIdentity& target_core_checkpoint()
const noexcept;
261 std::string serialize_canonical()
const;
266 std::shared_ptr<const Impl> impl_;
282 const ProgramEvent& event,
289 const ProgramTransitionPublication& publication,
NEOGRAPH_API export/import macro for shared-library builds.
Immutable, content-addressed Program compilation artifacts.
Immutable snapshot exposed only after a completed super-step is durable.
Exact, content-addressed source evidence captured at a durable Core boundary.
Host-admitted P1 semantic bridge for an immutable control-free Core successor.
const std::vector< GraphMetadataChange > & metadata_changes() const noexcept
Graph metadata differences between the source and target definitions, sorted by pointer.
Immutable proof of whether an admitted run may move to another version.
Backend-global ownership of one migration-capable root Core dispatch.
Immutable evidence admitted with one same-lineage GraphEngine successor.
Host-only, non-serializable evidence for one running safe-point publication.
Immutable identity of one admitted topology generation in a run lineage.
Immutable content-addressed head of one stable run lineage.
Deep-owned, content-addressed run snapshot used for reconnect and CAS publication.
NEOGRAPH_PROGRAM_API std::string graph_migration_checkpoint_content_id(const graph::Checkpoint &checkpoint)
Content identity of exact checkpoint bytes published under a source head.
NEOGRAPH_PROGRAM_API bool is_valid_program_graph_safe_point_transition(const ProgramRunRecord &previous, const ProgramJournalRecord &previous_journal, const ProgramTransitionPublication &publication, const ProgramGraphSafePointEvidence &evidence, const GraphMigrationCapsule &capsule, const ProgramExecutionLease &execution_lease) noexcept
Restricted same-generation publication of one host-captured Core safe point.
NEOGRAPH_PROGRAM_API bool does_program_graph_migration_started_event_bind(const ProgramEvent &event, const ProgramRunRecord &target) noexcept
Exact initial event required for a graph-migration successor publication.
NEOGRAPH_PROGRAM_API bool does_program_execution_lease_bind(const ProgramExecutionLease &lease, const ProgramTransitionPublication &publication, const ProgramExecutionLease *expected_lease) noexcept
Shared publication binding; expected_lease must first match the durable lease CAS.
NEOGRAPH_PROGRAM_API std::string program_root_core_thread_id(std::string_view run_id, std::string_view core_generation_id)
Exact root Core thread identity used by ProgramRuntime.
NEOGRAPH_PROGRAM_API bool is_valid_program_graph_migration_transition(const ProgramRunGeneration &predecessor, const ProgramRunLineage &previous_lineage, const ProgramRunRecord &source, const GraphMigrationCapsule &durable_capsule, const MigrationPlan &migration_plan, const ProgramRunGeneration &successor, const ProgramRunLineage &next_lineage, const ProgramRunRecord &target) noexcept
Shared fail-closed validator used by every atomic transition backend.
Immutable outcome of one Program run attempt.
Host-owned capture of one durably completed graph super-step.
Serialized snapshot of graph execution state at a single super-step.
Deep-owned stored journal value.
Immutable stored binding between a Program bundle and admission receipts.