Skip to content

Commit 1e6d1b3

Browse files
authored
2026.11.5.1: scope build requests and report optional action progress (#888)
Validate complete accelerator requests, bind capabilities in each consumer closure, isolate build-only target layers and add optional action progress with UTF-8 runtime channels. Align bilingual documentation and published platform defaults. The exact head passes full CI and the subsequent ecosystem review.
1 parent e0aee5c commit 1e6d1b3

40 files changed

Lines changed: 2616 additions & 140 deletions

‎.agents/docs/2026-11-05-heterogeneous-build-implementation-plan.md‎

Lines changed: 312 additions & 0 deletions
Large diffs are not rendered by default.

‎.agents/docs/2026-11-05-heterogeneous-build-research-and-experiments.md‎

Lines changed: 396 additions & 0 deletions
Large diffs are not rendered by default.

‎.agents/docs/2026-11-05-heterogeneous-build-semantics-and-plugin-boundaries-supplement.md‎

Lines changed: 757 additions & 0 deletions
Large diffs are not rendered by default.

‎.agents/docs/README.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ superseded_by: 2026-09-07-....md # when status is superseded
1818
---
1919
```
2020

21-
346 records.
21+
349 records.
2222

2323
## By subject
2424

@@ -80,6 +80,12 @@ Records that declare one. Everything else is listed by date below.
8080
- [The island boundary's names: one rule for both lanes, and the check that makes it true](2026-09-08-island-boundary-names.md) — active
8181
- [Implementation plan: the island boundary's names](2026-09-08-island-boundary-names-implementation-plan.md) — active
8282

83+
### heterogeneous-build
84+
85+
- [异构构建语义与插件边界补充方案(mcpp#885、mcpp#887)](2026-11-05-heterogeneous-build-semantics-and-plugin-boundaries-supplement.md) — active
86+
- [异构构建补充方案的第二轮调研与实验](2026-11-05-heterogeneous-build-research-and-experiments.md) — active
87+
- [生态 885 与异构构建补充方案的实现依赖](2026-11-05-heterogeneous-build-implementation-plan.md) — active
88+
8389
### home
8490

8591
- [首次初始化、home 重定向与网络诊断优化设计](2026-10-19-first-run-home-and-network-design.md) — landed
@@ -161,6 +167,9 @@ Records that declare one. Everything else is listed by date below.
161167

162168
### 2026-11
163169

170+
- [异构构建语义与插件边界补充方案(mcpp#885、mcpp#887)](2026-11-05-heterogeneous-build-semantics-and-plugin-boundaries-supplement.md) — active
171+
- [异构构建补充方案的第二轮调研与实验](2026-11-05-heterogeneous-build-research-and-experiments.md) — active
172+
- [生态 885 与异构构建补充方案的实现依赖](2026-11-05-heterogeneous-build-implementation-plan.md) — active
164173
- [生态设计 part 4:超越原生——openkal 之上与之下的优化、可观测性与安全](2026-11-03-ecosystem-part4-beyond-native-design.md) — active
165174
- [生态设计 part 3:ok 映像的性能对等——引擎路径、openkal 运行时与观测](2026-11-02-ecosystem-part3-ok-image-performance-parity-design.md) — active
166175
### 2026-10

‎CHANGELOG.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@
44
> Each `## [<version>]` section is that release's notes. Entries are written in English
55
> from 2026.9.28.3 on; earlier entries remain as written.
66

7+
## [2026.11.5.1] - 2026-11-05
8+
9+
### Added
10+
11+
- Build actions can opt into internal stage reporting with `action.progress`
12+
(protocol 18). Each execution supplies a separate UTF-8 snapshot path;
13+
bounded, ordered snapshots update the build status. Exit codes and output
14+
checks still determine success, and completion or cancellation cleans the
15+
channel. Existing actions leave reporting disabled.
16+
17+
### Changed
18+
19+
- Both built-in openkal targets select platform 0.23.6. Its final ThinLTO link
20+
retains emulated TLS; the group includes musl 0.27.5, runtime 0.18.6 and
21+
loader/tools 0.4.4. Explicit platform selections continue to override the
22+
built-in default.
23+
24+
### Fixed
25+
26+
- Accelerator requests and constrained source declarations are validated in
27+
full. Unclosed sets, trailing text and repeated implementation members are
28+
refused; target and implementation ordering share one canonical identity.
29+
Published legacy artifact matching remains compatible.
30+
- Capability requirements and exclusive providers are checked within each
31+
consumer's dependency closure. Independent workspace products can use
32+
different providers, and applications can supply library requirements.
33+
Selected static libraries do not add duplicate consumer contexts; their own
34+
programs, shared libraries, tests and standalone selections retain checks.
35+
Provider pins accept qualified identities and preserve all link inputs.
36+
- Build-only providers and requirements no longer select the final artifact's
37+
target ABI. Transitive build dependencies remain in the host graph, while
38+
packages also used as ordinary dependencies retain their target instances.
39+
740
## [2026.11.3.1] - 2026-11-03
841

942
The built-in openkal platform is 0.23.3 (openkal 0.23: an image at a base of

‎docs/06-features-and-capabilities.md‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ resolver binds exactly one provider from the dependency graph. This is how a bui
190190
one of several interchangeable backends (OpenBLAS / MKL / …) without baking a choice
191191
into the library.
192192

193+
194+
From 2026.11.5.1, requirements bind within each selected consumer's ordinary dependency closure. A library can require a capability supplied by a sibling dependency of its application. Independent workspace products can use different providers; a provider belonging only to another product cannot satisfy a missing requirement. Build-time tool edges are excluded from the target context. Workspace root pins, member pins and `--cap` apply in that order. A short provider name is accepted only when it identifies one candidate; `namespace:name` distinguishes equal short names. Exclusive providers are checked within that same consumer closure, including linked shared libraries. A pin does not remove another provider from the link.
195+
196+
A selected member containing only static-library or entry targets does not add a duplicate binding context when another selected consumer reaches it. Its own executable, shared-library or test targets retain an independent context. Selecting the library alone validates its own dependency closure.
197+
198+
193199
```toml
194200
# A provider package satisfies a capability for any dependent that requires it.
195201
[package]
@@ -307,19 +313,12 @@ provides = ["gpu-blas"]
307313
exclusive = ["gpu-blas"]
308314
```
309315

310-
Two packages that both provide `gpu-blas`, where at least one declares it
316+
Two packages in one consumer closure that both provide `gpu-blas`, where at least one declares it
311317
exclusive, are refused when capabilities are bound — before anything is
312318
compiled, naming the capability and both providers:
313319

314320
```
315-
error: capability 'gpu-blas' is provided by more than one package, and they
316-
declare it EXCLUSIVE.
317-
providers: [compat.cublas, compat.rocblas]
318-
exclusive: [compat.cublas, compat.rocblas]
319-
Two implementations of one interface define the same symbols, so the
320-
link would resolve every call to whichever archive it reached first.
321-
Keep one of them — a `[capabilities]` pin selects a provider for a
322-
REQUIREMENT and cannot make two definitions of one symbol safe.
321+
error: capability 'gpu-blas' is EXCLUSIVE in consumer 'app'; providers: [compat.cublas, compat.rocblas]; exclusive: [compat.cublas, compat.rocblas]. A [capabilities] pin selects a provider for a requirement and cannot make two definitions of one symbol safe.
323322
```
324323

325324
The refusal reports `exclusive-capability` in `--format json` (chapter 11).

‎docs/24-openkal-cross.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ practice.
111111

112112
```toml
113113
[target.'cfg(any(linux, macos, windows))']
114-
platform = "openkal-platform@0.23.3"
114+
platform = "openkal-platform@0.23.6"
115115
```
116116

117117
One table (2026.10.27.1+). It selects the openkal platform for the host triples,
@@ -411,6 +411,8 @@ Nothing else is declared (2026.10.27.1+): the target table selects
411411
`openkal-platform` for both rows, and the platform states the toolchain, the
412412
layers, the tools, the conventions below and the runner ([35](35-platforms.md)).
413413

414+
In mcpp 2026.11.5.1, both built-in openkal targets select platform 0.23.6 by default. An explicit `platform` configuration overrides that selection. This platform preserves the emulated TLS convention through the final ThinLTO link.
415+
414416
| | the platform's statement | the reason |
415417
|---|---|---|
416418
| compile | `--target=<arch>-unknown-none-elf -fPIC -femulated-tls -fvisibility=hidden -fasynchronous-unwind-tables -Xclang -fstack-clash-protection`; on AArch64 also `-ffixed-x18 -mno-outline-atomics`; `-ffreestanding` when the graph supplies no C library | an image is told no operating system; it does not address the thread pointer and does not use the platform register, which two systems reserve; it exports what its source marks `visibility("default")` |

‎docs/30-build-mcpp.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,14 @@ a.arg("cp").arg("${mcpp.artifact:updater/updater}").arg(out.c_str())
820820
A placeholder that names no `artifacts` entry fails planning and is named in the
821821
error.
822822

823+
#### Optional action progress (2026.11.5.1+, protocol 18)
824+
825+
Set `a.progress = true` in build.mcpp to enable telemetry for that action. The default is `false`; all five roles support it. The command receives `MCPP_ACTION_PROGRESS_FILE` when reporting is available and treats an absent or empty value as disabled. The path is encoded as UTF-8 on every host, including Windows.
826+
827+
The worker atomically replaces the file with its latest JSON snapshot, for example `{"v":1,"seq":2,"phase":"compile","done":3,"total":9}`. `phase` can be reported without a total. The build status displays the latest valid snapshot while the action runs. Counts describe work inside that action and do not contribute to the outer Ninja step count. The command's exit status and output checks determine success.
828+
829+
The runtime channel is allocated for this execution and is not a declared input or output. Editing the build program to enable telemetry can replan the build. Existing NDJSON build events retain their meanings. Snapshot fields, limits and ordering are specified in [SPEC-007 §3.1](specs/build-plugins.md#31-可选-action-进度协议-18).
830+
823831
### Deploying what the program generated: `deploy` (2026.9.12.3+, protocol 11)
824832

825833
`[runtime] deploy` (docs/04 §2.11) places a file that already exists in the
@@ -1723,6 +1731,8 @@ of the cache key — an override is an escape hatch, not a reproducible input.
17231731

17241732
### Libraries of a build program: `[build-dependencies]` (mcpp 2026.10.11.1+)
17251733

1734+
Build-only libraries supply layers and requirements to the build-program sub-build. They do not select the final artifact’s ABI, including when reached transitively (2026.11.5.1+). A package also reached through an ordinary dependency retains its target instance.
1735+
17261736
A rule (say "run protoc over these `.proto` files") is written once, as an
17271737
ordinary mcpp library package, and so is any library a build program needs —
17281738
a TOML parser, a formatter. A build program uses a library its package names

‎docs/42-heterogeneous-builds.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,10 @@ say and says nothing, and a probe that reaches no answer invents none.
470470
accel = "cuda12.8+{sm_80,sm_90f} ptx>=90"
471471
```
472472

473-
overridden for one build by `--accel`, which is the relationship `--target`
473+
From 2026.11.5.1, a build request is read completely: unclosed sets, trailing text and empty target entries are errors. An implementation appears once per request; combine its targets as `sycl+{nvptx64-sm_89,nvptx64-sm_90}`. Implementation and target ordering, and repeated targets within a member, do not allocate different build variants. Target tokens belong to their implementation and are interpreted by its rule; selecting a SYCL NVIDIA target does not itself select CUDA source compilation. Source constraints use the same complete syntax check, including in a CPU-only build.
474+
475+
476+
The manifest request is overridden for one build by `--accel`, which is the relationship `--target`
474477
has with `[toolchain]`. `--no-accel` is not the absence of `--accel`; it is an
475478
explicit request for no accelerator, which is what selects a CPU-only variant
476479
of a package that also publishes device builds.

‎docs/specs/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
| [SPEC-004](manifest-semantics.md) | `mcpp.toml` 的平面划分、条件化形状、解析轴与命名规约 | 草案 v1.17 | 2026-10-23 | 条件化形状 mcpp >= 2026.8.29.1;目标轴 mcpp >= 2026.9.6.4;`linkage` 默认值 mcpp >= 2026.9.15.2;链接 flag 的词读法 mcpp >= 2026.9.26.2;条件化的 `dialect_cxxflags` 与 `-p` 的包身份 mcpp >= 2026.9.28.1;条件表按具体程度生效 mcpp >= 2026.9.28.2;平台前缀规约 mcpp >= 2026.10.5.1;根包的继承、根位置的 profile、链接 flag 的作用域、链接期优化与导出发现 mcpp >= 2026.10.5.2;架构段的 `x86` 即 `i686` mcpp >= 2026.10.5.3;前缀即语义与工作空间层 mcpp >= 2026.10.10.1;依赖的库与配置(§12) mcpp >= 2026.10.11.1;值的四档层次与 `run_under` mcpp >= 2026.10.24.1 |
3737
| [SPEC-005](build-database.md) | 构建数据库:`mcpp emit build-database` 的内容、取值规则与不写工程目录的保证 | 评审中 v1.8 | 2026-10-11 | mcpp >= 2026.9.15.1;v1.3 条款 mcpp >= 2026.9.26.2;v1.4 条款 mcpp >= 2026.9.27.1;v1.5 条款 mcpp >= 2026.9.28.1;v1.6 条款 mcpp >= 2026.9.29.5;v1.7 条款 mcpp >= 2026.9.30.2;v1.8 条款 mcpp >= 2026.10.11.1 |
3838
| [SPEC-006](toolchain-management.md) | 工具链管理:身份、来源、选择与载荷契约 | 草案 v0.10 | 2026-10-23 | 逐条标注;已实现条款 mcpp >= 2026.9.24.1;§3.7 mcpp >= 2026.9.28.1;§3.7.1 mcpp >= 2026.9.28.2;§2.2.1 与 §3.3 的非缺省来源 mcpp >= 2026.10.1.3;§3.8 mcpp >= 2026.10.8.1;§3.9 至 §3.11 mcpp >= 2026.10.24.1 |
39-
| [SPEC-007](build-plugins.md) | 构建插件:配置、施工与校验的分工,运行时与规划期的义务 | 草案 v0.9 | 2026-10-11 | 逐条标注;mcpp >= 2026.9.26.2;v0.3 条款 mcpp >= 2026.9.27.1;v0.4 条款 mcpp >= 2026.9.28.1;v0.5 条款 mcpp >= 2026.9.28.2;v0.6(§9)mcpp >= 2026.9.28.3;R3.9、R3.10 mcpp >= 2026.10.10.1;§10 mcpp >= 2026.10.11.1 |
39+
| [SPEC-007](build-plugins.md) | 构建插件:配置、施工与校验的分工,运行时与规划期的义务 | 草案 v0.12 | 2026-11-05 | 逐条标注;mcpp >= 2026.9.26.2;v0.3 条款 mcpp >= 2026.9.27.1;v0.4 条款 mcpp >= 2026.9.28.1;v0.5 条款 mcpp >= 2026.9.28.2;v0.6(§9)mcpp >= 2026.9.28.3;R3.9、R3.10 mcpp >= 2026.10.10.1;§10 mcpp >= 2026.10.11.1;§3.1 协议 18 mcpp >= 2026.11.5.1 |
4040
| [SPEC-008](library-interface.md) | 库的接口:公开模块、发布闭包与两种形态的一致 | 草案 v0.2 | 2026-10-11 | 第一阶段(只警告)mcpp >= 2026.9.28.3;v0.2 mcpp >= 2026.10.11.1 |
4141
| [SPEC-009](toolchain-maintenance.md) | 工具链的支持与维护:版本线、默认值、来源、移动与退役 | 草案 v0.6 | 2026-10-09 | 逐条标注;本版只有规范,多数条款未实现;§6.4 mcpp >= 2026.10.8.1 |
4242
| [SPEC-010](home-initialization.md) | home 选择、单跳入口、初始化、网络边界与单次运行的 `--home` | 草案 v0.2 | 2026-10-26 | mcpp >= 2026.10.19.1;网络能力逐条标注;§6 mcpp >= 2026.10.26.1、xlings >= 2026.10.26.1 |

0 commit comments

Comments
 (0)