Skip to content

benchmarking(boomer): disentangle dynConfig - #2160

Merged
Haven Xia (HavenXia) merged 1 commit into
agent-substrate:mainfrom
maxsmythe:dynconfig-json
Oct 16, 2026
Merged

Haven Xia (HavenXia) merged 1 commit into
agent-substrate:mainfrom
maxsmythe:dynconfig-json

Conversation

@maxsmythe

Copy link
Copy Markdown
Collaborator

dynconfig had become one struct of every knob every user class ever needed, with a payload mirror, a merge, a validator, and a log line that all need to grow by hand for each new field, and every class saw and was checked against every other class's knobs.

The payload is now an arbitrary JSON object, and a worker runs exactly one user class, known at launch. So each class declares the keys it reads as a struct with json tags, wraps it in a dynconfig.Typed codec with its defaults and its validation func, and registers the codec with its userclass.Entry. The worker builds the holder from that codec; the holder stores the typed value, folds each payload into it with one decode over the current value (so an absent or null key keeps what it had), refuses a payload the class cannot run on in favor of the last good config, and hands the class its knobs back through dynconfig.Get. Keys the class does not name are ignored. The wait window and the resume and lifecycle modes are shared pieces a class embeds; durations travel as seconds, the unit the locust flags use.

Now we can implement user classes more independently of each other.

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Comment thread internal/benchmarking/boomer/agentsession/agentsession_test.go
Comment thread internal/benchmarking/boomer/dynconfig/dynconfig.go Outdated
Comment thread internal/benchmarking/boomer/dynconfig/dynconfig.go
@maxsmythe
Max Smythe (maxsmythe) force-pushed the dynconfig-json branch 2 times, most recently from eeffb42 to e3a5337 Compare October 7, 2026 22:27
@thockin
Tim Hockin (thockin) added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 13, 2026

@haiyanmeng haiyanmeng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to resumepaused user class looks good to me

…e config

dynconfig had become one struct of every knob every user class ever
needed, with a payload mirror, a merge, a validator, and a log line that
all had to grow by hand for each new field, and every class saw and was
checked against every other class's knobs.

The payload is now an arbitrary JSON object, and a worker runs exactly one
user class, known at launch. So each class declares the keys it reads as a
struct with json tags, wraps it in a dynconfig.Typed codec with its
defaults and its validation func, and registers the codec with its
userclass.Entry. The worker builds the holder from that codec; the holder
stores the typed value, decodes each payload over the class's defaults,
refuses a payload the class cannot run on, an empty body included, in
favor of the last good config, and hands the class its knobs back through
dynconfig.Get. Keys the class does not name are ignored. The wait window
and the resume and lifecycle modes are shared pieces a class embeds;
durations travel as seconds, the unit the locust flags use, and print as
durations in the applied-config log line, which reports the snapshot the
payload stored rather than whatever a concurrent fetch put there since.

Each payload stands on its own. The master serves every flag it knows,
null for the ones the operator left blank, so a field cleared in the web
form takes its knob back to the class default. The old merge over the
running value kept the last set value instead, with no way back to the
default short of a restart. The startup --config-json still names only
the keys the run sets, and the rest start at the defaults as before.

The GluttonUser defaults the worker used to seed from main.go (a 500ms
max wait, one ping per wake) live in that class's codec now, and the
durdir read modes move into the glutton package with the class that reads
them. Each class's codec has a test that decodes every key it reads and
refuses the values the old shared validator refused.
@HavenXia
Haven Xia (HavenXia) added this pull request to the merge queue Oct 16, 2026
Merged via the queue into agent-substrate:main with commit 143d89a Oct 16, 2026
15 checks passed
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.

6 participants