PF research library · 4 min read
Direct CLI execution provenance — r34 validation-refresh
r34 documentation · cli-provenance.md
On this page
run_privileged_frame_simulation.py now writes an execution-time identity for each direct scenario run and each completed live snapshot. The product version remains r34. Solver equations, configuration normalization and numerical defaults are unchanged.
python run_privileged_frame_simulation.py --config config_visible_links.json --scenario both --steps 1 --spacetime flat_sr --no-plots --retain-source --output results/provenance_sr
python run_privileged_frame_simulation.py --config config_visible_links.json --scenario both --steps 1 --spacetime gr_static --no-plots --retain-source --output results/provenance_gr
python validate_extended_results.py --results results/provenance_sr
Use --retain-source when preparing an authorized study export. It adds source_snapshot.zip, with every member checked against the execution inventory and the archive hash bound into provenance. The default avoids repeatedly copying a large source/data tree. The source export is limited to 512 MiB of selected files and follows the existing source selection and secret exclusions. Keep the complete output directory when exporting a study. run_manifest.json binds the requested scenario results, effective configuration, research archives and execution_provenance.json by SHA-256. The numerical validation report records that same provenance-file hash. Revalidation checks these bindings, including changes made while validation runs; it does not rewrite captured results.
The execution record contains:
- The r34 release label, run identity and execution timestamps.
- The same public source selection and canonical source digest used by the research assistant, recorded before execution and checked afterwards. This inventory contains relative paths, file lengths and hashes; it does not copy source contents.
- Python implementation/version, platform, architecture and installed distribution versions from the executing interpreter.
- The effective configuration hash, original configuration-file hash and bounded hashes of declared local input files. Scientific relative paths retain their current-directory meaning. Input identities do not rewrite the configuration.
- Explicit completeness and stability flags. Missing files, symbolic links, remote references and capture limits are reported as unavailable; no remote data is fetched merely to create this record. Provider-generated tracking/ephemeris provenance remains in the scenario output.
- A truthful completed, failed or interrupted computation status. Failed numerical validation also marks the execution record failed. Abrupt process termination can leave a running record, which cannot validate as a completed run.
The direct command executes its installed source tree. It does not automatically select a GUI or SaaS user's active assistant profile. Its layer-ID field is explicitly unknown rather than an empty list suggesting that no layers exist. When an invoking workflow supplies a materialized source tree, those source bytes are covered by the source digest; retain that workflow's existing layer/stack manifest to identify the ordered layers themselves. An enclosing GUI/SaaS assistant_provenance.json remains separate and is not overwritten.
No environment-variable dump, command-line dump, credentials or arbitrary host files are added to provenance. Local input references and remote references are represented by hashed identifiers, rather than copied absolute paths or URLs. The pre-existing effective configuration export still contains the scientific configuration the caller supplied; do not place credentials in scientific configuration fields.
This is a Python 3.8-compatible extension using the existing provenance helpers, with no AI provider or SaaS server dependency required by the direct CLI. The new record applies to this scenario command; other research commands retain their existing workflow-specific provenance. Old run folders remain auditable under their original schemas. They are not retroactively assigned new execution identities.
Execution hashes establish byte consistency, not experimental validity, digital signatures or independent attestation. An exported run does not include a complete Python environment. Without --retain-source, retain the matching r34 package/materialized source alongside the study. With that flag, unpack the verified source ZIP into a new directory, install its requirements in a supported environment, and run its scenario command with the exported effective_config.json and the same requested scenarios. Retain external input bytes and the environment lock or image in either case. Installed-package metadata does not identify every native binary, operating-system image, hardware characteristic or external service. Store run output under an output directory such as results/, outside the inventoried source/documentation directories.
The replay regression extracts the retained source into a new directory and executes a separate process for one-epoch SR and static-GR studies. It compares time, fidelity and purity arrays at prespecified absolute/relative tolerance 1e-12 in the same available interpreter. This verifies portable source retention and deterministic replay wiring; an outside researcher's target-platform qualification remains a separate onboarding acceptance activity.