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

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

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