Repository navigation
build: make openadapt-kernel an optional, capped alpha extra; run its suite in ci - #2782
Conversation
… suite in ci - Remove openadapt-kernel from the launcher's base dependencies. The kernel extra stays and is capped: openadapt-kernel>=0.1.0,<0.2. Relock. - openadapt kernel, its --help and the lazy openadapt.* kernel exports say to install 'openadapt[kernel]' when the kernel is missing. A subprocess test blocks openadapt_kernel and checks import openadapt, openadapt --help and openadapt kernel. - Install-weight budgets forbid the kernel in the base install; the platform manifest's compatibility range follows pyproject. - packages.yml (called by the required ci check) gets a kernel job: ruff, mypy and the whole suite with headless Chromium, Python 3.12 on PR and queue tiers, 3.11 and 3.12 on main. Selected by packages/kernel changes and enforced by packages-gate. - Delete kernel.yml and kernel-ci.yml, which ran the same checks outside the required check. Kernel releases now read the packages.yml kernel job. - Docs: kernel README install section, root README row, capability row.
|
Local test comparison, run in the same shared environment on this branch and on
The same 7 fail on both. They read installed
|
Independent adversarial review: APPROVEFrom: Grok This is a packaging and CI change only; no kernel source moves. The kernel suite moves into the required Footgun, already documented in the PR: once kernel 0.2.0 is on PyPI, Tests at this head
Not run
CI at this head46 passed, 0 failed, with at most one check still pending when I posted. I didn't merge or push anything. |
openadapt-kernelis a 0.1.0 alpha, butpip install openadaptinstalled it, uncapped. Its tests ran inkernel.ymlandkernel-ci.yml, two near-identical path-filtered workflows outside the requiredcicheck. So a kernel change could merge with them red. This PR makes the kernel an opt-in extra and runs its suite insideci. It does not change any kernel source.Packaging
openadapt-kernelis gone from the basedependencies. Thekernelextra stays, capped:openadapt-kernel>=0.1.0,<0.2.allandcoredon't include it.uv lockchanged only the kernel's two edges.openadapt kernel ...,openadapt kernel --helpand the lazyopenadapt.ObligationLedger(and the other kernel exports) say topip install 'openadapt[kernel]'when the kernel is missing.import openadaptnever imported the kernel eagerly. A new test now holds that: a fresh interpreter whose import system refusesopenadapt_kernelrunsimport openadapt,openadapt --help,openadapt kernel runandopenadapt kernel --help.openadapt-kernelfromallowtoforbid, so theinstall-weightjob fails if the base install pulls it again.platform-manifest.json:compatibility.launcher_requiresfollows the new range.validate_platform_manifest.py --offlinepasses.CI
packages.yml, whichcicalls, gets akerneljob:uv sync --locked --extra browser --extra dev, headless Chromium, ruff, mypy andpytest tests. It runs on Python 3.12 on the PR and queue tiers, and 3.11 and 3.12 on main. Onlypackages/kernel/**(andpackages.yml) select it. It is inpackages-gate'sneedsandselects, so a selected kernel job that fails or is skipped failsci. Nightly runs it as well.kernel.ymlandkernel-ci.ymlare deleted. Neither had a matrix or anything the new job lacks:kernel-ci.ymlwaskernel.ymlplus mypy.kernel-ci.ymlalso ran on pushes to every branch, merge-queue branches included.scripts/ci/newest_green.pynow finds the green run inpackages.ymlunder the job prefixkernel (, which matches both Python versions.cistays under its 10-minute budget. Every action is pinned by SHA.tests/test_kernel_ci.pyruns the real scope classifier and gate script. It checks that kernel changes select the job, that unrelated changes don't, and that the gate fails a selected job that failed, was cancelled or was skipped. It also checks the release lookup.Docs
packages/kernel/README.mdhas a new Install section: an optional alpha extra, orpip install openadapt-kernelon its own.capabilities/04-.../0620-commit-boundary-kernel-an-optional-alpha-extra.md. As the repository's CLAUDE.md requires, this PR doesn't regenerate CAPABILITIES.md or llms-full.txt.refresh-generated.ymldoes that after the change lands, andbuild_capabilities.py --check-prpasses.Note on the cap
#2779 bumps the kernel to 0.2.0, a breaking release that holds the W4 security fixes. With
<0.2,openadapt[kernel]keeps resolving to 0.1.0 after 0.2.0 ships. Once 0.2.0 is on PyPI, a follow-up should move the extra to>=0.2.0,<0.3and relock. Today both ranges lock to 0.1.0.Tests
The launcher and CI contract tests were run on this branch and on
origin/mainin the same environment. See the PR comment for which ones already fail onmainhere.