Skip to content

Define bisection core architecture, components, ADRs, and initial contracts - #21

Open
manul7 wants to merge 8 commits into
kernelci:mainfrom
manul7:proposal/components
Open

Define bisection core architecture, components, ADRs, and initial contracts#21
manul7 wants to merge 8 commits into
kernelci:mainfrom
manul7:proposal/components

Conversation

@manul7

@manul7 manul7 commented May 22, 2026

Copy link
Copy Markdown

Summary

Restructures the bisection design docs into a component architecture: a component catalog, six component docs, the contracts between them, nine ADRs (which I accepted internally), and architecture/workflow diagrams (can be imprecise). Updates terms, data model, and the open-questions registry.

I use two shallow scenarios to develop and test this proposal - functional regression and performance regression. As I'm focused on performance regressions more, so it's expected to see gaps for functional regressions.

Main Changes

  • Split BCO and BTO into separate services with separate state ownership.
  • Route build/test execution through BTO.
  • Define BCO admission, deduplication, recovery, and output boundaries.
  • Define Commit Selector ownership for candidate selection and convergence.
  • Define Results Analyzer as the evidence boundary.
  • Define Decision Engine as the step-decision boundary.
  • Keep performance baseline and metric direction trigger-supplied.
  • Add draft contracts for campaign, execution, selection, evidence, and decision boundaries.
  • Update architecture, terms, data model, diagrams, and open questions.

Status

  • Architecture review. I would like to see feedback from interested parties, before moving further.
  • ADRs are marked Accepted to show the current proposed direction; review may still change them.

Review Focus

  • Component ownership boundaries.
  • Contract boundaries.
  • OQ that should be resolved or rewritten.

@manul7
manul7 force-pushed the proposal/components branch from d884569 to aa70a5c Compare June 19, 2026 12:33
@manul7
manul7 marked this pull request as ready for review June 19, 2026 13:03
@manul7 manul7 changed the title WIP: Define bisection architecture, components, ADRs, and initial contracts Define bisection core architecture, components, ADRs, and initial contracts Jun 19, 2026
@broonie

broonie commented Jun 19, 2026

Copy link
Copy Markdown
Member

I started looking at this new version - one very high level initial comment is that it could use some terminology definitions (BCO? BTO?) at the start to make things easier to follow.

Comment thread docs/adr/0008-runtime-bto-execution-composition.md Outdated
Comment thread docs/components/bto.md
Comment thread docs/contracts/build-identity.md Outdated
Comment thread docs/contracts/build-identity.md Outdated
Comment thread docs/contracts/build-test-plan-request.md
Comment thread docs/adr/0006-push-driven-plan-resumption.md Outdated
Comment thread docs/components/bco.md Outdated
Comment thread docs/components/state-store.md
Comment thread docs/contracts/bco-output.md
Comment thread docs/contracts/commit-selection-request.md
@manul7
manul7 force-pushed the proposal/components branch from aa70a5c to a42a1a8 Compare July 8, 2026 15:24
Konstantin Belov added 5 commits July 13, 2026 13:08
Document split between campaign orchestration and build-test execution.

Add the BTO design, runtime composition model, build-test plan
contracts, runner outcome vocabulary, and the BTO plan-execution
diagram.

Keep BCO on one bundled plan request/result boundary and leave
composition, planner, builder, tester, cache, and artifact
handoff details behind BTO.

Signed-off-by: Konstantin Belov <konstantin.belov@linaro.org>
Campaigns are long-running, crash-prone, and triggered more than once per
regression. With no single owner, restarts lose progress and duplicate
triggers run duplicate work.

Document BCO as the owner: it admits triggers, collapses duplicates onto
one campaign via an equivalence key, and persists state to resume after a
crash. Long build/test work resumes on a BTO push, with a scan as fallback.

Signed-off-by: Konstantin Belov <konstantin.belov@linaro.org>
Embedding next-commit selection in BCO fixes the search to plain bisection
and couples every search-policy change to orchestration code.

Document Commit selector as the owner of search policy, candidate
selection, and convergence. BCO requests the next commit through a narrow
contract; multi-candidate policies stay open questions.

Signed-off-by: Konstantin Belov <konstantin.belov@linaro.org>
Build and test output is noisy and shaped by the backend. Reading a verdict
straight out of it blurs two questions: could this commit be tested at all,
and if so, is it good or bad. A commit that never built and a commit that
built and regressed both need a verdict, but the search has to keep them
apart.

Results Analyzer turns raw output into evidence and nothing more. Decision
engine reads that evidence and returns the step decision in two stages.
Qualification comes first, so an untestable commit becomes skip rather than
a false good or bad. The binary or performance check follows. Baseline and
metric direction come from the trigger, so the system never measures a
boundary itself.

Signed-off-by: Konstantin Belov <konstantin.belov@linaro.org>
Replace it with a component map and catalog, and add the shared terms,
data model, and open-question registry the other docs reference.

Signed-off-by: Konstantin Belov <konstantin.belov@linaro.org>
@manul7
manul7 force-pushed the proposal/components branch from a42a1a8 to 02a873c Compare July 13, 2026 11:08
Comment thread docs/diagrams/work-routing.mmd
@bhcopeland
bhcopeland self-requested a review July 23, 2026 14:55
Konstantin Belov added 3 commits August 6, 2026 13:51
Track execution_status, execution_environments, and plan references
per attempt, and widen the performance regression's fixed-scope
dimensions to include kernel configuration and toolchain.

Signed-off-by: Konstantin Belov <konstantin.belov@linaro.org>
Signed-off-by: Konstantin Belov <konstantin.belov@linaro.org>
Signed-off-by: Konstantin Belov <konstantin.belov@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants