Skip to content

feat: automate local BenID pool top-up (no more manual Generate BenID… - #186

Open
vishwab1 wants to merge 1 commit into
release-3.9.0from
vb/3.9.0-bengen
Open

feat: automate local BenID pool top-up (no more manual Generate BenID…#186
vishwab1 wants to merge 1 commit into
release-3.9.0from
vb/3.9.0-bengen

Conversation

@vishwab1

Copy link
Copy Markdown
Member

… click)

Adds BenIDPoolTopUpScheduler: on startup, bootstraps 10,000 BenIDs if the local pool is empty; daily at 6 PM, tops up by 1,000 if the pool has dropped below 5,000; retries hourly if a top-up attempt fails (no signal, timeout, or a garbled response are all treated as failure and retried, never as a partial success).

Only runs on van/laptop deployments - reuses the existing stoptb.enforce.vanid / stoptb.van.id properties (already used by Identity-API/FLW-API/TM-API on the same laptop) as the guard, so this never fires on a central-deployed instance of MMU-API. An in-progress flag prevents two top-up attempts running at once.

New config: benCheckUrlLocal, benid.pool.lowerLimit/batchSize/bootstrapSize, benGenSchedulerCredential (static server-to-server credential, since a scheduled job has no logged-in user session).

📋 Description

JIRA ID:

Please provide a summary of the change and the motivation behind it. Include relevant context and details.


✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ Additional Information

Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.

… click)

Adds BenIDPoolTopUpScheduler: on startup, bootstraps 10,000 BenIDs if the
local pool is empty; daily at 6 PM, tops up by 1,000 if the pool has
dropped below 5,000; retries hourly if a top-up attempt fails (no signal,
timeout, or a garbled response are all treated as failure and retried,
never as a partial success).

Only runs on van/laptop deployments - reuses the existing
stoptb.enforce.vanid / stoptb.van.id properties (already used by
Identity-API/FLW-API/TM-API on the same laptop) as the guard, so this
never fires on a central-deployed instance of MMU-API. An in-progress
flag prevents two top-up attempts running at once.

New config: benCheckUrlLocal, benid.pool.lowerLimit/batchSize/bootstrapSize,
benGenSchedulerCredential (static server-to-server credential, since a
scheduled job has no logged-in user session).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3c429f66-bc7a-4779-83e5-c008c58f7e9f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

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