feat(BA-6891): add kernel scheduling-history v2 DTOs and service actions#12869
Draft
jopemachine wants to merge 1 commit into
Draft
Conversation
This was referenced Jul 15, 2026
Merged
jopemachine
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
from
July 15, 2026 09:40
497c88e to
f9eff31
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 15, 2026 09:40
db1b59b to
6d7ebbc
Compare
jopemachine
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
from
July 15, 2026 09:56
f9eff31 to
3cda92e
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 15, 2026 09:56
6d7ebbc to
e8ce7ad
Compare
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
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
from
July 15, 2026 10:17
3cda92e to
d384322
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 15, 2026 10:17
e8ce7ad to
b8a7aaa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 Stacked PRs
BA-6887fix: kernel history conditions reference the real status columnsBA-6889models: kernel query conditions and ordersBA-6890repository: kernel search scope and scoped searchBA-6891DTO + service: kernel v2 DTOs and search actions ← you are hereBA-6892adapter + REST v2: kernel endpointsBA-6893SDK + CLI: kernel commandsMerge 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.mdthese 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 inKernelHistoryScopeDTO.model_validator— one rule, both surfaces, rather than restated per surface.KernelHistoryNodehas nosub_steps, deliberately.kernel_scheduling_historydefines no such column — the84b901f69d16migration addedsub_stepsto the deployment and route tables only. Worth flagging: BEP-1061 (§2.3) and BA-6852 both describe kernel history as carryingsub_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
SearchKernelHistoryInputmirroringSearchSessionHistoryInput— 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, notfrozen=True: the sharedSchedulingHistoryActionbase is non-frozen, so frozen subclasses are aTypeError. (services/AGENTS.mdasks 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