rugnux: write a results report next to the reflections

Everything a run determines went to stdout and nowhere else. The space group and the evidence behind
it, the error model, the post-refine commit-or-reject decisions and their held-out residuals, the
two-pass adopt-or-roll-back, the resolution cut, the merging statistics - all of it scrolled past
interleaved with progress lines and was gone. A user who was not watching had no record, and nothing
could read it. `rugnux` had no log file at all; the `rugnux.log` in the regression harness is that
harness capturing stdout.

Write `<prefix>_report.txt` alongside the .cif/.mtz/.hkl, always, with no option to ask for it. It
holds what the run DETERMINED; timing, rates, per-image progress and engine chatter stay on stdout,
where they belong. Every line rugnux logs was classified result-or-process against the regression
corpus to decide what crosses over.

The format follows XDS's CORRECT.LP, which has been read by people and parsed by other programs for
twenty years: `KEY= value` assignment lines a script greps one at a time, fixed-width tables with
stable headers and a total row, `WARNING:` sentences in plain English, section banners. REPORT_VERSION
says when that interface last changed. It is assembled from results the pipeline already computed, so
an unconditional file costs nothing, and a failure to write it is logged and swallowed - a run that
produced good reflections must not be lost to a side file.

One thing CORRECT.LP does not have to solve: a rotation run integrates twice and writes both passes,
so every report says which pass it describes and why that pass was adopted.

`--no-merge` gets a report too, saying MERGE= NOT_PERFORMED rather than leaving a reader to infer it
from absent sections. An empty output prefix still writes nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-11 19:51:05 +02:00
co-authored by Claude Opus 5
parent b9078d9a59
commit e5c0066129
17 changed files with 795 additions and 1 deletions
+8
View File
@@ -389,6 +389,14 @@ HDF5MetadataSource::OpenResult HDF5MetadataSource::Open(const std::string &filen
dataset->image_scale_factor = master_file->ReadOptVector<float>("/entry/MX/imageScaleFactor");
dataset->image_scale_cc = master_file->ReadOptVector<float>("/entry/MX/imageScaleCC");
dataset->integrated_reflections = master_file->ReadOptVector<float>("/entry/MX/integratedReflections");
dataset->sweep_quality = master_file->ReadOptVector<uint8_t>("/entry/MX/sweepQuality");
if (master_file->Exists("/entry/MX/sweepQualityReasons")) {
const auto dim = master_file->GetDimension("/entry/MX/sweepQualityReasons");
for (size_t i = 0; i < (dim.empty() ? 0 : dim[0]); i++)
dataset->sweep_quality_reasons.push_back(
master_file->ReadElement<std::string>("/entry/MX/sweepQualityReasons", i)
.value_or(""));
}
}
if (master_file->Exists("/entry/image"))
dataset->max_value = master_file->ReadOptVector<int64_t>("/entry/image/max_value");