Extract magic number for user account count to constant#46
Merged
Conversation
Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP address external API support updates
Extract magic number for user account count to constant
Jan 28, 2026
redpanda-f
approved these changes
Jan 28, 2026
redpanda-f
added a commit
that referenced
this pull request
Jan 30, 2026
…ink issue fix for "latest" (#45) * add: external api reference implementation * fix: issues * fix: CI issues * makehappy: fmt * fixes: CI * stablize: symlinks for /state/latest, simplify CI check * add: nodejs 20 installation * Update .github/workflows/ci.yml, use nodejs LTS Co-authored-by: Rod Vagg <rod@vagg.org> * Extract magic number for user account count to constant (#46) * Initial plan * Extract magic number 3 to USER_ACCOUNT_COUNT constant Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com> * Improve USER_ACCOUNT_COUNT constant documentation Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com> * item 1: remove balance fields from export * item 2: paths as source of truth * item 3: error handling with Result * item 5: improve symlink test * item 6: add zod schema validation * item 7: remove dead code * item 9: rename curio_providers to pdp * fix: remove unnecessary to_string calls * fixes: schema validation * makehappy: fmt * Update examples/read-devnet-info.js Co-authored-by: Rod Vagg <rod@vagg.org> * Update examples/read-devnet-info.js Co-authored-by: Rod Vagg <rod@vagg.org> * fix: warn message * fix: use expect() for yugabyte * add: expect() * fix: export * fix: examples README * remove: eslint * docs: enhance README with link to examples Added usage instructions and examples section to README. * feat: linkify README * update: examples --------- Co-authored-by: Rod Vagg <rod@vagg.org> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com> Co-authored-by: Steve Loeppky <biglep@filoz.org>
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.
Addresses code review feedback to eliminate magic number
3representing user account count. The coding guidelines require all magic numbers be extracted to constants, similar to howMAX_PDP_SP_COUNTis defined.Changes
Added
USER_ACCOUNT_COUNTconstant insrc/constants.rsset to3, representing the number of test user accounts (USER_1, USER_2, USER_3)Replaced 4 hardcoded
3values with the constant across:src/external_api/export.rs: User info export loopsrc/commands/start/usdfc_funding/usdfc_funding_step.rs: Balance checking, token transfer, and verification loopsThis centralizes the user count configuration and improves maintainability.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.