[GH-ISSUE #4472] [Benchmark] bug: the runner redacts ordinary options whose names contain "token" or "key", and a matching flag hides the next option #2000

Open
opened 2026-11-04 01:55:53 +07:00 by bsakaguchi · 4 comments
Owner

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

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 --profile <run config> --no-start wrote "--conversation-cache-min-tokens": "<redacted>" in
config.json and results.json. The value is 20000, not a secret.

The engine arguments reach the runner through _redact_argv (strata_cli/cli.py:726, used at line 824 for
engine_argv). It treats any option whose name contains key, token, secret, password or credential as a
secret and hides the next item. Two effects:

  1. Ordinary options lose their values: --conversation-cache-min-tokens, and anything else with "token" or "key" in
    the name.
  2. A flag with no value that matches (--no-token-graph, --native-ple-key, both engine flags) hides the next
    item, which is the next option's name. That option then disappears from the report.

Checked against _redact_argv from main:

_redact_argv(["--conversation-cache-min-tokens", "20000", "--no-token-graph", "--kv", "int8", "--api-key", "s3cret"])
-> ['--conversation-cache-min-tokens', '<redacted>', '--no-token-graph', '<redacted>', 'int8', '--api-key', '<redacted>']

--kv int8 is gone, and parse_options would record --no-token-graph: "<redacted>".

Related, same idea: SECRET_KEY (key|token|secret|password|auth) in strata_cli/bench_facts.py:26 and
tools/strata_bench.py:595 drops any STRATA_* variable or config key containing those words, e.g. a
fit_max_tokens or reasoning_budget_tokens config key in config_view.

Suggested fix: hide values only for options that hold credentials (--api-key, --key, --new-key, *-token
when it takes a value, --password, *-secret), and never conceal the next item after a flag that takes no value.
Happy to send a PR with tests.

Smallest steps or command that reproduce it

Serve a profile whose args include --conversation-cache-min-tokens 20000, then run
strata bench run --profile <that run config> --no-start and look at configuration in results.json.
Or call _redact_argv as above.

Reproduction status

Reproduced locally: the benchmark output in #4468
(bench/results/2026-10-28-standard-rtx-3090-plus-rtx-3090-5250594b/config.json), and the function call above on
main.

Strata version

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

Graphics card, memory and system

2x RTX 3090 24 GB, 2x Xeon E5-2620 v3, 256 GB, Ubuntu 26.10. Not hardware-specific.

Model, size and settings

Flash-Next IQ3_S; see #4468.

Logs

None needed; see the output above.

Originally created by @coryjett on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4472 ### 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 --profile <run config> --no-start` wrote `"--conversation-cache-min-tokens": "<redacted>"` in `config.json` and `results.json`. The value is 20000, not a secret. The engine arguments reach the runner through `_redact_argv` (`strata_cli/cli.py:726`, used at line 824 for `engine_argv`). It treats any option whose name contains `key`, `token`, `secret`, `password` or `credential` as a secret and hides the next item. Two effects: 1. Ordinary options lose their values: `--conversation-cache-min-tokens`, and anything else with "token" or "key" in the name. 2. A flag with no value that matches (`--no-token-graph`, `--native-ple-key`, both engine flags) hides the next item, which is the next option's name. That option then disappears from the report. Checked against `_redact_argv` from `main`: ``` _redact_argv(["--conversation-cache-min-tokens", "20000", "--no-token-graph", "--kv", "int8", "--api-key", "s3cret"]) -> ['--conversation-cache-min-tokens', '<redacted>', '--no-token-graph', '<redacted>', 'int8', '--api-key', '<redacted>'] ``` `--kv int8` is gone, and `parse_options` would record `--no-token-graph: "<redacted>"`. Related, same idea: `SECRET_KEY` (`key|token|secret|password|auth`) in `strata_cli/bench_facts.py:26` and `tools/strata_bench.py:595` drops any `STRATA_*` variable or config key containing those words, e.g. a `fit_max_tokens` or `reasoning_budget_tokens` config key in `config_view`. Suggested fix: hide values only for options that hold credentials (`--api-key`, `--key`, `--new-key`, `*-token` when it takes a value, `--password`, `*-secret`), and never conceal the next item after a flag that takes no value. Happy to send a PR with tests. ### Smallest steps or command that reproduce it Serve a profile whose args include `--conversation-cache-min-tokens 20000`, then run `strata bench run --profile <that run config> --no-start` and look at `configuration` in `results.json`. Or call `_redact_argv` as above. ### Reproduction status Reproduced locally: the benchmark output in #4468 (`bench/results/2026-10-28-standard-rtx-3090-plus-rtx-3090-5250594b/config.json`), and the function call above on `main`. ### Strata version 0.2.7 (engine 0.1.52, Control 0.1.52); code checked on `main` 46c152a1. ### Graphics card, memory and system 2x RTX 3090 24 GB, 2x Xeon E5-2620 v3, 256 GB, Ubuntu 26.10. Not hardware-specific. ### Model, size and settings Flash-Next IQ3_S; see #4468. ### Logs None needed; see the output above.
bsakaguchi changed title from [GH-ISSUE #4472] [Benchmark] the runner redacts ordinary options whose names contain "token" or "key", and a matching flag hides the next option to [GH-ISSUE #4472] [Benchmark] bug: the runner redacts ordinary options whose names contain "token" or "key", and a matching flag hides the next option 2026-11-07 14:36:43 +07:00
Author
Owner

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

Thank you for the benchmark. We have collected these results for the benchmarks page on the Strata website, so we are closing this here. If you measure again, for example on 0.2.11, you are welcome to open a new report.

The Strata project

<!-- gh-comment-id:6659009239 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thank you for the benchmark. We have collected these results for the benchmarks page on the Strata website, so we are closing this here. If you measure again, for example on 0.2.11, you are welcome to open a new report. The Strata project
Author
Owner

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

This is not a benchmark, but rather an issue with how benchmarks are collected.

<!-- gh-comment-id:6659867036 --> @coryjett commented on GitHub (Nov 5, 2026): This is not a benchmark, but rather an issue with how benchmarks are collected.
Author
Owner

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

/reopen

<!-- gh-comment-id:6659902582 --> @coryjett commented on GitHub (Nov 5, 2026): /reopen
Author
Owner

@github-actions[bot] commented on GitHub (Nov 5, 2026):

Reopened, thank you. A maintainer will pick it up from here.

<!-- gh-comment-id:6659907569 --> @github-actions[bot] commented on GitHub (Nov 5, 2026): Reopened, thank you. A maintainer will pick it up from here.
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#2000
No description provided.