feat(BA-6883): expose kernel scheduling history over GraphQL v2#12989
Merged
Conversation
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
from
July 21, 2026 06:00
ca8c6a7 to
f4c96ed
Compare
This was referenced Jul 21, 2026
jopemachine
force-pushed
the
feat/BA-6892-kernel-history-adapter-rest
branch
from
July 21, 2026 06:06
e22ab80 to
e432eec
Compare
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
from
July 21, 2026 06:07
f4c96ed to
769ee93
Compare
jopemachine
force-pushed
the
feat/BA-6892-kernel-history-adapter-rest
branch
from
July 21, 2026 06:28
e432eec to
517ad26
Compare
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
from
July 21, 2026 06:28
769ee93 to
037de46
Compare
jopemachine
force-pushed
the
feat/BA-6892-kernel-history-adapter-rest
branch
from
July 21, 2026 06:40
517ad26 to
a7abc8e
Compare
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
from
July 21, 2026 06:40
037de46 to
7982881
Compare
Base automatically changed from
feat/BA-6892-kernel-history-adapter-rest
to
main
July 21, 2026 06:54
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
from
July 21, 2026 06:57
7982881 to
8629480
Compare
jopemachine
commented
Jul 21, 2026
jopemachine
commented
Jul 21, 2026
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
from
July 21, 2026 07:01
8629480 to
bb424dc
Compare
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
from
July 21, 2026 07:02
bb424dc to
93ae650
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds GraphQL v2 access to kernel scheduling history through admin and RBAC-scoped queries.
Changes:
- Adds kernel history GraphQL types, filters, ordering, connections, and resolvers.
- Adds Relay node batch loading through the scheduling-history adapter.
- Regenerates GraphQL schemas and adds a changelog fragment.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
schema.py |
Registers kernel history query roots. |
scheduling_history/types.py |
Defines kernel history GraphQL types and inputs. |
scheduling_history/resolver.py |
Implements admin and scoped queries. |
scheduling_history/__init__.py |
Exports new GraphQL symbols. |
data_loader/data_loaders.py |
Adds the kernel history DataLoader. |
adapters/scheduling_history/adapter.py |
Adds batch loading by history ID. |
v2-schema.graphql |
Records generated v2 SDL changes. |
supergraph.graphql |
Records generated federated schema changes. |
changes/12989.feature.md |
Documents the feature for release notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
3 times, most recently
from
July 21, 2026 07:21
2d50b46 to
7f66aec
Compare
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
from
July 21, 2026 07:25
7f66aec to
4b1cbea
Compare
Add the kernel slice of the Strawberry scheduling-history schema, mirroring the session, deployment, and route slices: - `adminKernelSchedulingHistories` — super-admin, system-wide - `kernelScopedSchedulingHistories` — scoped to one kernel via `KernelScope` The node exposes `kernel` and `session` back-references through the existing data loaders, and `resolve_nodes` is backed by a new `kernel_history_loader` over `batch_load_kernel_histories_by_ids`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-6883-kernel-history-gql
branch
from
July 21, 2026 07:27
4b1cbea to
5f814cd
Compare
jopemachine
marked this pull request as ready for review
July 21, 2026 07:32
This was referenced Jul 21, 2026
HyeockJinKim
approved these changes
Jul 21, 2026
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 columns ✅BA-6889models: kernel query conditions and orders ✅BA-6890repository: kernel search scope and scoped search ✅BA-6891DTO + service: kernel v2 DTOs and search actions ✅BA-6892adapter + REST v2: kernel endpoints ✅BA-6883GraphQL v2: kernel history roots ← you are hereBA-6893SDK + CLI: kernel commandsBA-6953component tests: kernel REST v2 endpointsMerge in order, bottom-up. Each PR is based on the one above it, so its diff shows only its own layer.
Resolves #12852 (BA-6883)
Summary
adminKernelSchedulingHistories(super-admin,check_admin_only()) andscopedKernelSchedulingHistories(scope: KernelScope!)(RBAC-resolved), following theadminFoos/scopedFoosconvention inapi/gql/AGENTS.mdrather than the{scope}Foosshape the session / deployment / route slices still use.KernelV2.schedulingHistoriesfor walking from a kernel to its history, mirroringAgentV2.sessions. It takes the same filter / order / cursor / offset arguments as the scoped root and injectskernel_id=self.id.GQLPython suffix and a suffix-free schemaname=:KernelSchedulingHistoryGQL,KernelScopeGQL,KernelSchedulingHistoryFilterGQL,KernelSchedulingHistoryOrderByGQL,KernelSchedulingHistoryOrderFieldGQL,KernelSchedulingHistoryConnectionGQL.phase,from_status,to_status,result, andattemptsas well as the two timestamps. That needed the DTO enum,KERNEL_ORDER_FIELD_MAP, and the GQL enum widened together — the map is keyed by the enum, so they have to stay in step.resolve_nodesis backed by a newkernel_history_loaderoverbatch_load_kernel_histories_by_ids;KernelSchedulingHistoryIDis the key type end to end. Everything else reuses the adapter from feat(BA-6892): add kernel scheduling-history adapter and REST v2 endpoints #12870 — no new service or repository code.added_versionusesNEXT_RELEASE_VERSIONperapi/gql/AGENTS.md.The history node exposes
kernelId/sessionIdas scalars and carries no back-reference fields; traversal to the entity goes throughKernelV2.schedulingHistories.SessionV2.kernelHistoriesfrom the issue description is intentionally not implemented — a session-wide query needs the action, repository search scope, and RBAC element widened beyond a single kernel, which is service/repository work rather than a GraphQL change.Test plan
KernelV2field resolve*GQLname leaks into the schemaKernelHistoryOrderFieldmember resolves throughresolve_kernel_orderv2-schema.graphql/supergraph.graphql/openapi.jsonregeneratedruff check/ruff formatcleankernel_scheduling_historyhas no writer (KernelSchedulingHistoryCreatorSpecis called from nowhere), so the table stays empty until BA-6852 lands🤖 Generated with Claude Code