Repository navigation
2026.10.17.1: an upgrade does not replace installed payloads inside a build; a dangling record does not fail every build; doctor reads, it does not change - #815
Merged
Conversation
… build; a dangling record does not fail every build; doctor reads, it does not change ## What changes - **Intent (D3).** `Fetcher::resolve_xpkg_path` takes a `PayloadIntent`: `Use` (build, run, test, pack, the runtime, host tools) takes a payload the provider calls usable and installs or replaces only one that is not; `Provision` (`mcpp toolchain install`) takes the index's current packaging; `Locate` never installs. A replacement says why (`Updating llvm@23.1.3 packaging revision 0 → 1 (revision 0 is below the index's floor 1)`). - **Failure (D5).** By the provider's error code: a deterministic refusal is neither retried through the command line nor followed by an index refresh, and its hint does not say retry; only `E_NOT_FOUND` refreshes, with a reason that is true (`could not be installed; the index may predate it`). A failed replacement of a usable payload names the revision still in use. - **Currency where a person looks (D6).** `mcpp index update` lists installed payloads the refreshed index packages anew; `mcpp toolchain list` marks them (JSON `installedRevision` / `availableRevision`). - **doctor (D7).** Read-only: one offline `prepare_build`; the toolchain it reports is what a build here uses (the configured default outside a package) with its payload's revision; a build that would install first is reported as that; mcpp's package home is summarized from xlings `binding_state`. - **Identity (D8).** A toolchain payload's revision above 0 enters the driver identity (`payload-revision: <n>`). - **xlings 2026.10.17.1** (openxlings/xlings#678): `payload_status` reports `complete` / `usable` / `current` apart; `unmet()` requires `payload_currency` and `binding_state`; `scope_repaired` events are shown (`Repaired c++@16.1.0 in mcpp's package home had no registration; deactivated`). - **CI (D9).** `ci-upgrade.yml`: the previous release (read from GitHub at run time) builds a home; this commit's mcpp, laid out as a release, runs in it on Linux x86_64/aarch64, macOS and Windows; Linux adds an old-index variant (xim-pkgindex of 2026-10-07) and a dangling-record variant. ## Why After `xlings self update && xlings update mcpp -y`, a user's every `mcpp new && mcpp run` failed: `install of 'xim:llvm@23.1.3' failed ... sysroot update refused before metadata changed: c++@16.1.0: installed asset registration missing`. 2026.10.16.1 folded "is the packaging revision the index's" into "is the payload complete", and mcpp treated "not complete" as "not installed" inside the build; the replacement then met a dangling record of another package and failed on every run, while `mcpp self doctor` started the same replacement and reported `ok`. Measured on probe PR #814: a home of the previous release downloads gcc (101.7 MB), glibc (36.7 MB) and llvm on its first run after the upgrade, and the reported home fails with rc 101 on every run on x86_64 and aarch64. Design: .agents/docs/2026-10-17-upgrade-continuity-design.md. ## Tests - unit: `PmPayloadIntent.*` (the intent × usable × current matrix), `PmInstallFailurePolicy.*` (error code → refresh / retry). - e2e 918: a toolchain payload re-recorded at another revision builds with no install call, `toolchain list` offers the other packaging, doctor installs nothing. Fails on 2026.10.16.3 (it downloads glibc, binutils, linux-headers and fails). - ci-upgrade lane, run locally before push: orphan (the reported home) passes -- first run no download, `toolchain install` replaces llvm and reports the repaired record; snapshot passes -- `index update` names llvm 0 → 1 and glibc 2 → 4, no run downloads. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
A build whose vendored xlings cannot be updated (no newer source beside the mcpp binary; the hermetic container lane) talks to xlings 2026.10.16.2, whose payload_status reports no usable/current. Read as absent, every payload was unusable and a fresh install reported success and then 'payload is not complete'. 1.10's complete already required the recipe's revision, so it is both usable and current; the 1.10 behaviour is kept. A payload of another revision is announced as an update, not as incomplete. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
doctor's prepare is offline, and now plan_only with a scratch work_dir, as `mcpp emit build-database` plans: the std module is described rather than compiled, generated files are compared rather than written, and the lock goes to the scratch directory. e2e 22 relied on doctor precompiling std as a side effect; it now asserts the cache is still empty after doctor and makes the std entry it lists with a build. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
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.
What changes
Fetcher::resolve_xpkg_pathtakes aPayloadIntent:Use(build, run, test, pack, the runtime, host tools) takes a payload theprovider calls usable and installs or replaces only one that is not;
Provision(mcpp toolchain install) takes the index's current packaging;Locatenever installs. A replacement says why (Updating llvm@23.1.3 packaging revision 0 → 1 (revision 0 is below the index's floor 1)).neither retried through the command line nor followed by an index refresh,
and its hint does not say retry; only
E_NOT_FOUNDrefreshes, with a reasonthat is true (
could not be installed; the index may predate it). A failedreplacement of a usable payload names the revision still in use.
mcpp index updatelists installedpayloads the refreshed index packages anew;
mcpp toolchain listmarks them(JSON
installedRevision/availableRevision).prepare_build; the toolchain itreports is what a build here uses (the configured default outside a package)
with its payload's revision; a build that would install first is reported as
that; mcpp's package home is summarized from xlings
binding_state.identity (
payload-revision: <n>).payload_statusreportscomplete/usable/currentapart;unmet()requirespayload_currencyandbinding_state;scope_repairedevents are shown(
Repaired c++@16.1.0 in mcpp's package home had no registration; deactivated).ci-upgrade.yml: the previous release (read from GitHub at runtime) builds a home; this commit's mcpp, laid out as a release, runs in it on
Linux x86_64/aarch64, macOS and Windows; Linux adds an old-index variant
(xim-pkgindex of 2026-10-07) and a dangling-record variant.
Why
After
xlings self update && xlings update mcpp -y, a user's everymcpp new && mcpp runfailed:install of 'xim:llvm@23.1.3' failed ... sysroot update refused before metadata changed: c++@16.1.0: installed asset registration missing. 2026.10.16.1 folded "is the packaging revision theindex's" into "is the payload complete", and mcpp treated "not complete" as
"not installed" inside the build; the replacement then met a dangling record
of another package and failed on every run, while
mcpp self doctorstartedthe same replacement and reported
ok. Measured on probe PR #814: a home ofthe previous release downloads gcc (101.7 MB), glibc (36.7 MB) and llvm on its
first run after the upgrade, and the reported home fails with rc 101 on every
run on x86_64 and aarch64. Design: .agents/docs/2026-10-17-upgrade-continuity-design.md.
Tests
PmPayloadIntent.*(the intent × usable × current matrix),PmInstallFailurePolicy.*(error code → refresh / retry).install call,
toolchain listoffers the other packaging, doctor installsnothing. Fails on 2026.10.16.3 (it downloads glibc, binutils, linux-headers
and fails).
-- first run no download,
toolchain installreplaces llvm and reports therepaired record; snapshot passes --
index updatenames llvm 0 → 1 andglibc 2 → 4, no run downloads.
Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com