Skip to content

feat(BA-6891): add kernel scheduling-history v2 DTOs and service actions#12869

Draft
jopemachine wants to merge 1 commit into
feat/BA-6890-kernel-history-repository-scopefrom
feat/BA-6891-kernel-history-dto-service
Draft

feat(BA-6891): add kernel scheduling-history v2 DTOs and service actions#12869
jopemachine wants to merge 1 commit into
feat/BA-6890-kernel-history-repository-scopefrom
feat/BA-6891-kernel-history-dto-service

Conversation

@jopemachine

@jopemachine jopemachine commented Jul 15, 2026

Copy link
Copy Markdown
Member

📚 Stacked PRs

Part of the kernel scheduling-history v2 stack. Merge in order (bottom-up):

  1. fix(BA-6887): reference the real from_status/to_status columns in kernel history conditions #12857fix(BA-6887): reference the real from_status/to_status columns in kernel history conditions
  2. feat(BA-6889): add kernel scheduling-history query conditions and orders #12867feat(BA-6889): kernel scheduling-history query conditions and orders
  3. feat(BA-6890): add kernel scheduling-history repository search scope #12868feat(BA-6890): kernel scheduling-history repository search scope
  4. 👉 feat(BA-6891): add kernel scheduling-history v2 DTOs and service actions #12869feat(BA-6891): kernel scheduling-history v2 DTOs and service actions ← you are here
  5. feat(BA-6892): add kernel scheduling-history adapter and REST v2 endpoints #12870feat(BA-6892): kernel scheduling-history adapter and REST v2 endpoints
  6. feat(BA-6893): add kernel scheduling-history SDK v2 client and CLI commands #12866feat(BA-6893): kernel scheduling-history SDK v2 client and CLI commands

What

The v2 DTOs and the service layer for kernel scheduling history.

Review notes

The DTOs are shared with GraphQL. Per common/dto/manager/v2/AGENTS.md these are the single source of truth for REST v2 and the Strawberry schema, so BA-6883 builds its GraphQL types on these rather than defining its own. That is why the scope's non-emptiness rule lives in KernelHistoryScopeDTO.model_validator — one rule, both surfaces, rather than restated per surface.

KernelHistoryNode has no sub_steps, deliberately. kernel_scheduling_history defines no such column — the 84b901f69d16 migration added sub_steps to the deployment and route tables only. Worth flagging: BEP-1061 (§2.3) and BA-6852 both describe kernel history as carrying sub_steps, which does not match the schema. That discrepancy belongs to the writer side (BA-6852) and is left alone here.

Only the two inputs that get wired are added. There is no offset-only SearchKernelHistoryInput mirroring SearchSessionHistoryInput — that one has no callers, and mirroring it would add dead code.

The service methods are thin passthroughs, consistent with the existing ones. Actions are plain @dataclass, not frozen=True: the shared SchedulingHistoryAction base is non-frozen, so frozen subclasses are a TypeError. (services/AGENTS.md asks for frozen; the base and all six existing siblings already diverge. Out of scope here.)

The adapter that converts these DTOs and drives the processors is #12870.

🤖 Generated with Claude Code

Add the v2 DTOs and the service layer for kernel scheduling history.

The DTOs are the schema shared by REST v2 and GraphQL, so BA-6883 builds its
GraphQL types on these rather than defining its own.

KernelHistoryScopeDTO carries both scope axes as optional and rejects an empty
scope in a model_validator, so the rule lives with the schema both surfaces
share instead of being restated per surface.

KernelHistoryNode has no sub_steps: kernel_scheduling_history defines no such
column, unlike the session/deployment/route tables. BEP-1061 and BA-6852 both
describe kernel as carrying sub_steps, which does not match the schema; that
belongs to the writer side and is left alone here.

Only the two inputs that get wired are added. There is no offset-only
SearchKernelHistoryInput mirroring SearchSessionHistoryInput, as that one has
no callers.

The adapter that converts these DTOs and drives the processors lands in
BA-6892.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jopemachine
jopemachine force-pushed the feat/BA-6890-kernel-history-repository-scope branch from 3cda92e to d384322 Compare July 15, 2026 10:17
@jopemachine
jopemachine force-pushed the feat/BA-6891-kernel-history-dto-service branch from e8ce7ad to b8a7aaa Compare July 15, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:common Related to Common component comp:manager Related to Manager component size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant