1#ifndef ARACHNE_COORDINATOR_HPP
2#define ARACHNE_COORDINATOR_HPP
77 std::filesystem::path path;
84 std::filesystem::path database_path,
85 std::optional<std::filesystem::path> legacy_inbox_root = std::nullopt
97 std::string_view actor_ref, std::string_view reason = {}
102 history(std::string_view envelope_id)
const;
106 verify_inbox(
const std::filesystem::path& inbox_root)
const;
109 std::string_view envelope_id,
110 const std::filesystem::path& internal_queue_root,
111 std::optional<std::filesystem::path> legacy_inbox_root = std::nullopt
119 std::string_view run_id, std::string_view graph_domain,
120 std::string_view logical_date, std::string_view configuration_sha256,
121 bool retry_failed =
false,
bool resume_running =
false
124 std::string_view run_id,
125 const std::vector<std::string>& envelope_ids
130 std::string_view run_id, std::string_view manifest_ref
133 std::string_view run_id, std::string_view status,
134 std::string_view manifest_ref = {}
137 [[
nodiscard]]
const std::filesystem::path& path()
const noexcept;
147 const std::filesystem::path& path,
148 const std::filesystem::path& possible_parent
151void reject_inbox_deletion_target(
152 const std::filesystem::path& target,
const std::filesystem::path& inbox_root
158 const std::filesystem::path& lock_root, std::string_view graph_domain,
159 std::string_view run_id,
std::string ownership_token_
domain_lock(const std::filesystem::path &lock_root, std::string_view graph_domain, std::string_view run_id, std::chrono::seconds stale_after=std::chrono::hours(6))
domain_lock(const domain_lock &)=delete
domain_lock(domain_lock &&other) noexcept
bool owns_lock() const noexcept
domain_lock & operator=(const domain_lock &)=delete
domain_lock & operator=(domain_lock &&other) noexcept
std::filesystem::path directory_
void bind_product_run_inputs(std::string_view run_id, const std::vector< std::string > &envelope_ids)
operational_ledger & operator=(operational_ledger &&)=delete
void finish_integrated_product_run(std::string_view run_id, std::string_view manifest_ref)
operational_ledger(const operational_ledger &)=delete
envelope_record transition(std::string_view envelope_id, cocoon_status next, std::string_view actor_ref, std::string_view reason={})
operational_ledger(std::filesystem::path database_path, std::optional< std::filesystem::path > legacy_inbox_root=std::nullopt)
envelope_record get(std::string_view envelope_id) const
envelope_record intake(const intake_request &request)
void capture_inbox_baseline(const std::filesystem::path &inbox_root)
accumulation_state accumulation() const
bool retire_queued_payload(std::string_view envelope_id, const std::filesystem::path &internal_queue_root, std::optional< std::filesystem::path > legacy_inbox_root=std::nullopt)
void finish_run(std::string_view run_id, std::string_view status, std::string_view manifest_ref={})
std::optional< std::filesystem::path > legacy_inbox_root_
std::vector< envelope_record > product_run_inputs(std::string_view run_id) const
std::vector< envelope_record > list(cocoon_status status) const
std::vector< verification_issue > verify_inbox(const std::filesystem::path &inbox_root) const
bool should_integrate(const accumulation_policy &policy) const
std::vector< state_event > history(std::string_view envelope_id) const
operational_ledger & operator=(const operational_ledger &)=delete
bool claim_logical_run(std::string_view run_id, std::string_view graph_domain, std::string_view logical_date, std::string_view configuration_sha256, bool retry_failed=false, bool resume_running=false)
operational_ledger(operational_ledger &&)=delete
std::filesystem::path path_
std::unique_ptr< sqlite3, decltype(&sqlite3_close)> sqlite_handle
std::unique_ptr< sqlite3_stmt, decltype(&sqlite3_finalize)> statement_handle
std::string_view to_string(const cocoon_status status) noexcept
cocoon_status cocoon_status_from_string(const std::string_view value)
bool can_transition(const cocoon_status from, const cocoon_status to) noexcept
std::string sha256(std::span< const std::byte > bytes)
std::string sha256_file(const std::filesystem::path &path)
std::uintmax_t accepted_bytes
std::size_t accepted_count
std::chrono::seconds oldest_age
std::chrono::seconds oldest_age
std::uintmax_t accepted_bytes
std::size_t accepted_count
std::optional< std::string > supersedes
std::optional< std::string > accepted_by
std::uintmax_t byte_length
std::string submission_ref
std::filesystem::path payload_ref
std::string payload_sha256
std::filesystem::path inbox_root
std::string submission_ref
std::optional< std::string > supersedes
std::uintmax_t max_payload_bytes
std::filesystem::path source_path
implementation(const std::filesystem::path &path)