feat(config): introduce tuning presets (balanced, deep) - #329
Open
zizou0x wants to merge 1 commit into
Open
Conversation
A preset selects which defaults apply — one section per preset in the embedded default_config.toml and in the per-chain remote document. Local overrides behave unchanged on top. The two presets share values until tuned. Also: warn on unknown keys in local config files and log which fields the remote layer overrides. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
zizou0x
marked this pull request as draft
July 21, 2026 08:59
zizou0x
marked this pull request as ready for review
July 21, 2026 12:02
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.
Stacked on #328 (remote config layer).
What
Adds the preset concept: a
config::Preset(balanced|deep) selects whichdefaults apply. Both the embedded
default_config.tomland the per-chain remotedocument hold one section per preset (same layout in both files); every layer above
— local config file, CLI flags, legacy worker_pools.toml — behaves unchanged on top.
The two presets currently share identical values;
deepgets tuned later.--preset/PRESET(defaultbalanced); lib:get_default(chain, preset),Config::apply_remote(url, preset, timeout). A preset can never be set from a config file.presets/{chain}/latest.toml); the fetchselects the preset's section. A missing section (or empty document) is a quiet
"nothing tuned" state — the already-published empty payloads remain valid.
preset section can use newer algorithms without breaking binaries on other presets.
Presetis strum-derived; parsing, listing, and--helpvalues are generated, and aunit test fails if the enum and the file sections drift. Adding a preset = one
variant + one section per file.
FyndBuilder::newand fynd-rpc'sbuiltin_default()pin tobalanced.From the design review (fresh-context agent)
Applied: unknown keys in hand-written config files now warn (remote stays fully
permissive for forward compatibility, guarded by a field-list sync test); the remote
layer logs exactly which fields it overrides; the standalone router-timeout exception
is documented at the constant; layer-count doc fix;
--helptext cleanup.Not applied:
clap::ValueEnumforPreset(fynd-core has no clap dependency — strumis the boundary-respecting choice); trimming
get_default(deliberate convenienceAPI); changing legacy worker_pools.toml pools precedence (explicit
backward-compatibility decision, already warns); value-range floors in
validate()(no tuning bounds established yet — the new override logging provides visibility
instead).
🤖 Generated with Claude Code