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

Reads AI decision log Parquet files and verifies hash chain integrity. More...

#include <decision_log.hpp>

Public Member Functions

expected< std::vector< DecisionRecord > > read_all () const
 Get all decision records from the file.
 
expected< AuditMetadataaudit_metadata () const
 Get the audit chain metadata from the Parquet file's key-value metadata.
 
AuditChainVerifier::VerificationResult verify_chain () const
 Verify the hash chain integrity by re-hashing each record and checking chain continuity.
 
const Schemaschema () const
 Get the schema of the decision log file.
 
int64_t num_records () const
 Number of records in the file.
 
Move-only semantics
 DecisionLogReader ()=default
 
 DecisionLogReader (const DecisionLogReader &)=delete
 
DecisionLogReaderoperator= (const DecisionLogReader &)=delete
 
 DecisionLogReader (DecisionLogReader &&)=default
 
DecisionLogReaderoperator= (DecisionLogReader &&)=default
 

Static Public Member Functions

static expected< DecisionLogReaderopen (const std::string &path)
 Open a decision log Parquet file and pre-load all column data.
 

Detailed Description

Reads AI decision log Parquet files and verifies hash chain integrity.

Usage: auto reader = DecisionLogReader::open("decision_log_abc123_0_999.parquet"); auto records = reader->read_all(); auto verify = reader->verify_chain(); if (!verify.valid) { /* tampered! *‍/ }

Definition at line 814 of file decision_log.hpp.

Constructor & Destructor Documentation

◆ DecisionLogReader() [1/3]

signet::forge::DecisionLogReader::DecisionLogReader ( )
default

◆ DecisionLogReader() [2/3]

signet::forge::DecisionLogReader::DecisionLogReader ( const DecisionLogReader )
delete

◆ DecisionLogReader() [3/3]

signet::forge::DecisionLogReader::DecisionLogReader ( DecisionLogReader &&  )
default

Member Function Documentation

◆ audit_metadata()

expected< AuditMetadata > signet::forge::DecisionLogReader::audit_metadata ( ) const
inline

Get the audit chain metadata from the Parquet file's key-value metadata.

Returns
The AuditMetadata extracted from signetstack.audit.* keys.

Definition at line 887 of file decision_log.hpp.

◆ num_records()

int64_t signet::forge::DecisionLogReader::num_records ( ) const
inline

Number of records in the file.

Definition at line 991 of file decision_log.hpp.

◆ open()

static expected< DecisionLogReader > signet::forge::DecisionLogReader::open ( const std::string &  path)
inlinestatic

Open a decision log Parquet file and pre-load all column data.

Parameters
pathPath to the decision log Parquet file.
Returns
The reader, or an error if the file cannot be opened or parsed.

Definition at line 820 of file decision_log.hpp.

◆ operator=() [1/2]

DecisionLogReader & signet::forge::DecisionLogReader::operator= ( const DecisionLogReader )
delete

◆ operator=() [2/2]

DecisionLogReader & signet::forge::DecisionLogReader::operator= ( DecisionLogReader &&  )
default

◆ read_all()

expected< std::vector< DecisionRecord > > signet::forge::DecisionLogReader::read_all ( ) const
inline

Get all decision records from the file.

Returns
A vector of DecisionRecord objects reconstructed from all row groups.

Definition at line 850 of file decision_log.hpp.

◆ schema()

const Schema & signet::forge::DecisionLogReader::schema ( ) const
inline

Get the schema of the decision log file.

Definition at line 986 of file decision_log.hpp.

◆ verify_chain()

AuditChainVerifier::VerificationResult signet::forge::DecisionLogReader::verify_chain ( ) const
inline

Verify the hash chain integrity by re-hashing each record and checking chain continuity.

Reconstructs hash chain entries from stored columns, recomputes data_hash from the record fields, and runs the full AuditChainVerifier pipeline.

Returns
A VerificationResult indicating whether the chain is valid and, if not, which entry failed verification.
See also
AuditChainVerifier::verify

Definition at line 916 of file decision_log.hpp.


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