← Back to Pull requests

Overhaul CMake superbuild contracts and incremental builds #267

Closed
unknown closed this pull request without merging on Oct 07, 2026 21:54 UTC
View on GitHub
unknown unknown commented on Oct 07, 2026 17:15 UTC
Author

Component builds could retain stale generated or installed files, lose configuration arguments, and rely on inconsistent implicit dependencies. This makes the CMake superbuild's configuration, component, installation, test, toolchain-cache, and image contracts explicit while preserving the existing public target vocabulary.

  • Share architecture/mode identity and toolchain-owned ABI requirements while keeping component-specific flags local.

  • Validate component registration and installation ownership, including bounded ownership transfers and stale-file cleanup.

  • Build the kernel interface/vDSO and bootinit as separate prerequisites, with explicit dependencies for generated headers, installed libraries, and embedded artifacts.

  • Preserve caller flags, host compiler selections/options, launcher arguments, and child CTest commands/properties; keep assertions enabled in optimized tests.

  • Validate cached upstream installations and coordinate pruning, recovery, and concurrent Make invocations.

  • Give images explicit producers and checked packaging, with reproducible CPIO/FAT output for identical installed payloads. Thorn's intentional syscall randomization remains unchanged.

  • Run the complete ordered build-system suite as one matrix job; keep matrix entry scripts at the top of ci/ and helpers, tests, and fixtures in subdirectories.
  • The branch is rebased onto current main, including LLVM 23.1.3. Children remain configured through the superbuild. The superbuild requires the Unix Makefiles generator and verifies that its selected executable is GNU Make before compiler discovery.

    Validation: ci/tests/build-system/run --fixtures-only, matrix compilation/dispatch, workflow policy, and shell syntax checks pass. Real Autoconf configuration and recursive Make compilation preserve launcher argv and required compiler options; installed toolchain mode tests compile UEFI C/C++ through apostrophe-containing sysroots. Recovery regressions preserve unrelated objects for verified configuration-only changes and force fresh objects when a compiler changes at the same path. The independent review configured every historical revision and exercised 17 focused fixture suites. Earlier validation covered installed-library linking, split kernel components, native Debug/Release tests, real image packaging, and UEFI boot smokes. PR CI validates the complete suite with current installed upstream tools.

    Configuration-only recovery preserves compatible unpruned build trees after compiler fingerprints are recorded. Compiler/source changes, pruned caches requiring recovery, and installations without compiler attestation require conservative recovery. Read-only lifecycle probes account for guard-triggered recovery that Make's dry run cannot see; package preparation is followed by a fresh configure and LLVM deferral check. Bootstrap fixes use real compiler wrappers for Autoconf, provide gettext's required macros, and preset CMake's OpenSSL option before its first generated header. Empty language-standard selections use the project defaults.

    Accepted limitations: source paths containing literal pipes, and ambiguous cache fingerprints for specially supplied host compiler arguments differing only by pipes versus semicolons. These unusual inputs are outside this change's supported scope.

    Diff: 414 lines (+310 / -104) across 5 files Reviewer: griwes Review duration: 279m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 414 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.361
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #267"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.9% (MEDIUM) · Higher = larger blast radius
    44.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.7% · Safe to merge
    17.7%