engine: mode-scoped traversal defaults (modern parallel+sorted, find unordered) - #144
Merged
Conversation
…unordered) Completes the deferred piece of the parallel walk (#43/#54). RunFind gains an optional registry::Style: when the user gives no --sort / -j, the default is mode-scoped - kXff (modern) sorts each directory (--sort=dir) and runs a capped parallel walk (max(1, min(cores-1, 15))); kFind matches find (unordered) but saturates cores. std::nullopt keeps the conservative unordered + sequential default, so the ~32 in-process RunFind callers and conformance are untouched; the CLI passes the active style (config::ActiveStyle / argv[0] dispatch). run_test::ModeScopedSortDefault locks the behavior (kXff deterministic dir- sorted; kFind same set, unordered). Full suite green under default and asan+ubsan; tsan unaffected (test callers stay sequential; walk_test already covers the parallel path).
helly25
enabled auto-merge (squash)
June 27, 2026 14:58
helly25
disabled auto-merge
June 27, 2026 15:01
…efix rule run_test's ModeScopedSortDefault wrote ::testing::ElementsAre inline even though the file already has `using ::testing::ElementsAre;` - use the bare name. STYLE_CPP.md now states the rule explicitly: bring matchers in with a using and never write the ::testing:: prefix inside an EXPECT_THAT/ASSERT_THAT expression (fixture utilities like ::testing::Test are exempt). Audited the suite: this was the only inline-qualified matcher.
helly25
enabled auto-merge (squash)
June 27, 2026 15:05
helly25
added a commit
that referenced
this pull request
Jul 11, 2026
Each --summary[=X] is now its own sink, mirroring --histogram (already a list): `xff . -type f --summary=ext --summary=type` prints both tables, in occurrence order, separated by a blank line. --summary=none clears the list (all off). --top / --summary-precision stay global and apply to every table. This delivers the multiple-sinks benefit that was #144's only remaining driver after #145 gave the positional win, WITHOUT the expression-action machinery first proposed (no single-dash action, no suppress-default- print, no expression scoping). ResolveSummary -> ResolveSummaries (a vector<SummarySpec>); the walk keeps one {group -> {count,size}} map per sink; a render lambda emits each table. The single-summary output is unchanged. Docs: the --summary GlobalFlag summary/details note repeatable; XFF.md regenerated. Test: multiple_summary_flags_emit_independent_tables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the deferred piece of the parallel walk (#43): the mode-scoped auto-defaults, now that the config style (
registry::Style,ActiveStyle, argv[0] dispatch) exists.RunFindgains an optionalregistry::Style. With no--sort/-j, the default is mode-scoped:--sort=dir(each directory's listing sorted) + a capped parallel walkmax(1, min(cores-1, 15)).std::nullopt: conservative unordered + single-threaded - so the ~32 in-processRunFindcallers and the conformance suite are untouched (no signature ripple, no behavior change for tests).EnforceStyle), soxff <dir>now comes out dir-sorted whilexff --config=find <dir>(or invoked asfind) stays unordered. Verified end-to-end.run_test::ModeScopedSortDefaultlocks it in (kXff deterministic; kFind same set unordered). Green under default and asan+ubsan; tsan unaffected.