[GH-ISSUE #4484] [Benchmark] results.json is written without the redaction the other report files get #2009

Closed
opened 2026-11-04 01:55:57 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @coryjett on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4484

Area

Benchmark

Desktop app, Terminal or source?

Terminal (Linux release 0.2.7, Control 0.1.52); the same code is on main at 46c152a1.

What happened

strata bench run writes results.json without the redaction it applies to its other files. In
strata_cli/bench_standard.py (~line 958) the report doc is json.dumps-ed and written as it is, while
outputs.jsonl and config.json go through facts.redact_object(..., redact) (~lines 907-913), engine.log through
redact(text) (~919) and the README through report_markdown(doc, redact) (~960). Only run.command is redacted
earlier (cli.py ~1273).

So text the operator or the server puts into the report reaches results.json unredacted: configuration.track_notes
and hardware.background_workloads (both free text from the command line), model.custom_pack,
requests[].error.message (server text and str(exc)), STRATA_* environment values under
configuration.experimental_options, and values in extensions.other_engine_options.

Example: --track-notes "models in /home/alice/m". The README shows /home/<user>/m; results.json
configuration.track_notes keeps /home/alice/m. docs/BENCHMARK_PROTOCOL.md (~line 46) says home folders, user
and host names, private addresses and keys are replaced, and the module docstring says the same.

Suggested fix: doc = facts.redact_object(doc, redact) before validate(doc), and a test in
tests/terminal/test_bench_standard.py that puts a home path in --track-notes and asserts it is gone from
results.json. Happy to send the PR.

Smallest steps or command that reproduce it

strata bench run --profile <any> --track custom --track-notes "models in /home/alice/m", then grep
results.json for /home/alice.

Reproduction status

Reproduced by reading the code (the write path above); our own run in #4468 had no private text in those fields, so
its results.json happens to be clean.

Strata version

0.2.7 (engine 0.1.52, Control 0.1.52); code checked on main 46c152a1.

Graphics card, memory and system

Not hardware-specific.

Model, size and settings

Not model-specific.

Logs

None needed.

Originally created by @coryjett on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4484 ### Area Benchmark ### Desktop app, Terminal or source? Terminal (Linux release 0.2.7, Control 0.1.52); the same code is on `main` at 46c152a1. ### What happened `strata bench run` writes `results.json` without the redaction it applies to its other files. In `strata_cli/bench_standard.py` (~line 958) the report `doc` is `json.dumps`-ed and written as it is, while `outputs.jsonl` and `config.json` go through `facts.redact_object(..., redact)` (~lines 907-913), `engine.log` through `redact(text)` (~919) and the README through `report_markdown(doc, redact)` (~960). Only `run.command` is redacted earlier (`cli.py` ~1273). So text the operator or the server puts into the report reaches `results.json` unredacted: `configuration.track_notes` and `hardware.background_workloads` (both free text from the command line), `model.custom_pack`, `requests[].error.message` (server text and `str(exc)`), `STRATA_*` environment values under `configuration.experimental_options`, and values in `extensions.other_engine_options`. Example: `--track-notes "models in /home/alice/m"`. The README shows `/home/<user>/m`; `results.json` `configuration.track_notes` keeps `/home/alice/m`. docs/BENCHMARK_PROTOCOL.md (~line 46) says home folders, user and host names, private addresses and keys are replaced, and the module docstring says the same. Suggested fix: `doc = facts.redact_object(doc, redact)` before `validate(doc)`, and a test in `tests/terminal/test_bench_standard.py` that puts a home path in `--track-notes` and asserts it is gone from `results.json`. Happy to send the PR. ### Smallest steps or command that reproduce it `strata bench run --profile <any> --track custom --track-notes "models in /home/alice/m"`, then grep `results.json` for `/home/alice`. ### Reproduction status Reproduced by reading the code (the write path above); our own run in #4468 had no private text in those fields, so its results.json happens to be clean. ### Strata version 0.2.7 (engine 0.1.52, Control 0.1.52); code checked on `main` 46c152a1. ### Graphics card, memory and system Not hardware-specific. ### Model, size and settings Not model-specific. ### Logs None needed.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Hello coryjett,

Thank you. In Strata 0.2.11 bench run writes results.json through the same redaction as the other report files, before it is validated, so the file that is checked is the file that is written. We also fixed a leak we found while testing: a key written next to a hyphen (pack-<key>) is now replaced, and redacting twice no longer produces <<user>>. The machine's login and host name are replaced only in the text people and servers wrote, not in the report's own field names. If you find a value that still appears in clear in a result file on 0.2.11, please open an issue with the file name and the field (not the value).

The Strata project

<!-- gh-comment-id:6658426774 --> @Niko1221 commented on GitHub (Nov 5, 2026): Hello coryjett, Thank you. In Strata 0.2.11 `bench run` writes results.json through the same redaction as the other report files, before it is validated, so the file that is checked is the file that is written. We also fixed a leak we found while testing: a key written next to a hyphen (`pack-<key>`) is now replaced, and redacting twice no longer produces `<<user>>`. The machine's login and host name are replaced only in the text people and servers wrote, not in the report's own field names. If you find a value that still appears in clear in a result file on 0.2.11, please open an issue with the file name and the field (not the value). The Strata project
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2009
No description provided.