---
title: "Reproducibility Hardening"
description: "Detecting and normalizing volatile timestamps, temporary paths, and runtime addresses."
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Reproducibility Hardening}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
options(gp3ml.reproducible_examples = TRUE)
library(gp3ml)
```

## Deterministic documentation mode

When `gp3ml.reproducible_examples` is `TRUE`, report timestamps and session
details use deterministic documentation placeholders rather than build-session
values. Research use outside documentation retains the real runtime metadata.

```{r normalize}
volatile <- c(
  paste0(
    "Generated",
    ": 2026-07-25 23:26:03 UTC"
  ),
  paste0(
    "<environment: 0x",
    "000001234ABCDEF0>"
  )
)

normalize_gazepoint_artifact_text(volatile)
```

## Audit generated text

```{r audit}
example_file <- tempfile(fileext = ".md")
writeLines(
  paste0(
    "Generated",
    ": 2026-07-25 23:26:03 UTC"
  ),
  example_file
)
audit <- audit_gazepoint_reproducibility(example_file)
audit
plot(audit)
unlink(example_file)
```

Before publication, the same audit can be run over generated `docs/` output to
identify runtime-specific paths, addresses, or generated timestamps.
