Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
signet::forge::HumanOverrideLogWriter Class Reference

Writes human override events to Parquet files with cryptographic hash chaining for tamper-evident audit trails. More...

#include <human_oversight.hpp>

Public Member Functions

 HumanOverrideLogWriter (const std::string &output_dir, const std::string &chain_id="", size_t max_records=100000)
 Create a human override log writer.
 
expected< HashChainEntrylog (const HumanOverrideRecord &record)
 Log a human override event. Returns the hash chain entry.
 
expected< void > flush ()
 Flush current records to a Parquet file.
 
expected< void > close ()
 Close the writer (flushes remaining records).
 
AuditMetadata current_metadata () const
 Get the chain metadata for the current batch.
 
size_t pending_records () const
 
int64_t total_records () const
 
std::string current_file_path () const
 

Detailed Description

Writes human override events to Parquet files with cryptographic hash chaining for tamper-evident audit trails.

EU AI Act Art.14(4)-(5): All human intervention events are logged with full provenance, including operator identity, rationale, and the original AI system output that was overridden.

Usage: HumanOverrideLogWriter writer("/audit/overrides"); HumanOverrideRecord rec; rec.timestamp_ns = now_ns(); rec.operator_id = "op-001"; rec.action = OverrideAction::MODIFY; rec.rationale = "Model output inconsistent with market conditions"; auto entry = writer.log(rec); writer.close();

Definition at line 411 of file human_oversight.hpp.

Constructor & Destructor Documentation

◆ HumanOverrideLogWriter()

signet::forge::HumanOverrideLogWriter::HumanOverrideLogWriter ( const std::string &  output_dir,
const std::string &  chain_id = "",
size_t  max_records = 100000 
)
inline

Create a human override log writer.

Parameters
output_dirDirectory to write Parquet files to
chain_idUnique chain identifier (auto-generated if empty)
max_recordsMax records per file before rotating (default 100,000)

Definition at line 417 of file human_oversight.hpp.

Member Function Documentation

◆ close()

expected< void > signet::forge::HumanOverrideLogWriter::close ( )
inline

Close the writer (flushes remaining records).

Definition at line 482 of file human_oversight.hpp.

◆ current_file_path()

std::string signet::forge::HumanOverrideLogWriter::current_file_path ( ) const
inline

Definition at line 588 of file human_oversight.hpp.

◆ current_metadata()

AuditMetadata signet::forge::HumanOverrideLogWriter::current_metadata ( ) const
inline

Get the chain metadata for the current batch.

Definition at line 563 of file human_oversight.hpp.

◆ flush()

expected< void > signet::forge::HumanOverrideLogWriter::flush ( )
inline

Flush current records to a Parquet file.

Definition at line 476 of file human_oversight.hpp.

◆ log()

expected< HashChainEntry > signet::forge::HumanOverrideLogWriter::log ( const HumanOverrideRecord record)
inline

Log a human override event. Returns the hash chain entry.

Definition at line 450 of file human_oversight.hpp.

◆ pending_records()

size_t signet::forge::HumanOverrideLogWriter::pending_records ( ) const
inline

Definition at line 586 of file human_oversight.hpp.

◆ total_records()

int64_t signet::forge::HumanOverrideLogWriter::total_records ( ) const
inline

Definition at line 587 of file human_oversight.hpp.


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