Skip to content

feat(BA-6892): add kernel scheduling-history adapter and REST v2 endpoints#12870

Merged
HyeockJinKim merged 1 commit into
mainfrom
feat/BA-6892-kernel-history-adapter-rest
Jul 21, 2026
Merged

feat(BA-6892): add kernel scheduling-history adapter and REST v2 endpoints#12870
HyeockJinKim merged 1 commit into
mainfrom
feat/BA-6892-kernel-history-adapter-rest

Conversation

@jopemachine

@jopemachine jopemachine commented Jul 15, 2026

Copy link
Copy Markdown
Member

📚 Stacked PRs

Merge in order, bottom-up. Each PR is based on the one above it, so its diff shows only its own layer.

What

The kernel slice of the v2 scheduling-history adapter, plus the two REST v2 routes that expose it.

Route Auth
POST /v2/scheduling-history/kernels/search superadmin_required
POST /v2/scheduling-history/kernels/{kernel_id}/search auth_required

Shape matches the session / deployment / route slices already in this module: the scope is a
path parameter, and the adapter method takes it as a separate argument
(kernel_scoped_search(kernel_id, input)).

The scoped route runs through the existing ScopeActionProcessor, so access is resolved
against the RBAC scope rather than a role gate. That is why it is auth_required and not
superadmin_required — unlike the sibling scoped routes, which are all registered
superadmin_required.

DTO naming

One input and one payload, shared by both routes:

Type
Input SearchKernelHistoriesInput
Payload SearchKernelHistoriesPayload

No Admin-prefixed variants. The scope arrives in the path, so both routes take an identical
body, and the response shape does not depend on the caller either. KernelHistoryScopeDTO
sits in types.py next to SessionHistoryScopeDTO / DeploymentHistoryScopeDTO /
RouteHistoryScopeDTO for the GraphQL layer to use.

Not yet verifiable end-to-end

kernel_scheduling_history has no writer — KernelSchedulingHistoryCreatorSpec is defined but
called from nowhere, so the table is empty. BA-6852 adds the writer; live verification against a
running manager has to wait for it.

🤖 Generated with Claude Code


📚 Documentation preview 📚: https://sorna--12870.org.readthedocs.build/en/12870/


📚 Documentation preview 📚: https://sorna-ko--12870.org.readthedocs.build/ko/12870/


📚 Documentation preview 📚: https://sorna--12870.org.readthedocs.build/en/12870/


📚 Documentation preview 📚: https://sorna-ko--12870.org.readthedocs.build/ko/12870/

@github-actions github-actions Bot added size:L 100~500 LoC comp:manager Related to Manager component labels Jul 15, 2026
@github-actions github-actions Bot added size:XL 500~ LoC area:docs Documentations and removed size:L 100~500 LoC labels Jul 15, 2026
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from db1b59b to 6d7ebbc Compare July 15, 2026 09:40
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from b9b9a37 to 8c13791 Compare July 15, 2026 09:40
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from 6d7ebbc to e8ce7ad Compare July 15, 2026 09:56
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 8c13791 to 28b1894 Compare July 15, 2026 09:56
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from e8ce7ad to b8a7aaa Compare July 15, 2026 10:17
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 28b1894 to 3db2ec3 Compare July 15, 2026 10:17
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from b8a7aaa to 01a65ec Compare July 20, 2026 04:10
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 3db2ec3 to 610dd75 Compare July 20, 2026 04:10
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from 01a65ec to e23c1a9 Compare July 20, 2026 04:22
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 610dd75 to 24c5225 Compare July 20, 2026 04:28
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from e23c1a9 to 320012c Compare July 20, 2026 04:41
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 24c5225 to 9207228 Compare July 20, 2026 04:41
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from 320012c to 564c862 Compare July 20, 2026 04:47
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 9207228 to 6163a98 Compare July 20, 2026 04:47
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from 564c862 to c3289f0 Compare July 20, 2026 04:55
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 6163a98 to 164383b Compare July 20, 2026 04:55
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from c3289f0 to 8d1124c Compare July 20, 2026 05:05
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 164383b to 942cb3a Compare July 20, 2026 05:05
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from f05a631 to d889ad0 Compare July 20, 2026 06:59
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from a4f9d28 to e2857a0 Compare July 20, 2026 08:04
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 15b568a to 93a89e1 Compare July 20, 2026 08:04
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from e2857a0 to 1b11978 Compare July 20, 2026 08:13
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 93a89e1 to 03bd499 Compare July 20, 2026 08:13
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from 1b11978 to ae6f600 Compare July 20, 2026 08:26
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 03bd499 to d956d23 Compare July 20, 2026 08:26
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from ae6f600 to 0b3351f Compare July 20, 2026 08:41
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch 2 times, most recently from d1cf2de to 642d2ed Compare July 20, 2026 08:50
Base automatically changed from feat/BA-6891-kernel-history-dto-service to main July 21, 2026 01:23
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch 5 times, most recently from 0cfb5cf to aa33a76 Compare July 21, 2026 02:33
@jopemachine
jopemachine marked this pull request as ready for review July 21, 2026 02:34
@jopemachine
jopemachine requested a review from a team as a code owner July 21, 2026 02:34
Copilot AI review requested due to automatic review settings July 21, 2026 02:34

Copilot AI 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.

Pull request overview

Adds REST v2 access to kernel scheduling history through the existing adapter/service architecture.

Changes:

  • Adds admin and authenticated kernel-scoped search routes.
  • Converts kernel filters, ordering, pagination, and response DTOs.
  • Updates OpenAPI documentation and changelog.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
registry.py Registers kernel history routes and authorization middleware.
handler.py Adds REST request handlers.
path_params.py Adds the kernel UUID path model.
adapter.py Implements query conversion and processor integration.
openapi.json Documents schemas and endpoints.
12870.feature.md Records the feature change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ai/backend/manager/api/rest/v2/scheduling_history/registry.py Outdated
Comment thread src/ai/backend/manager/api/adapters/scheduling_history/adapter.py Outdated
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch 2 times, most recently from 971c64e to fa25066 Compare July 21, 2026 05:22

@HyeockJinKim HyeockJinKim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I didn't just want the kernel ID as the scope; I wanted to receive values that could be assigned to multiple scopes in the body, but it seems like something was set up incorrectly.

…oints

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentations comp:cli Related to CLI component comp:client Related to Client component comp:common Related to Common component comp:manager Related to Manager component size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants