Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
output_directory.hpp File Reference

The structured output directory: durable, self-documenting records of computations (b2rec/1; ADR-0045; the arc's rung 3). More...

#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include <vector>
#include <boost/json.hpp>
#include "bertini2/detail/sha256.hpp"
Include dependency graph for output_directory.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bertini::records::OutputDirectory
 One structured output directory: definitions/ + history/ + derived views. More...

Namespaces

namespace  bertini
namespace  bertini::records

Functions

std::string bertini::records::SystemEncodingAsJson (std::string const &encoding_text, std::string const &digest_hex, boost::json::object const &parts)
 The archived form of a system definition: a machine-parseable JSON document {"schema", "digest", "system", "encoding"} – one json.load away, like the config definitions.
std::string bertini::records::TimeStampNow ()
 The record timestamp, now: YYYY-MM-DD HH:MM local time – the one clock format every record kind uses (run headers, declarations, recall events).
std::optional< std::string > bertini::records::AmbientRecordsPath ()
 Resolve the ambient records directory from the environment – the ONE place the BERTINI_RECORDS_DIR semantics live (the CLI and every solver's ambient attach use it).

Variables

constexpr char bertini::records::RecordSchemaVersion [] = "b2rec/1"
 The record-format version tag written on run headers; see docs/records/b2rec-1.md.

Detailed Description

The structured output directory: durable, self-documenting records of computations (b2rec/1; ADR-0045; the arc's rung 3).

Plain files are the source of truth, interactable without special software. The three truth stores separate concerns: definitions/ holds the INPUTS by content address (atomic + idempotent writes; no locks exist or are needed); results/ holds the OUTPUTS – one append-only JSONL file per run, a self-description header line then one line per completed path, everything recall needs; history/ is the narrative of WHAT WAS ASKED, WHEN – run headers, result declarations, annotations – every line small, referring into the other two stores by id (one date-named file per writing session, one writer per file, torn-final-line tolerant). README / INDEX are derived, rebuildable text views. The format contract lives in docs/records/b2rec-1.md and travels inside every directory as its README.txt.