Skip to content

[FIX] TOPP_SimpleSearchEngine_DDA passed an argument to a flag - #9850

Merged
timosachsenberg merged 1 commit into
developfrom
fix/simplesearchengine-dda-decoys-arg
Aug 4, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
fix/simplesearchengine-dda-decoys-arg

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

TOPP_SimpleSearchEngine_DDA invoked -Search:decoys auto, but SimpleSearchEngineAlgorithm registers decoys as {true, false}, which TOPPBase turns into a flag. The tool therefore aborted at argument parsing and never ran:

Invalid parameter values (InvalidParameter): Command line error:
Trailing arguments after flag '-Search:decoys': auto. Aborting!

auto is ProSE's spelling — ProSEAlgorithm registers decoys with {auto, generate, ignore} — and the argument looks copied from the adjacent TOPP_ProSE_DDA test.

Why CI never caught it

The whole block is gated on WITH_OPENTIMS AND OPENTIMS_DDA_TEST_DATA, which CI does not satisfy. The test only runs where the Bruker DDA fixture is present, and there it had been failing outright.

The fix

The flag is passed by presence, so the value is dropped. Decoys are required either way: the chain runs FalseDiscoveryRate at 1 % PSM FDR over the result.

With the search actually running, the downstream PSM count is 4187 — exactly the yield recorded in the floor test's own comment ("Current yield on this fixture is 4187") — so this restores what the test was written against rather than changing it. All three tests in the chain pass, with the stale temp outputs cleared first so the result is honest.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcFtJVe1PcMsBzMnnnpWBJ

Summary by CodeRabbit

  • Tests
    • Updated the SimpleSearchEngine DDA test configuration to use the simplified -Search:decoys option format.

The test invoked '-Search:decoys auto', but SimpleSearchEngineAlgorithm registers
'decoys' as true/false, which TOPPBase turns into a flag - so the tool aborted at
argument parsing with "Trailing arguments after flag '-Search:decoys': auto" and
never ran. 'auto' is ProSE's spelling: ProSEAlgorithm registers 'decoys' with the
values {auto, generate, ignore}, and the argument looks copied from the adjacent
TOPP_ProSE_DDA test.

Nothing caught it because the whole block is gated on
'WITH_OPENTIMS AND OPENTIMS_DDA_TEST_DATA', which CI does not satisfy: the test
only runs where the Bruker DDA fixture is present, and there it had been failing
outright.

The flag is passed by presence, so the fix is to drop the value; decoys are
required either way, since the chain runs FalseDiscoveryRate at 1% PSM FDR over
the result. With the search actually running, the downstream PSM count is 4187 -
exactly the yield the floor test's comment records - so this restores what the
test was written against rather than changing it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcFtJVe1PcMsBzMnnnpWBJ
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 51e4ab9a-f42c-46bb-805d-6ec96433a012

📥 Commits

Reviewing files that changed from the base of the PR and between 39c4fe6 and 9b5519e.

📒 Files selected for processing (1)
  • src/tests/topp/CMakeLists.txt

📝 Walkthrough

Walkthrough

The DDA SimpleSearchEngine test now passes -Search:decoys as a valueless flag instead of passing the explicit auto value.

Changes

SimpleSearchEngine test configuration

Layer / File(s) Summary
Update DDA decoy flag
src/tests/topp/CMakeLists.txt
The test command changes -Search:decoys auto to -Search:decoys.

Possibly related PRs

Suggested reviewers: singjc, copilot, jonasscheid

Poem

A rabbit hops through test commands bright,
And drops auto in the moonlit night.
The decoy flag stands plain and true,
With one less word for tests to chew.
Hop, hop—SimpleSearchEngine knows what to do!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the affected test and the invalid argument passed to a boolean flag.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/simplesearchengine-dda-decoys-arg

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@timosachsenberg
timosachsenberg merged commit 4aece61 into develop Aug 4, 2026
12 checks passed
@timosachsenberg
timosachsenberg deleted the fix/simplesearchengine-dda-decoys-arg branch August 4, 2026 12:34
timosachsenberg added a commit that referenced this pull request Aug 5, 2026
These two recently merged fixes (macOS OpenNuXL flaky-test guard, and
TOPP_SimpleSearchEngine_DDA's mis-passed -Search:decoys argument) did
not add their own CHANGELOG entries. All other recently merged PRs
already carry their own entries.


Claude-Session: https://claude.ai/code/session_015DzS9eZL5229C3z22qoDQJ

Co-authored-by: Claude <[email protected]>
timosachsenberg pushed a commit that referenced this pull request Sep 12, 2026
Regression tests for argv shapes taken from the history of the command
line parser, all of which pass with the current implementation:

- '-flag auto' must still abort. This is the mistake class fixed in
  #9850, where a value was copied from a tool that registers the same
  parameter with a third allowed value. Only the literal 'true'/'false'
  may be consumed, so this keeps working.
- '-flag -5.5' must still abort. A negative number has no letter after
  the '-', so it is not recognised as an option (the rule introduced for
  #376) and reaches the flag as a trailing argument.
- '-flag -test true' assigns the value to the flag it follows; the
  preceding flag stays bare.
- A boolean string option given an explicitly empty value keeps the
  empty string and stays invalid; only the bare form means 'true'.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019UEHgs71nDGJrkfYTs8uRa
timosachsenberg added a commit that referenced this pull request Sep 13, 2026
…string option (#10116, step 2) (#10124)

* TOPPBase: accept an explicit true/false after a flag and a bare boolean string option

Boolean parameters can now be given in both command-line syntaxes (#10116,
step 2): a flag may be followed by exactly one literal 'true' or 'false'
('-flag false' is the only way to override a flag enabled in an INI file or
by an earlier '-flag' in appended workflow arguments), and a string option
restricted to 'true'/'false' may be given without a value, meaning 'true'.
Any other token after a flag is still rejected as before (#5345, #8670),
and '--help false' no longer prints the help.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_019UEHgs71nDGJrkfYTs8uRa

* TOPPBase: drop an explicit '--help false' before merging the command line into the defaults

The default Param excludes the help flags, so a '--help false' left in the
command-line Param made Param::update() fail with "unknown parameter" and
the tool exit with ILLEGAL_PARAMETERS (caught by the new test).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_019UEHgs71nDGJrkfYTs8uRa

* TOPPBase: pin command line edge cases from earlier parser bug reports

Regression tests for argv shapes taken from the history of the command
line parser, all of which pass with the current implementation:

- '-flag auto' must still abort. This is the mistake class fixed in
  #9850, where a value was copied from a tool that registers the same
  parameter with a third allowed value. Only the literal 'true'/'false'
  may be consumed, so this keeps working.
- '-flag -5.5' must still abort. A negative number has no letter after
  the '-', so it is not recognised as an option (the rule introduced for
  #376) and reaches the flag as a trailing argument.
- '-flag -test true' assigns the value to the flag it follows; the
  preceding flag stays bare.
- A boolean string option given an explicitly empty value keeps the
  empty string and stays invalid; only the bare form means 'true'.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019UEHgs71nDGJrkfYTs8uRa

* TOPPBase: make the two-flag ordering test actually discriminating

The previous shape '-flag -test true' left both flags at true, so the
assertion held even for a parser that bound the value to the preceding
flag. Give the two flags different values instead: with
'-flag -no_progress false' a wrong binding would leave 'flag' false and
'no_progress' true, so the test now fails if the ordering contract
breaks.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019UEHgs71nDGJrkfYTs8uRa

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant