feat(shape): add valley pattern (high→low→high, inverse of pyramid)#847
Open
jonathaneoliver wants to merge 2 commits into
Open
feat(shape): add valley pattern (high→low→high, inverse of pyramid)#847jonathaneoliver wants to merge 2 commits into
valley pattern (high→low→high, inverse of pyramid)#847jonathaneoliver wants to merge 2 commits into
Conversation
…amid A bandwidth-shaping pattern that starts at the TOP cap, dips to the floored trough, then climbs back. Because it starts high, the player cold-starts at full bandwidth — no over-selection wedge — so it needs NO startup cap (is.peak_bitrate_mbps), unlike pyramid which starts low. The trough is the rate-limiting stress; the climb tests recovery. - go-proxy/pkg/ladder/pattern.go: BuildPattern `valley` case (desc then asc, dropping the trough dupe, sharing the pyramid over-selection floor so the trough stays sustainable) + a mirrored unit test. - go-proxy proxy gate, OpenAPI v2 enum, regenerated harness client (proxy.Valley) + dashboard types (v2.ts), harness `--pattern valley` (shape.go), the Pattern field doc, the dashboard pattern picker. - Docs: README, server-behavior.md, CONVENTIONS.md, and the test-author skill's mode→shape registry. Verified: go-proxy + harness-cli build; TestBuildPattern passes (valley is high→low→high, floored, symmetric, same length as pyramid). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… api-docs Three sites the first pass missed (caught by a plumb-everywhere audit + the dashboard's TS type check on deploy): - go-proxy/pkg/v2oapigen/oapigen.gen.go: regenerated so PatternTemplate + .Valid() include valley (the v2 server's own enum). - NetworkShapingPattern.vue: TEMPLATE_LABELS needed a `valley` entry (the Record<Template,string> made it required once valley joined the TEMPLATES union) — '🏞 Valley'. - content/dashboard/api-docs/proxy-v2.yaml: re-synced the spec copy. Verified: go-proxy builds, dashboard `npm run build` passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
A new bandwidth-shaping pattern,
valley— the inverse ofpyramid. Starts at the top cap, dips to the floored trough, climbs back: high → low → high.Why
pyramidstarts low, so the player cold-starts by over-selecting a high rung it can't load under the cap → startup wedge (you have to addis.peak_bitrate_mbpsto avoid it).valleystarts high, so the player cold-starts at full bandwidth cleanly — no startup cap needed. The trough is the rate-limiting stress; the climb-back tests recovery. (Surfaced while trying to run a group rate-limit test and repeatedly hitting the documented cold-start over-selection wedge.)Changes
go-proxy/pkg/ladder/pattern.go—BuildPatternvalleycase:reversedFloat(asc)thenasc[1:](descend, then ascend dropping the trough dupe), sharing the pyramid over-selection floor so the trough stays sustainable. + a mirroredTestBuildPatternassertion (high→low→high, floored, symmetric, same length as pyramid).TemplateModegate (main.go), OpenAPI v2 enum (proxy.yaml), regenerated harness client (proxy.Valley) + dashboard types (v2.ts), harness--pattern valley(shape.go),Patternfield doc (experiment.go), dashboard pattern picker (NetworkShapingPattern.vue).README.md,.claude/standards/server-behavior.md,.claude/skills/CONVENTIONS.md, and thetest-authorskill's mode→shape registry.Verified
go-proxy+harness-clibuild;TestBuildPatternpasses. Generated files regenerated viamake gen-harness-cli-client+npm run gen-types(not hand-edited).Usage
🤖 Generated with Claude Code