Skip to content

One C++ runtime per process, the graph and pack facts, bounded offline-aware planning: #646 to #649 (2026.9.16.1) - #650

Merged
Sunrisepeak merged 23 commits into
mainfrom
feat/646-649
Sep 15, 2026
Merged

Sunrisepeak merged 23 commits into
mainfrom
feat/646-649

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Summary

This pull request implements the engine side of #646, #647, #648 and #649 as one release, 2026.9.16.1. The triage record routes each of the 23 reported items, and 12 further findings from measuring them, to the repository where it belongs. The implementation plan states the review from eight angles, the task ledger with the reading that closes each row, and the refinements found while implementing:

  • .agents/docs/2026-09-16-646-649-four-issues-by-home.md (triage record)
  • .agents/docs/2026-09-16-646-649-implementation-plan.md (implementation plan)
  • .agents/docs/2026-09-16-646-649-probes.sh (probes)

Every new e2e script fails on the released 2026.9.15.2 and passes on this branch; the plan's ledger quotes the failing line of each.

Images and runtimes (#646, #649 E10)

  • One process, one C++ runtime (F3a, found while measuring). On ELF, a program over a C++ shared library that the build produces used to carry a static C++ runtime while the library used the shared one. The default llvm build aborted with std::bad_cast. Such programs and tests now take the shared library's contract, and a stated self-contained program is refused as program-cxx-runtime-split. (e2e 700)
  • Symbol provision reports real duplicates only (F3b). STB_GNU_UNIQUE is vague linkage. A definition that both images take from one build object, or that the toolchain's own runtime provides for the std module initialiser, is no longer a finding. (e2e 701)
  • A static package goes into the shared image that reaches it (F1). A static package reached from several images is refused where the link or load cannot succeed (Mach-O, PE, the Android app row). On other ELF rows it builds as before, with a build/static-placement diagnostic. (e2e 702, 307)
  • The llvm row on the MSVC ABI records the static CRT it links (E10 step 1). Measurement legs for C++ identity across Mach-O and PE images print their readings into the job summaries. (e2e 703, 704, 705)

Build programs, the link line and pack (#647 E1-E3, #649 E5, E9)

  • mcpp::graph_file(): the root build program reads the resolved graph, with each package's [package.metadata] kept verbatim. The graph's digest re-runs the program when it changes. [package] now reports unknown keys. (e2e 720)
  • The link branch is chosen by host and target object format, so an Android row links on a macOS host. (unit LinkShape.*, e2e 721 as its own macOS step)
  • mcpp pack strips the program on every stripping row, every shared library the graph built and staged runtime copies. The status line reports what was done, and build programs read the decision. (e2e 722)
  • mcpp pack --message-format json prints one mcpp.pack envelope. pack accepts --release and --dev, and every verb shares one profile rule. (e2e 723)

Features, tools and git sources (#647 E4, #649 E6-E8)

  • Forwards are validated against every dependency table and row. A [feature-deps] restatement with a different source is refused. dep_bin publishes the qualified name. (e2e 710, 711, 187)
  • A package with only program targets contributes nothing to a consumer's graph. Package cycles are refused at resolution (package-cycle), and a tool cycle is refused at its first repetition. (e2e 712)
  • A git dependency selects a repository member by identity, and a second declaration merges its requests. (e2e 713)
  • --features <dependency>/<feature> is a root forward. (e2e 714)

An editor that plans in the background (#648)

  • The index refresh decision walks the resolver's deprecated bare-name rung. A bare compat.* dependency no longer starts a network refresh every two minutes. (e2e 730)
  • Children started while planning do not inherit the caller's pipe. (e2e 731)
  • xlings children are owned (a process group, or a job object on Windows) and bounded: [index] refresh_timeout for a refresh, an inactivity bound for an install. (e2e 732)
  • The envelope's effects report observed network, and an offline plan that needs a download has its own code, MCPP_OFFLINE_DOWNLOAD_REQUIRED. (e2e 733, 735)
  • [index] auto_refresh = false governs every implicit refresh. (e2e 734)
  • The default mcpplibs artifact is a GLOBAL/CN region object, and existing homes are upgraded in place. With mirror = CN, an index update reaches only GitCode. (e2e 151)

Ecosystem

Verification

  • Unit tests: the full suite on the integrated branch.
  • e2e: every new script, and the full local suite on Linux.
  • Docs: style, structure, path-hygiene and version-pin checks.
  • CI on this pull request covers the macOS and Windows legs.

…d has its own code (#648 L5, L6)

The fetcher's pre-install and retry refreshes and a project's first
custom-index sync now take the refresh policy's decision, so
[index] auto_refresh = false governs them. The policy half of
mcpp.pm.index_refresh moves to mcpp.pm.refresh_policy, which the fetcher can
import. Every offline refusal records offline-download-required, and
emit build-database reports it as MCPP_OFFLINE_DOWNLOAD_REQUIRED.
…images take from one object is not a conflict (#646 F3)
…g derivation, packages of programs, git members (#647 E4, #649 E6-E8)

- The forward validator reads every dependency table of its manifest, on
  every row, including [build-dependencies] (#647 E4.1).
- A [feature-deps] restatement naming another source than the declaration
  in effect is refused, naming both (#647 E4.2).
- One derivation names a provider for dep_dir, dep_linkage and dep_bin, so a
  namespace + name package's tool is published under its qualified name
  (#647 E4.3).
- A package whose declared targets are all programs contributes nothing to a
  consumer's graph; package cycles are refused where the graph is resolved
  (package-cycle); a tool requested by its own sub-build is refused at the
  first repetition (#649 E6).
- A git dependency selects the repository member that declares its key; a
  member's in-clone path edge names the same git source; a second declaration
  of one dependency merges its requests into the edge; the git banner names
  its reference (#649 E7).
- --features <dependency>/<feature> is a forward of the root and never a
  macro; mcpp why accepts --features (#649 E8).
…bers and dependency feature tokens (e2e 710-714, 187)
…ts, packages of programs, git members, one naming derivation, package-cycle
…one image per static package, the llvm row's CRT record, and the cross-image identity measurements (#646, #649 E10)
An Android row built on a macOS host received the Apple SDK line, which names
no --target, so -fuse-ld=lld selected ld64.lld for an ELF object. link_shape
takes the host and the target's object format; a target outside the host's
own family takes the generic line that carries the target. Unit LinkShape.*
states the choice for every host; e2e 721 links the row on macOS.
 E1, #649 X4)

The metadata table is kept as JSON text for the graph document and is not
interpreted. [package] reports a key the parser does not read the way [build]
does: a warning for the root manifest, an error under --strict.
…raph built, and a machine-readable pack report (#647 E1, #649 E5, E9)

- mcpp::graph_file(): the root package's program reads every package in
  dependency order with its manifest directory, features, targets and
  [package.metadata]; the document's content joins the re-run key. The same
  entry builder produces resolution.json's graph section.
- mcpp pack strips the program on every row that strips (the Android row did
  not reach the strip step), every shared library the graph built and the
  staged copy of the toolchain's runtime; the Packing line states what the row
  does; mcpp::pack_strip() and mcpp::pack_debug_symbols_dir() carry the
  decision to a member that stages libraries of its own.
- mcpp pack --message-format json prints one mcpp.pack envelope; pack takes
  --release and --dev; build, run, test, emit and pack resolve the profile
  with one rule (--profile wins over the shorthands).

e2e 720, 722, 723; unit BuildProfile.*.
…ing homes gain the CN half (#648 L7)

mcpplibs/mcpp-index#432 made the GitCode copy of the index artifact the same
bytes as the GitHub copy. With mirror = CN, mcpp index update now reaches only
raw.gitcode.com, gitcode.com and file-cdn.gitcode.com (traced). e2e 151 covers
the fresh seed, the flat-to-region upgrade and its idempotence, and a user base
that keeps its own value.
WindowsLld spelled the vocabulary the runtime-contract source scan reserves for
provider selection (RuntimeContract.SourceOwnsNoProviderSpecificSelectionOrProbeBranch).
…OS and Windows job summaries, 721 as its own macOS step; migration unit tests for the region artifact
… the link shape; version 2026.9.16.1, CHANGELOG, records updated with the implementation's readings
…nit shim belongs to C++ units; e2e 732 bounds itself portably

The macos-15 run of e2e 704 reads runtime_error=not-matched, errc=unequal under
the payload default and caught/equal under host-coupled, so #646 F2 holds. The
default is unchanged, and such a build is told once. The same run showed the
#336 shim prepended to a C-only shared library, whose link carries no libc++,
and that macOS runners have no `timeout`.
@Sunrisepeak
Sunrisepeak merged commit f4529b2 into main Sep 15, 2026
45 of 46 checks passed
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