Skip to content

Truthful results, CPU architecture, versions, paths and the hook channel (design 2026-11-27) - #742

Draft
speak-agent wants to merge 54 commits into
mainfrom
feat/ecosystem-convergence
Draft

speak-agent wants to merge 54 commits into
mainfrom
feat/ecosystem-convergence

Conversation

@speak-agent

Copy link
Copy Markdown
Collaborator

What | 内容

One PR for the plan in .agents/docs/2026-11-27-ecosystem-truthful-results-and-architecture-design.md (§12 lists the checkpoints, §19 how they are split, ordered and tested with libxpkg and xim-pkgindex). Each commit is a checkpoint that builds and passes its tests.

Done so far:

The PR stays a draft while the libxpkg 0.0.68 work and the index migration are integrated (design §19.3).

Verification | 验证

CI of this PR. Local checks per commit are listed in the commit messages.

Authorship | 作者

Authorship: ai-and-human

Sunrisepeak and others added 3 commits November 27, 2026 06:20
by-ai and human-and-ai are replaced by two values: ai-and-human (an AI did most of
the work; a person directed it and interacted briefly) and by-human (a person led
and decided; the AI only assisted). Templates, the label workflow and the
contributing skill follow the same two values.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…e, versions, paths and the hook channel

One design for the open issues across xlings, libxpkg, xim-pkgindex, the sub-indexes, mcpp-index and mcpp: a step's outcome is one of four and the command's result is computed from them; architecture is decided by an entry's enumeration and a payload's bytes; a version string is classified once; payload rules are written once; a hook call is an action, a query or a declaration, and spec = "3" is the environment without the compatibility layer. The plan, its dependencies and how the repositories are tested together are §12 and §19.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… desktop has come when its shell serves; the installed xlings declares macOS 14

hookrt: the fixture ran its program with os.exec, which only returns a status, so the older-glibc case installed and the step expecting a failure failed (main since 2026-11-22). It now runs it with system.exec, declares xim:patchelf as a build dependency, checks that set_interpreter rewrote the file, and prints the hook log when a step does not go as expected.

LubanDesktopBus: Desk waited for the display but not for xdesk, which offers its services a moment later; an agent's read of the desktop's state made in between was told the service was not there (unit (1/6) on main). The constructor now waits until the state answers.

macOS fresh: the floor (minos 14.0) is asserted of the installed xlings, the step closed PR #710 carried; main had moved the jobs to macos-15 already.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Sunrisepeak and others added 26 commits November 27, 2026 07:30
The context a recipe's code runs with was made in seven places, each filling
what it knew of: hooks and scripts had two sources for the bin directory and
the SubOS root, and no place filled `arch`, so a hook's _RUNTIME.arch was
empty. xlings.core.xim.hook_context makes it once (make_execution_context);
the installer's helpers forward to it, and the script entries and the hook
probe use it.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…machine; the boundary carries what a hook says

- mcpp.toml: libxpkg at the head of openxlings/libxpkg#54 while the two are
  tested together (the version replaces it before the merge).
- compatibility: ArchEvidence, entry_architectures, is_arch_templated and
  classify_arch_evidence are libxpkg's (mcpplibs.xpkg.compat); find_entry and
  declares_no_download_source forward to it. One reading of an entry for the
  client and the format's checker.
- elfread: e_machine and the ELF class (machine, bits), what rule M compares.
- lua_protocol: a hook's notices, failed compatibility calls and patch result,
  an entry's strip and floor, and a platform's strip cross the worker
  boundary. An entry read in the worker lost its floor before.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…install(); strip; fs.extract through the host port

- The spec cap is libxpkg's (kHighestSpec = 3). The gate's tests and E2E-35
  move their "too new" fixtures to spec "4".
- A package of spec "3" has its download in install_dir, laid out, when
  install() starts (design 2026-11-27 §9.7): an archive is extracted in a
  private directory with the entry's `strip` and moved in, any other download
  is copied in under its name, leftovers of an unfinished attempt go first.
  install() only adjusts and may be absent. It is not extracted beside the
  archive, and the staging after the hook does not run. spec 1 and 2 keep
  the old path.
- The extractor's `strip`: the first n components of every member's path and
  of a hard link's target; a member with no more than n is an error naming it.
- `fs.extract` is the client's extractor, through libxpkg's HostPorts, in
  this process and in the Lua worker.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…h its index's template

The .xpkg.lua a removal reads is recipe_text (the file and the template its
index declares, design 2026-11-27 §9.8), not a copy of the file: a recipe of
a templated index keeps the template's hooks for its removal.

libxpkg at the head of openxlings/libxpkg#54 (d61d3ad): a string literal
clang refused on macOS and Windows.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ecipe or download that cannot be read fails the node

C1 of design 2026-11-27 for the install command's gates:
- The spec gate and the target check report the node Refused (a new terminal
  InstallPhase): nothing changed, said as "[name] refused: ..." with the hint
  (E_UNSUPPORTED, protocol 1.20). install_summary counts `refused`,
  install_targets says "refused", and the command exits non-zero (E14);
  E2E-35 asserts the exit code.
- A recipe that cannot be read, or a download that cannot be resolved, fails
  the node instead of a warn: before, its hooks ran with no download.
- The design records the spike's result (§9.6) and what implementation found
  (§19.6).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… activates, findings are counted, an empty payload after a failed call fails

C1 of design 2026-11-27, §6.2:
- subos runtime: the payload is installed, the declaration written, then the
  runtime activated against it; a refused or failed activation puts the
  declaration back and fails the command (E3: a rebind to the other installed
  version was refused against the old declaration, then declared anyway).
- install: an activation that fails is "installed, not activated", said as
  that; with --use the command fails.
- remove --older-than (#708): a known project that is gone is forgotten and
  said so; one whose state cannot be read stops the command, naming the file.
- The closure rules, `arch-unstated` and the compatibility layer's failed
  calls (`hook-call-failed`) are findings: one count line after the summary,
  each in -v and <home>/logs/findings.ndjson (install_summary.findings, 1.20).
- E16: install() reported success with a failed call and install_dir is
  empty after staging -> Failed, naming the calls.
- tools/lint_warn_continue.sh: in the install, remove and switch flows a warn
  that ends its branch says why it does not change the conclusion
  (`// warn-ok:`); create_link_, unused, is gone.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…d (§19.6)

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…y, elfpatch's outcome, a newer xlings said once a day (protocol 1.20)

C5 of design 2026-11-27, §9.2 and §9.3:
- What a package's hooks said (log.warn, log.error) comes back with each
  node and is shown after the summary, by package, at most eight lines each;
  `install_notices` for programs. A hook with no log file (-v,
  XLINGS_HOOK_OUTPUT=inherit) has its output printed: before, those modes lost
  it entirely (E5).
- elfpatch's structured result: files to relocate and no tool is a failed
  install whose hint comes from the tools table (patchelf, a package;
  install_name_tool, the macOS command line tools -- two new rows). It
  replaces the guess that refused any payload linking the xlings glibc.
- #425: a sync that sees a newer xlings in the index's pointer offers it; the
  command ends with one line naming it and `xlings self update`, at most once
  a day, in a terminal only; `update` emits `update_available`. `xlings
  config --update-notice <BOOL>` turns it off (spec, completion and the
  generated reference updated).
- Protocol 1.20: E_UNSUPPORTED, refused and findings in install_summary,
  install_notices, update_available; features step_outcomes, hook_notices,
  update_available.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…read from its text

create_executor loaded the package to learn its spec, so a recipe's or a
script's top level ran twice, the first time in the loader's environment: a
worker's io.open, os.execute and io.popen at the top level happened outside
the declared policy's view once (LuaWorker.DeclaredPolicyIsolatesWholeLua...).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…he directory three levels up

The one constructor (#566) gave a script's context the script as its recipe,
and pkgindex_root_for answered three levels up from it: `/` for
/tmp/x/script.lua. The worker mounts the index root read-only after its own
mounts, so the host's root covered them: /dev/null not writable, the host's
/etc/passwd, an unrelated host file visible (LuaWorker.RuntimeInterpreter...,
FullObservationAudits...). The index root is <index> of
<index>/pkgs/<letter>/<file> (libxpkg's index_of), else the primary index's
libs, else none; a script's scope has no recipe; the probe of a removal's
hooks takes the index's recipe, as the removal does (HOOK-INDEX-ROOT).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…wherever the probe runs

Userland step 1 ran `busybox --install -s`, which links into the root of the
process that runs it: the machine's root when the probe runs in it, and this
host's (refused) when it does not -- the stand-in wsl.exe of the hook-runtime
acceptance case. That root had no cp, and glibc's relocation (index revision 5)
copies with it. The list (`busybox --list-full`) is linked under `root`, as
step 2 already is; a real guest gets the same links as before.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…he terminal's own lines

The terminal prints a skipped dependent once at the end, the hooks' notes after
the summary and a newer release at the end of the command; their data events
went to the screen table and were reported as dropped screens ("no renderer
for 'install_skipped' -- please report it"). They are wire duplicates.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…oad is of its machine (E_FOREIGN_MACHINE)

C2 of design 2026-11-27 (§5.4). The surface is what the host reaches without
the recipe: the programs and libraries a registration publishes, the shared
libraries directly in the runtime directories the package exports (lib64 and
lib when it exports none), its loader. Its ELF files are of the home's
machine (e_machine and class, named by libxpkg's table). Checked after
config() returns and before the registration is published: the node fails
with E_FOREIGN_MACHINE (protocol 1.20, feature machine_rule), naming the files
and the index's issues; a fresh payload is not kept, one set aside comes back.
Another machine's files elsewhere in the payload -- a cross toolchain's target
libraries, a sysroot, firmware -- are the recipe's and do not matter.

self doctor reports the ones installed before (payload-foreign-machine:
registered programs and libraries, header reads), counts them in the exit
code, prints the removal, and does not repair them (ARCH-DOCTOR).

The rule is its own module (xlings.core.xim.machine_rule), not closure_check:
it reads a few headers through elfread and needs the registration, where the
D/A/E family scans every form-X ELF and only reports.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… an artifact here, once per request

Design 2026-11-27 §5.5 (ARCH-PLAN-REFUSAL). Entries that enumerate their
architectures and leave this machine out refused the plan with one
E_INVALID_INPUT line per node, each with its chain. The resolver records them
(InstallPlan::unsupported) and the walk goes on; the command says one
E_UNSUPPORTED_TARGET line per request -- the conclusion and the names, -v each
chain and what its entry gives -- as E_UNSUPPORTED, with the whole list as the
install_unsupported data event (protocol 1.20). Nothing is downloaded.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…nding, its record naming the target

The weak-evidence install was asserted to mention the mismatch in its output;
since the advisory became a finding (design 2026-11-27 §5.3) the default output
is one count line and <home>/logs/findings.ndjson has the record.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…with d2x relocated

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…anned one does not answer it (#739)

C3 of design 2026-11-27 (§7.1, VERSION-EXACT-KEY). The index has 2.44, 2.44.2
and 2.44.3; a request for 2.44 was answered by a 2.44.x in two places: the pin
to the subos (an active 2.44.2 satisfied the prefix, "already installed") and
the installer's registration fallback (a 2.44.3 this command had just
installed stood in for the node 2.44, whose install() then never ran and whose
empty directory was recorded as installed). The pin asks the index whether the
version is a key of its entries and then takes only that version; the
installer resolves the node's own version exactly. A range (~2.44, 2) is met by
the active version as before -- now also one of an index other than the
default, whose records are '<index>:<version>' and never matched.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…-- the resolved version, the request beside it

C3 of design 2026-11-27 (§7.2, VERSION-DECLARED; #607 item 1). `subos runtime
glibc@~2.44` declared the request while the view served a concrete version;
it now resolves the request in the index first, installs, declares and
activates that version (glibc@2.44.3), and keeps the request as
runtime_request (additive, ignored by older clients).

The rebind wrote back the manifest it read before installing: the subos's
.xlings.json holds the workspace too, so the registration the install had just
made was undone and the activation refused ("not installed in this subos")
whenever the rebind itself installed the version. It reads the document again
after the install.

A home an older client left -- a declaration of a version the store lacks
while the view serves another -- is brought to what is served by a home format
step (runtime-declaration), once and recorded; no layout change.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…update moves along it (#709)

C3 of design 2026-11-27 (§7.3, VERSION-ALIAS). A key of a platform table with
a ref that is no version is an alias; latest is one of them. An exact request
followed one ref; it follows a chain to a version, as ranges already did. The
alias a package was asked for by is kept per scope beside configured (a
top-level `aliases` of the subos file, which older clients keep and do not
read); `update <pkg>` resolves <pkg>@<alias> instead of latest and says so in
update_plan.alias (protocol 1.20). A version asked for ends the alias, a
request with no version leaves it.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…PATH, .pc or .la is a finding

Design 2026-11-27 §8.2 (PAYLOAD-BUILD-PATH; #740 §3, #458). A fresh payload is
read once more: its ELF search paths and its pkg-config and libtool files. An
absolute path under none of the payload, this home and its stores, the
system's directories, the /nonexistent placeholder, and with no variable left
in it, is the build machine's: one payload-build-path finding names the files
and paths, counted like the closure rules' and kept in findings.ndjson. The
index refuses it at publication; install reports it.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…removed when the node ends (#736)

Design 2026-11-27 §8.4 (EXTRACT-OWN-DIR). A recipe of spec 1 or 2 with an
install() had its archive extracted beside the download, in the runtimedir
every such install shares: flat archives merged into one tree, and a recipe
moving its lib/ took the lib/ of every flat package installed before it
(xim-pkgindex#1274). Each node gets <namespace>-<name>-<version>/ beside its
archive (the download, or a hook worker's private copy), the archive linked
into it (copied where a link cannot be made) and install_file() naming that
one -- install_file():replace(".tar.gz", "") and
path.directory(install_file()) both keep their meaning -- and the directory is
removed however the node ends. The released client fails the new case.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…; an unset lock timeout stays unset (#594)

#417 (FRESHNESS-GET): the freshness probe of a cached download with no sha256
was HEAD only, and GitCode answers HEAD on release assets with 401 -- on the
CN mirror the probe always failed and a cached file was never checked again.
A HEAD refused by method (401, 403, 405, 501) is followed by a GET stopped
after its first block; its headers give the size, ETag and Last-Modified.
Measured on a real GitCode asset (the network case runs on CN mirror lanes).

#594: the locked home-config write saved XLINGS_LOCK_TIMEOUT with a reader
that cannot tell unset from empty and put back an empty variable where there
had been none. Its presence is kept and an unset one is unset again.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…erbs are capabilities (#593)

Design 2026-11-27 X10 (INTERFACE-CLI-VERBS). 2026.9.12.1 gave the command line
remove --all/--subos/--all-subos, config --list-xpkg/--remove-xpkg/
--clear-xpkg and doctor --subos/--show-ok, and no capability for any of them.
remove_package gains force (read and not in its schema), all and subos (a
name, or "*" for every subos; a subos in a prefix domain removes there, its
events relayed as install_packages does); local_recipes lists the overlay's
recipes with their status as data, removes one, clears a category;
self_doctor runs the scan with fix, dry_run, deep, show_ok and subos.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… bare spec is answered by the active one

resolve_base_package_ chooses the index's version of a template named without
one, then installed the bare spec. Since an active version of a package of an
index other than the default answers a bare request (as the default index's
always did, #739), that installed nothing new: an upgrade planned from the
edition installed once ('couldn't locate base pkg payload ... after install').
The install names the version chosen.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…f cycle (libxpkg 4bf823a)

The index's bun writes ["1.3.11"] = { ref = "1.3.11" }: its hooks make the
payload. Released clients met a ref cycle, warned and skipped the download;
now that a download which cannot be resolved fails the node (§6.2), bun
failed. libxpkg reads the self-ref as no ref; a cycle of two is still one.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Sunrisepeak and others added 14 commits November 27, 2026 14:22
…dows is not a build machine's

The Windows unit lane found it: `prefix=C:/Users/...` was read from the
slash after the drive's colon, so this payload's own pkg-config file named
"/Users/...", a foreign path. A drive letter, colon and separator now start
one path, compared without case and with '/' separators; a build machine's
`D:/a/...` is still found. An ELF's search path is colon-separated and names
no drive, so the test writes that case only where the payload is POSIX.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…t imports a lib -- not for every install from an index without libs/

Every install from a local recipe or a third-party index without libs/
printed that its `xim.pkgindex.*` calls would be no-ops, whether it made
any or not (the conformance cases through install showed it on each). It
is true only where a recipe of spec 1 or 2 imports one, whose import then
answers with a stub; in spec 3 that import is an error.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…s cases in xlings (libxpkg e74719e)

Design 2026-11-27 §9.9 (X14).
- docs/specs/xpkg.md is libxpkg's docs/spec/xpkg.md of the version xlings
  builds with, byte for byte; a unit test holds it to the embedded text.
  docs/specs/xpkg-manifest-v1.md points there, section by section, and the
  documents that linked it link the new one.
- docs/generated/xpkg-hook-api.md is rendered from libxpkg's interface
  manifest (`xlings --xpkg-api-json`, plumbing like --command-reference-json)
  and checked for staleness with the command reference.
- `xlings index check [path]`: the format's checker over a recipe or an
  index, each finding with its line; notes with -v, every finding with
  --json; exit 1 on an error, 2 on a path that is neither.
- test_xpkg_conformance: every conformance case of libxpkg that names an
  install, installed through xlings, ends as it says, with its payload. It
  found a rule the spec did not state (a package listing programs registers
  them), now in both.
- tools/check_index_compat.py: spec "3" and a recipe template need the
  client with libxpkg 0.0.68; the floor-setting constructs are listed first.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…tforms -- the bash versions are gone (#592)

E2E-100..110 ran on Linux and macOS only, as bash: notice once (E2E-100),
the local overlay (101), remove --force/--all/--all-subos (102), doctor's
remedy in both modes (103), --fix across subos and a hung child (104, 110),
the sysroot refresh of every pinning subos (105), a broken home's isolation
(106), a second subos's install (107), a removal --fix could not undo (108)
and the current subos unreadable (109). Each is now an XTEST on
home_contract_support.hpp -- a home whose default index is the test's own
recipes -- asserting what the script asserted, under a requirement of its
own; the macOS workflow's bash step and the run_all.sh entries go with the
scripts. A shim running a shell script is checked where there is /bin/sh;
the hung child sleeps through ping on Windows.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…eck of an asset -- xlings __payload-check

Design 2026-11-27 §8.2. docs/specs/payload-rules.md states rules A, B, D,
E, M and P, the surface rule M judges, the paths rule P accepts, and how
hard each is where it is enforced (publish, install, build, doctor).

An index holds an asset to rules M and P before publishing it with the
client's own implementation (K2, §5.6): `xlings __payload-check <dir>
[--arch <name>] [--json]` judges the static surface of a payload not yet
registered -- bin/, sbin/, lib64/, lib/ -- against the architecture its entry
lists it under, on any host, and its search paths, .pc and .la files.
Plumbing: in no help or completion. The spec's cases run through it.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…or scripts with libxpkg 0.0.68

- 30 (en, zh): the first recipe is spec "3" with no install() -- the
  download is landed with `strip` before any hook; the hook interface's
  three kinds of call, pcall, a top level that only computes, entries that
  name their architectures, log.warn for the user, `xlings index check`
  before publishing, xpkg-migrate for older recipes.
- 51 (en, zh): the CPU architecture tiers, one machine per home, the
  plan-time refusal and rule M, what adding a host architecture touches.
- upgrade-and-compatibility: a recipe's spec as a compatibility surface;
  the commands that now exit non-zero, and the other behaviour changes a
  script sees; the runtime-declaration step.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…tform (libxpkg 1f4252e)

The Windows unit lane compared docs/specs/xpkg.md, checked out with CRLF,
with the embedded text, which holds LF. libxpkg pins its copy the same way;
its pin moves to that commit, which also carries the migration tool's lib
mode and its direct-call fix.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…'s cross-subos repair ends a hung child there too (#592)

The ported contracts ran on Windows for the first time (CI 5f33e69) and two
did not hold. Windows' run_shell_unattended ignored its limit (std::system),
so `self doctor --fix` waited on a hung child of another subos without
end: with a limit it now runs cmd.exe in the Job Object
run_argv_with_timeout uses, and past the limit ends it and everything it
started, returning 124 as the POSIX version does. The sysroot refresh test is
scoped to POSIX, where its script ran: a Windows library entry is a hard link
that nothing proves xlings' once the payload file it shared is deleted
(recorded in §19.6; its own issue). `__payload-check --arch` is a plumbing
option, exempt from the spec parity check with the reason.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…s 32-bit tools are this machine's (X6)

The index's install run refused syslinux on x86_64: its programs are 32-bit
x86, which the x86_64 kernel runs natively. A machine runs its own machine's
programs and, on x86_64, x86 ones; no other pair is assumed (an aarch64
kernel may have no AArch32). The payload rules state it and test_payload_rules
checks both sides with an ELF32 header.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…s platform's one architecture in archs; a git repository names none

The checker that `xlings index check` runs now agrees with the index's own
architecture check (design §5.3); docs/specs/xpkg.md is the specification of
this version (§4.4).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ane's merge found (§19.6)

#743: a payload keeps its recipe as an index of that one recipe with the
closure of the index libs it imports; the old .xpkg.lua is brought forward;
a call into a lib that is nowhere raises in a hook. #744: a program's shell
completion is a declaration (xvm.add completion -> files assets of its
release), profile 14 loads the subos's completion directories, and an
upgrade keeps the profile it replaces. Tasks L11, L12, X17, X18, P13.

§19.6: libxshmfence's undeclared glibc (D1), the asset reuse tool's
revision and moved builder, and the P10 regression on aarch64 whose root is
that the hook runtime told a recipe's top level nothing the loader tells it
(L12).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… and a program's shell completion is declared (X17, X18, #743, #744)

#743. A removal ran uninstall() from <install>/.xpkg.lua, a copy of the
recipe alone: libxpkg found no index around it, so a top-level
import("xim.pkgindex.<lib>") bound a stand-in whose every call did nothing,
and the removal "succeeded" having undone nothing. An install now keeps the
recipe as an index of that one recipe -- .xpkg/pkgs/<dir>/<name>.lua and the
closure of the index libs it imports under .xpkg/libs/ -- written beside and
renamed into place. The removal runs that copy, with the libs the install
had, whatever the index holds later. A payload an older client kept as
.xpkg.lua is brought forward at its first removal with the index's libs; one
it cannot write keeps the old file. A call into a lib that is nowhere raises
in the hook (libxpkg 0cc1710), so the removal fails naming the lib and still
withdraws the package. uninstall()'s failed compatibility calls are findings,
as config()'s and install()'s are.

The executor is created with what the recipe is read for (the install's
platform and architecture, libxpkg's ReadTarget), in this process and in a
worker: a recipe's top level computes what the loader's read of it computes
(a Luban edition chose x86_64 packages on aarch64 when its lib's arch probe
raised at the top level).

#744. xvm.add(name, { completion = { bash, zsh, fish, pwsh } }) (libxpkg
0.0.68) declares a program's completion files: file assets of its release
under the subos's usr/share/{bash-completion/completions, zsh/site-functions,
fish/vendor_completions.d, powershell/completions}, moved by `xlings use`,
withdrawn with the release. Profile 14 loads those directories (bash sources
each, zsh puts them on fpath and binds them once compinit has run, fish adds
the path, PowerShell dot-sources), and says it is generated. The profile has
one writer now (`self init` and the startup check called two): an upgrade
keeps the profile it replaces at <home>/logs/profile-upgrades/<file>.v<old>.

libxpkg is pinned at 0cc1710 (spec copy and the generated hook reference
follow). Tests: XPKG-SNAPSHOT-LIBS (e2e and unit), PKG-COMPLETION (bash
here; zsh and fish where the runner has them), PROFILE-UPGRADE-KEEPS.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ds its index's libs; spec 3's string helpers are stated

`xlings index check pkgs/a/x.lua` from an index's root failed a recipe of
spec 3 that imports an index lib ("not in an index"): the index was looked
for three levels up the relative path. The specification copy follows
(XPKG-API-MANIFEST).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Sunrisepeak and others added 11 commits November 27, 2026 20:04
…indows

The declared pwsh file sets a global; the profile run with -NoProfile
dot-sources the active version's script, and the global names it.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…h leaves to the sweep (§19.6)

Truncated downloads and unanswered probes read as facts, a candidate matrix
that read a host from a file name, a replaced 0.4.17 asset and a GitCode-only
d2x release; and the sixteen entries without a Linux program whose
architectures the P4 sweep settles.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… keeps it now (.xpkg/)

E2E-92 looked for install_dir/.xpkg.lua; the recipe is kept at
.xpkg/pkgs/<dir>/<name>.lua with its index libs, and the old file is no
longer written. E2E-111 and doctor's swept-payload contract count a
payload's entries apart from xlings' own bookkeeping, which names .xpkg/
now as well.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…the host's index at its top level

The executor is told the index its hooks get (_RUNTIME.pkgindex_dir: the
recipe's own, else the primary index) when it reads the recipe, so a script
or a recipe given by path imports index libs at its top level as in its
hooks. A recipe's own index comes first: a payload's kept recipe runs with
the libs it kept.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…of its own

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…t "no matches found"

A package removed last leaves usr/share/zsh/site-functions empty, and the
loop's glob then failed at every zsh start. The zsh part is one eval with
the (N) qualifier; sh still never parses it.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… a git URL's download is a directory

A package of spec 3 whose entry is a git URL (xlings-project-templates)
failed at its landing on macOS: "cannot copy <runtime>/<repo> into
<payload>: Operation not supported". The download of a git URL is the
clone's directory, and land_download_ copied it as a file. It is copied in
as its working tree; the clone and its .git stay in the runtime directory for
the next pull. LAND-BEFORE-INSTALL holds it.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ral is refused, not merged (libxpkg 0e97230)

strip = 1 on an archive whose top holds bin/ and share/ merged both into the
install directory, and a file of one replaced a file of the other with the
same name: a file left out of a landing reported as done. The components
strip drops are now the same for every member, as far as the members read so
far name them; a member that begins otherwise fails the landing, naming both
beginnings and the member. The spec (§4.6) says so, and the copy follows the
libxpkg it is built with (0e97230, which also carries the migration tool's
--landing-call). Design §9.7 rule 2 and LAND-STRIP.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ectory -- rule M and its consumers read it (libxpkg a9ff63e)

The install sweep with this client refused every sysroot of another system
or machine on the other machine (x86_64-freebsd-sysroot on aarch64,
aarch64-netbsd-sysroot on x86_64): declaring no libdirs, its lib/ was the
{lib64, lib} convention, so the host's surface held another machine's
libraries -- target content no host loads. Design §5.4 puts sysroots outside
the surface and leaves the fact to the recipe, which had no way to state it:
an empty list read as an omitted one. The plan node carries libxpkg's
libdirs_declared (the resolver, the worker protocol); rule M's surface and
a consumer's dependency libdirs take a declared {} as none. Unit and e2e
cases: a sysroot-like payload with libdirs = {} installs, the same payload
declaring nothing is refused naming lib/libc.so.6. Design §5.4 item 2,
§19.6 (this round's findings), L13; payload-rules.md.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… type, which the min macro leaves alone

Windows clang read std::min(...) in extract.cpp through the min macro its
headers bring (expected unqualified-id); the explicit template argument is
the form the file already uses. Design §19.6 records the platform keys the
checker read as versions (arch_alias, build).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… read fails the removal's hook by name; .xpkg is replaced by renames; the profile is written whole (libxpkg dc24652)

From the round's review (main session, with two reviewers' reads verified):
- kept_recipe read failures as "kept none", and the removal then ran the
  index's recipe in the payload's place -- the substitution #743 removed. It
  is now an error naming the directory (an index of more than one recipe
  too); uninstall() fails with it and the withdrawal still runs, as for any
  failing hook. A lib the closure cannot read fails the keeping instead of
  leaving a hole found only at the removal.
- .xpkg was removed, then the new copy renamed in: a failure between left
  neither. The previous copy is set aside by a rename and removed only after
  the new one is in place.
- The shell profile and its kept copy are written atomically (a shell or
  another run may read them at any time), and the kept copy's name takes
  only name characters of the old file's version marker.
- libxpkg dc24652: the hook environment's os.arch, is_arch and is_plat (one
  recipe read twice gives one answer); libdirs = {} reaches elfpatch (carried
  by the worker protocol here); the migration tool leaves four rewrites that
  would change a recipe's meaning to a person. docs/generated/xpkg-hook-api.md
  lists the three compatibility names. Design §19.6.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
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.

2 participants