Skip to content

docs(producer): say the setup budget bounds each step, not setup as a whole - #7333

Closed
miguel-heygen wants to merge 1 commit into
mainfrom
docs/setup-budget-comment
Closed

miguel-heygen wants to merge 1 commit into
mainfrom
docs/setup-budget-comment

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

Corrects the doc comment on createSessionInitBudget. It said each setup step races against what is left of one clock; each step is actually bounded by the budget on its own. No code change.

Why

createStallClock leaves out any gap longer than its 15 s suspend margin. idle(0) between setup steps therefore drops the time spent inside a long step, so a slow open does not shorten the init after it, and setup as a whole can take up to one budget per step. A review of #7329 pointed this out after it had entered the merge queue.

Related work

Refs #7329.

How

Comment only, in captureStreamingStage.ts. Behaviour stays as it was: moving to one shared deadline would also tighten the streaming route, so that is a separate decision.

Test plan

  • oxfmt and oxlint on the changed file.
  • Unit tests added/updated: not applicable, comment only.
  • Comments follow CONTRIBUTING.md "Comments".

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 107 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (8)

@miguel-heygen
miguel-heygen force-pushed the docs/setup-budget-comment branch from cea7dcd to 80387ab Compare November 6, 2026 20:14

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved at 80387ab6. I checked the new comment against createStallClock. setup.idle(0) adds any gap over 0 + SUSPEND_GAP_MS (15 s) to since, so a setup step longer than 15 s is dropped from the shared clock, and the next step gets the full initStallMs again. "Bounds each step, not setup as a whole" is accurate. Steps under 15 s still count against the shared budget, which matches "drops a step longer than its suspend gap". The change is a comment only and behaviour is the same. Not a fix PR, so no fails-without-the-fix line is needed.

@miguel-heygen

Copy link
Copy Markdown
Collaborator Author

Folded into #7337, which carries this comment change.

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.

1 participant