Repository navigation
fix(build): reconcile inherited packages before the manifest and Tier 2 - #182
Draft
openvoiceos-bot wants to merge 1 commit into
Draft
openvoiceos-bot wants to merge 1 commit into
openvoiceos-bot wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
JarbasAl
force-pushed
the
fix/reconcile-inherited-packages
branch
from
September 26, 2026 00:35
7e68c6b to
99c55f8
Compare
A constraint binds a package the resolver is asked about. A language build asks
about the packages it installs, so a package that came from the base image and
is named by no install line is never reconsidered: it keeps the version the base
release froze, however far constraints-alpha.txt has moved since.
That is T-5125. The base release of 2026-07-12 carries ovos-plugin-common-play
1.3.4a1, which caps padacioso below 2.0.0. The language stage lifts padacioso to
2.4.1a1 and never names ovos-plugin-common-play, so pip check failed on all
twelve hybrid images while every install line was correct on its own. The
constraints floor of >=1.3.5a1 did not bind, because nothing asked.
scripts/reconcile_constraints.py compares every installed distribution with the
constraints file, upgrades the ones that violate it, proves the violation is
gone in a fresh interpreter, and then runs pip check. It names the next package
to drift this way, not this one only.
Every language build calls it before the chown and before the manifest: the
script runs as root and writes into the venv, so the chown must follow it, and
the manifest then records the versions that ship.
Measured on a venv that reproduces the image state (ovos-plugin-common-play
1.3.4a1, then padacioso 2.4.1a1 with --no-deps):
pip check -> ovos-plugin-common-play 1.3.4a1 has requirement
padacioso<2.0.0,>=0.1.1, but you have padacioso 2.4.1a1
reconcile -> ovos-plugin-common-play 1.3.4a1 violates >=1.3.5a1
- ovos-plugin-common-play==1.3.4a1
+ ovos-plugin-common-play==1.3.14a1
No broken requirements found.
Review round (reviewer-c, SHIP-WITH-FIXES at 99c55f8):
C1. The message printed when a violation survives the upgrade named the
system python as the only cure. That is false for the case it described.
On run 36204852657 seven packages read through --system-site-packages
survived, and naming the floor in the requirement fixed them: a venv
install shadowed every one. The message now names both causes and says
plainly not to install into the system python.
Found while proving C1: pip_check() reported "broken requirements" when
pip itself was absent, because `-m pip check` exits non-zero either way.
A check that cannot run must not report the failure it looks for, so the
two cases are now separate.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
JarbasAl
force-pushed
the
fix/reconcile-inherited-packages
branch
from
September 26, 2026 20:13
99c55f8 to
a402b22
Compare
Contributor
Reporting for duty! The automated checks have completed. 🎖️I've aggregated the results of the automated checks for this PR below. 🔍 LintEverything looks good so far! ✅ ✅ actionlint: 10 workflow file(s), no finding Your loyal script, at your command 🫡 |
This branch has not been deployed
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.
Why an image can hold a package the constraints file forbids
A constraint binds a package the resolver is asked about. A language build asks
about the packages it installs. A package that came from the base image and that
no install line names is never reconsidered, so it keeps the version the base
release froze — however far
constraints-alpha.txthas moved since.T-5125 is that shape. The base release of 2026-07-12 carries
ovos-plugin-common-play1.3.4a1, which capspadaciosobelow 2.0.0. Thelanguage stage lifts
padaciosoto 2.4.1a1 and never namesovos-plugin-common-play, sopip checkfailed on all twelve hybrid imageswhile every install line in the build was correct on its own. The constraints
floor
>=1.3.5a1did not bind, because nothing asked about the package.The change
scripts/reconcile_constraints.pycompares every installed distribution withthe constraints file, upgrades the ones that violate it, proves in a fresh
interpreter that the violation is gone, and then runs
pip check. It reportsthe next package to drift this way, not this one only.
Each language build calls it before the
chownand before the manifest: thescript runs as root and writes into the venv, so the
chownmust follow it, andthe manifest then records the versions that ship.
Measured
A venv that reproduces the image state,
ovos-plugin-common-play1.3.4a1 thenpadacioso2.4.1a1 installed with--no-deps:- 1.3.4a1 / + 1.3.14a1is the value that matters:--reinstall-packageisthere because uv can treat an installed prerelease as satisfying the
requirement and move nothing.
Controls
An instrument that cannot fail reports a clean result that means nothing, so
each path was made to fail on purpose:
no inherited package violates...,pip checkclean, rc=0packaging<1.0againstpackaging26.3,--verify-onlypackaging 26.3 violates <1.0, rc=1padacioso>=99.0.0, a repair that cannot succeedERROR: the reconcile install failed, rc=1ERROR: cannot read constraints, rc=2pip checkred, rc=1The last control is the one that shows why
pip checkstays: the reconcilefinds only what the constraints file names, and
pip checkfinds what itmisses.
What this does not do
The proof this change needs is a green Tier 2 on a built image, and a language
image builds on a push to
devor a manual dispatch, not on a pull request.The run is recorded in the audit page.
The second half of T-5141, raising the generated floor to
ovos-plugin-common-play>=1.3.6a1inOpenVoiceOS/OpenVoiceOS, is not in thispull request and must not be done by hand yet. That floor is generated from a
resolution, and the resolution cannot reach 1.3.6a1 today:
ovos-skill-homescreen3.0.4a2, its newest release, capsovos-workshopbelow9.0.0. That holds the whole alpha channel at
ovos-workshop8.3.0a1,padacioso1.1.1a1 andovos-plugin-common-play1.3.5a1. A hand-raised floorwould make the shared constraints file unsatisfiable and red every build that
reads it. The cap is filed with the lane that owns the skill; the floor then
rises by regeneration, which is where a generated value belongs.
ovos-skill-homescreenis not in this repository'sskills.list, so an imagebuilt here is free of that cap and the reconcile reaches 1.3.14a1.
Review round (reviewer-c, SHIP-WITH-FIXES at 99c55f8) and rebase
Rebased onto
devafter #176, #179 and #172 landed. One conflict, inlang_builds/hybrid/build_raspOVOS_ca.sh, where #172 added the phoonnxinstall at the same place this change adds the reconcile call. Both are kept,
the install first and the reconcile after it, which is the order the reconcile
needs. The ordering invariant was re-checked on the rebased tree:
C1, fixed. The message printed when a violation survives the upgrade said
only a system install could replace the copy. That is false for the case it
named, and this change's own run 36204852657 is the counter-example: seven
packages read through
--system-site-packagessurvived, and naming the floorin the requirement fixed every one by shadowing. The message now names both
causes and says plainly not to install into the system python.
Forced through the surviving-violation path with a
PYTHONPATHcopy the venvcannot shadow, which is the case the new text describes:
A second fix, found while proving C1.
pip_check()reported "brokenrequirements" when pip itself was missing, because
-m pip checkexitsnon-zero either way. A check that cannot run must not report the failure it
looks for. The two cases are now separate, both proven:
./scripts/ci/run_shellcheck.shpasses on the rebased tree: 50*.shfilesand 16 shebang scripts,
shellcheck OK.Merging this starts two builders that publish
Read from the rebased diff against the path triggers, because it decides when
this can merge:
So a merge starts both language builders, and neither publish job is guarded.
This pull request therefore waits on the open decision
raspovos-dev-push-publishes-release, exactly as #180 does.Worth a separate look, not fixed here: this change edits eleven
lang_builds/lite/*scripts, andbuild_lite_lang_images.ymlfilters onlang_builds/lite/build_raspOVOS_.sh— a literal name, no*, matching noneof the eleven. So no change to a lite script starts that builder. The typo is
dev's, not this pull request's; it entereddevat52883496on2025-12-18, and it is fixed on branch
fix/lite-lang-builder-path-glob.The consequence for this change, raised by reviewer-c and worth stating here:
after it merges, the eleven lite images keep being built without the
inherited-package reconcile, and nothing in the run list says so. The reconcile
is precisely about packages inherited from the base image, and the lite images
inherit from the same base. They are the arm least likely to be noticed and the
one this change silently skips.
Found after the rebase: the reconcile runs twice in every offline build
Not fixed here, and the re-review should weigh it. Every one of the eleven
offline build scripts starts by running its hybrid counterpart:
So after this change an offline build runs the reconcile pass twice: once
inside the hybrid script, before the offline tier installs citrinet, onnx-asr,
phoonnx and its models, and once in the offline script itself.
The second run is harmless; the audit's own first control is "second run,
nothing to do". The first one is the question. It ends in
pip check, and thescript carries
set -e, so an offline build now stops at the hybrid stage forany inconsistency the offline stage would have gone on to replace. That may be
the wanted behaviour — fail early, name the cause — but it is a change to when
offline builds fail, it was not in the original evidence, and no offline image
has been built with it.
The cost is real too: a full
uv pip install --upgradeover roughly 300packages, twice per offline language, eleven languages.
🤖 Generated with Claude Code