Skip to content

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

Draft
jopemachine wants to merge 1 commit into
feat/BA-6891-kernel-history-dto-servicefrom
feat/BA-6892-kernel-history-adapter-rest
Draft

feat(BA-6892): add kernel scheduling-history adapter and REST v2 endpoints#12870
jopemachine wants to merge 1 commit into
feat/BA-6891-kernel-history-dto-servicefrom
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 adapter and the two REST v2 endpoints:

Route Auth
POST /v2/scheduling-history/kernels/search superadmin_required
POST /v2/scheduling-history/kernels/scoped/search auth_required

Two deliberate departures from the existing slices

Both follow the forward direction documented in api/rest/v2/AGENTS.md and client/v2/AGENTS.md, which the session / deployment / route slices predate.

1. The scope is a request body field, not a path param. A kernel query is scoped by session_id, kernel_id, or both, and an empty scope must be rejected — none of which a path param can express. api/rest/v2/AGENTS.md names this exact shape as the forward direction:

Forward direction: fixed path /v2/{entity}/scoped/search + scope as a request body field (not a path param). Consistent with SDK scoped_search and GQL scopedFoosV2.

Hence /kernels/scoped/search and the scoped_ handler prefix, rather than /kernels/{kernel_id}/search.

2. The scoped route uses auth_required, not superadmin_required. api/rest/v2/AGENTS.md states that all scoped search routes use auth_required, and BA-6882's acceptance criteria require a non-admin scoped search.

⚠️ Note the existing session / deployment / route scoped routes are all registered superadmin_required, which appears to defeat the purpose of a scoped search (a superadmin needs no scope). That looks like a bug in those routes, but changing them is out of scope here — flagging it for a separate decision.

Review notes

_convert_kernel_filter is the bulk of the diff and mirrors _convert_session_filter axis for axis. Tests cover filter conversion per axis, OR conjunction collapsing to one condition, order direction, and data→DTO conversion including null statuses.

The SDK and CLI that call these endpoints are #12866.

🤖 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 991d5fa to dc6cdba Compare July 20, 2026 05:18
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from 22ab654 to 1861c7a Compare July 20, 2026 05:30
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from dc6cdba to 82de9f8 Compare July 20, 2026 05:31
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from 1861c7a to 6a55238 Compare July 20, 2026 05:40
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 82de9f8 to 96bed41 Compare July 20, 2026 05:40
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from 6a55238 to f2a0d5a Compare July 20, 2026 05:46
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 96bed41 to d65ae59 Compare July 20, 2026 05:46
@github-actions github-actions Bot added comp:client Related to Client component comp:cli Related to CLI component labels Jul 20, 2026
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch 2 times, most recently from b39e38d to d1f2894 Compare July 20, 2026 05:55
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from f2a0d5a to 217d6c3 Compare July 20, 2026 06:07
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from d1f2894 to 43fee26 Compare July 20, 2026 06:07
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from 217d6c3 to ac0ef89 Compare July 20, 2026 06:16
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from 43fee26 to 425e498 Compare July 20, 2026 06:16
@github-actions github-actions Bot added the comp:common Related to Common component label Jul 20, 2026
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from ac0ef89 to d347c7a Compare July 20, 2026 06:38
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from fa25689 to 17d286a Compare July 20, 2026 06:38
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from d347c7a to a4f9d28 Compare July 20, 2026 06:59
@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 from d956d23 to bc9dfe8 Compare July 20, 2026 08:41
…oints

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jopemachine
jopemachine force-pushed the feat/BA-6892-kernel-history-adapter-rest branch from d1cf2de to 642d2ed Compare July 20, 2026 08:50
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.

1 participant