Skip to content

Pt1 7467#35

Open
shmuelko wants to merge 7 commits into
masterfrom
PT1-7467
Open

Pt1 7467#35
shmuelko wants to merge 7 commits into
masterfrom
PT1-7467

Conversation

@shmuelko

@shmuelko shmuelko commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Fixes https://practitest-uri.atlassian.net/browse/PT1-7467, https://practitest-uri.atlassian.net/browse/PT1-7428, https://practitest-uri.atlassian.net/browse/PT1-2640

Description

What has been changed?

Added a new GET /api/v2/account endpoint that returns account-level information, currently
exposing the API rate limit (api_max).

Why is this needed?

API consumers need a way to programmatically retrieve account-level settings — specifically the
effective API rate limit — so they can self-throttle and avoid hitting 429 errors.

Implementation Details

  • New controller: Api::V2::AccountsController#show — renders the account using the standard
    JSON:API envelope via BaseApiController
  • New serializer: AccountSerializer — exposes id and api_max attributes
  • Route: resource :account, only: [:show] added under api/v2 namespace
  • api_max_period removed from account serializer (not needed for this endpoint)

Automation:

  • Unit tests have been added/updated. (spec/controllers/api/v2/accounts_controller_spec.rb
    covers 200 response, default and custom rate limits)
  • No tests were added/updated. (Explain why)

Additional Notes

The endpoint is account-scoped (authenticated via account token, same as other v2 endpoints). No new
external dependencies.

@gitstream-cm

gitstream-cm Bot commented Jun 9, 2026

Copy link
Copy Markdown

🥷 Code experts: deshilovPT, stask

shmuelko, deshilovPT have most 🧠 knowledge in the files.

See details

src/practitest_firecracker/api.clj

Knowledge based on git-blame:
shmuelko: 98%
deshilovPT: 2%

src/practitest_firecracker/const.clj

Knowledge based on git-blame:
shmuelko: 100%

src/practitest_firecracker/core.clj

Knowledge based on git-blame:
deshilovPT: 55%
shmuelko: 27%

src/practitest_firecracker/parser/core.clj

Knowledge based on git-blame:
deshilovPT: 54%

src/practitest_firecracker/query_dsl.cljc

Knowledge based on git-blame:
shmuelko: 83%

test/practitest_firecracker/query_dsl_test.clj

Knowledge based on git-blame:
shmuelko: 100%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants