![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
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< HashChainEntry > | log (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 |
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.
|
inline |
Create a human override log writer.
| output_dir | Directory to write Parquet files to |
| chain_id | Unique chain identifier (auto-generated if empty) |
| max_records | Max records per file before rotating (default 100,000) |
Definition at line 417 of file human_oversight.hpp.
|
inline |
Close the writer (flushes remaining records).
Definition at line 482 of file human_oversight.hpp.
|
inline |
Definition at line 588 of file human_oversight.hpp.
|
inline |
Get the chain metadata for the current batch.
Definition at line 563 of file human_oversight.hpp.
|
inline |
Flush current records to a Parquet file.
Definition at line 476 of file human_oversight.hpp.
|
inline |
Log a human override event. Returns the hash chain entry.
Definition at line 450 of file human_oversight.hpp.
|
inline |
Definition at line 586 of file human_oversight.hpp.
|
inline |
Definition at line 587 of file human_oversight.hpp.