Skip to content

Add dynamic MDB Chrome workspace capacity - #15

Merged
alexanderradahl merged 1 commit into
mainfrom
fix/dynamic-browser-pool-20260827
Aug 28, 2026
Merged

Add dynamic MDB Chrome workspace capacity#15
alexanderradahl merged 1 commit into
mainfrom
fix/dynamic-browser-pool-20260827

Conversation

@alexanderradahl

Copy link
Copy Markdown
Owner

Problem

The managed MDB Chrome workspace was fixed at eight tabs. When Growth and Media Buying workers leased all eight concurrently, later jobs waited 20 seconds and blocked even though more background capacity would have been safe after the operator next focused Chrome naturally.

What changed

  • Keep eight tabs as the default, raise the hard maximum to 32, and add a four-tab automatic growth step.
  • Persist a growth-only target separately from the current workspace tab state.
  • Make chrome_workspace_setup(pool_size=N) accept 1 through 32 and persist the target even while Chrome is in the background.
  • Create missing tabs immediately only when the existing MDB Chrome window is already naturally focused; otherwise report truthful pending capacity and expand on the next natural focus.
  • Never close existing tabs when a lower target is requested.
  • On lease pressure, raise the target by four only when no earlier expansion is pending, capped at 32.
  • Expose current, target, maximum, step, pending count, provisioning state, and growth availability in workspace status and safe exhaustion details.
  • Bump the unpacked extension to 0.2.10.

Safety and migration

  • No loose fallback tabs were added.
  • MDB never activates or focuses Chrome to create capacity.
  • Existing installations without target state migrate to the eight-tab default.
  • Invalid target storage falls back safely to eight.
  • URL grants, profile binding, lease renewal/reclamation, release ordering, and idle group collapse remain unchanged.
  • A lower provisioning request is growth-only and never removes tabs.

Verification

  • npm run check
  • node tests/chrome-workspace-capacity.mjs
  • node tests/chrome-fill-background.mjs
  • node tests/chrome-background.mjs
  • npm test
  • git diff --check

The new deterministic capacity suite covers normalization and corrupt-state fallback, growth-only targets, 8→12 pressure growth, no repeated ratchet while expansion is pending, the 32-tab cap, status fields, unfocused deferred provisioning with zero tab creation, focused active:false expansion, and safe error-detail filtering.

@alexanderradahl
alexanderradahl merged commit 7456f5a into main Aug 28, 2026
2 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.

1 participant