[PR #4500] [CLOSED] [Benchmark] results.json gets the same redaction as the other report files #5069

Closed
opened 2026-11-07 16:32:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4500
Author: @coryjett
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: fix-bench-results-redact


📝 Commits (1)

  • b69a74f bench: results.json gets the same redaction as the other report files (#4484)

📊 Changes

2 files changed (+15 additions, -0 deletions)

View changed files

📝 strata_cli/bench_standard.py (+1 -0)
📝 tests/terminal/test_bench_standard.py (+14 -0)

📄 Description

Problem and result

Fixes #4484. strata bench run wrote results.json without the redaction it applied to its other files:
outputs.jsonl and config.json went through facts.redact_object, engine.log and the README through redact, but
the report doc was json.dumps-ed as it was. So --track-notes "models in /home/alice/m" gave a README with
/home/<user>/m and a results.json with /home/alice/m; the same for --background, custom_pack,
requests[].error.message and STRATA_* values, against what docs/BENCHMARK_PROTOCOL.md promises.

After: doc = facts.redact_object(doc, redact) before validation, so results.json carries the same text the README
does.

#4484

Approach

One line in strata_cli/bench_standard.py, before validate(doc) so the validated document is the written one.
redact_object touches string values only; numbers, booleans and nulls are unchanged.

Validation

Passed:

  • python3.12 -m unittest tests.terminal.test_bench_standard tests.terminal.test_bench: Ran 94 tests in 70.956s, OK (1 skipped).
    Strata Control 0.1.52's bundled Python 3.12.15, Ubuntu 26.10, this branch (main 46c152a1 + this commit).
  • The new CommandLineTests.test_results_json_is_redacted_like_the_other_files against main's
    bench_standard.py (production file stashed, test kept): Ran 1 test in 1.778s FAILED (failures=1)

Failed:

  • None observed.

Not run:

  • A new strata bench run with this branch.

Limits

  • None known; the redactor's own coverage (IPv6, hosts outside /home) is a separate matter.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4500 **Author:** [@coryjett](https://github.com/coryjett) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-bench-results-redact` --- ### 📝 Commits (1) - [`b69a74f`](https://github.com/Niko1221/Strata/commit/b69a74f2444e4473e60a40e18772c49dfe1e426d) bench: results.json gets the same redaction as the other report files (#4484) ### 📊 Changes **2 files changed** (+15 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `strata_cli/bench_standard.py` (+1 -0) 📝 `tests/terminal/test_bench_standard.py` (+14 -0) </details> ### 📄 Description ## Problem and result Fixes #4484. `strata bench run` wrote `results.json` without the redaction it applied to its other files: outputs.jsonl and config.json went through `facts.redact_object`, engine.log and the README through `redact`, but the report `doc` was `json.dumps`-ed as it was. So `--track-notes "models in /home/alice/m"` gave a README with `/home/<user>/m` and a results.json with `/home/alice/m`; the same for `--background`, `custom_pack`, `requests[].error.message` and `STRATA_*` values, against what docs/BENCHMARK_PROTOCOL.md promises. After: `doc = facts.redact_object(doc, redact)` before validation, so results.json carries the same text the README does. ## Related discussion #4484 ## Approach One line in `strata_cli/bench_standard.py`, before `validate(doc)` so the validated document is the written one. `redact_object` touches string values only; numbers, booleans and nulls are unchanged. ## Validation **Passed:** - `python3.12 -m unittest tests.terminal.test_bench_standard tests.terminal.test_bench`: Ran 94 tests in 70.956s, OK (1 skipped). Strata Control 0.1.52's bundled Python 3.12.15, Ubuntu 26.10, this branch (main 46c152a1 + this commit). - The new `CommandLineTests.test_results_json_is_redacted_like_the_other_files` against main's `bench_standard.py` (production file stashed, test kept): Ran 1 test in 1.778s FAILED (failures=1) **Failed:** - None observed. **Not run:** - A new `strata bench run` with this branch. ## Limits - None known; the redactor's own coverage (IPv6, hosts outside /home) is a separate matter. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:32:27 +07:00
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#5069
No description provided.