-
Notifications
You must be signed in to change notification settings - Fork 123
perf(agent): execution profiles with one-shot posture escalation (PR10b+PR10c) #740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7366967
perf(agent): execution profiles, --exec-profile, bench passthrough, T…
Vasanthdev2004 3e96a58
fix(execprofile): harden profiles against review findings
Vasanthdev2004 d6688ab
fix(execprofile): explicit effort choices disarm the escalation effor…
Vasanthdev2004 1c56a40
fix(execprofile): address review findings on the profile surfaces
Vasanthdev2004 b621b5b
fix(tui): reconcile an active profile's effort fill on model switch
Vasanthdev2004 86c2c03
fix(tui): void profile effort bookkeeping when the model-switch drop …
Vasanthdev2004 6778eb5
fix(tui): only drop an explicit effort when the target ring is author…
Vasanthdev2004 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| package main | ||
|
|
||
| import ( | ||
| "strings" | ||
| "testing" | ||
| ) | ||
|
|
||
| func TestParseTurnArgsExecProfile(t *testing.T) { | ||
| getenv := func(string) string { return "" } | ||
| options, err := parseTurnArgs([]string{ | ||
| "--suite", "suite.json", | ||
| "--model", "m", | ||
| "--exec-profile", "fast", | ||
| }, getenv) | ||
| if err != nil { | ||
| t.Fatalf("parseTurnArgs: %v", err) | ||
| } | ||
| if options.ExecProfile != "fast" { | ||
| t.Fatalf("ExecProfile = %q, want fast", options.ExecProfile) | ||
| } | ||
|
|
||
| // Inline form. | ||
| options, err = parseTurnArgs([]string{ | ||
| "--suite=suite.json", | ||
| "--model=m", | ||
| "--exec-profile=thorough", | ||
| }, getenv) | ||
| if err != nil { | ||
| t.Fatalf("parseTurnArgs inline: %v", err) | ||
| } | ||
| if options.ExecProfile != "thorough" { | ||
| t.Fatalf("ExecProfile = %q, want thorough", options.ExecProfile) | ||
| } | ||
| } | ||
|
|
||
| // The bench validates the profile BEFORE spawning anything: an unknown name | ||
| // would otherwise make every child exit with a usage error in milliseconds | ||
| // and record those near-zero walls as valid latency samples in an exit-0 | ||
| // report. Lookup normalization also keeps the stamped name canonical so two | ||
| // captures of the same posture compare equal. | ||
| func TestParseTurnArgsExecProfileValidatesAndNormalizes(t *testing.T) { | ||
| getenv := func(string) string { return "" } | ||
|
|
||
| options, err := parseTurnArgs([]string{ | ||
| "--suite", "suite.json", "--model", "m", "--exec-profile", "FAST", | ||
| }, getenv) | ||
| if err != nil { | ||
| t.Fatalf("parseTurnArgs: %v", err) | ||
| } | ||
| if options.ExecProfile != "fast" { | ||
| t.Fatalf("ExecProfile = %q, want the canonical fast", options.ExecProfile) | ||
| } | ||
|
|
||
| _, err = parseTurnArgs([]string{ | ||
| "--suite", "suite.json", "--model", "m", "--exec-profile", "blanced", | ||
| }, getenv) | ||
| if err == nil { | ||
| t.Fatal("an unknown profile must fail parse, before anything spawns") | ||
| } | ||
| for _, name := range []string{"balanced", "fast", "thorough"} { | ||
| if !strings.Contains(err.Error(), name) { | ||
| t.Fatalf("error must list %q, got %q", name, err.Error()) | ||
| } | ||
| } | ||
| } |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.