Skip to content

Commit 5279ab7

Browse files
committed
feat: describe selected launch configurations and named test runners
1 parent 0ee2ce4 commit 5279ab7

24 files changed

Lines changed: 208 additions & 14 deletions
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Launch configuration and named test runners
2+
3+
Status, 2026-11-06: implemented for candidate 2026.11.6.1. Focused local
4+
controls pass; final public-dependency and cross-platform CI remain pending.
5+
6+
A consumer choosing a debugger runner needs the configuration of the program
7+
selected to run. A separate `self env` query may describe a different profile
8+
or the first leg of a target set instead of its reachable launch leg. The
9+
launch producer already holds the selected build context and can describe it
10+
without another planning protocol.
11+
12+
`mcpp.launch.data.configuration` therefore adds `triple`, `profile`,
13+
`platform` and `runners` to both program and test launch descriptions.
14+
The first three fields match the build result's configuration. `runners`
15+
lists nonempty effective named-runner declarations even when no platform is
16+
active. Older consumers can ignore the additive object; newer consumers test
17+
for its presence. No device or debugger name acquires core semantics.
18+
19+
`mcpp test --runner <name>` uses the existing named-runner resolver. The same
20+
choice applies to ordinary test execution, launch description and execution
21+
of tests from an archive. A missing name is refused, rather than running the
22+
test directly. `--runner` and `--no-runner` are contradictory and refused.
23+
Timeouts, output capture, execution-host routing and test verdicts retain
24+
their existing behavior. The platform or project owns the runner's command.
25+
26+
The IDE can use the additive configuration to choose a platform's `debuggee`
27+
runner while preserving the selected target and profile, and reject a
28+
different configuration in the second result. OpenKal platform 0.24 declares
29+
that runner using existing platform fields. The core contains no OpenKal
30+
debugger flag, loader path or JIT policy.
31+
32+
The fresh local candidate passes E2E 01, 333, 993 and 936. E2E 993 exercises a
33+
real named runner, its returned command, ordinary and archived test execution,
34+
argument preservation and refusals. E2E 936 passes with the inherited
35+
`NO_COLOR=1` removed; its assertions remain unchanged. The build uses the OS
36+
0.3 candidate source and does not establish final public installation.
37+
An actual IDE-backend/core integration additionally passes eleven program
38+
and test launch checks without a mock. The modified target-set E2E 963 and
39+
the final packaged editor/runtime checks still require their full scopes.

‎CHANGELOG.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
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.2] - 2026-11-05
7+
## [2026.11.6.1] - 2026-11-06
88

99
### Fixed
1010

11+
- Launch descriptions include the selected target, profile, resolved platform
12+
and available named runners, including the reachable leg of a target set.
13+
Editor debug launches can retain the configuration that actually built the program.
14+
- Tests accept `--runner <name>` with the same runner resolution as `run`,
15+
including `--print-launch` and archive execution. Missing names and a
16+
simultaneous `--no-runner` are refused.
1117
- Cached builds load action ownership when an action starts, so internal progress
1218
appears while Ninja is still buffering stdout. Idle builds retain lazy loading;
1319
command results and output checks remain authoritative.

‎docs/04-mcpp-toml.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ with two behaviours has to be.
10491049
`bmi_schedule` decides when importers are unblocked.
10501050

10511051
With GCC and `bmi_schedule = "on"`, ordinary compilation and detached code
1052-
generation share the same total `jobs` limit (2026.11.5.2+). Additional
1052+
generation share the same total `jobs` limit (2026.11.6.1+). Additional
10531053
scheduling and join tasks do not increase the number of compiler processes.
10541054
Cancelling the build ends its ordinary and detached compilers. An immediately
10551055
following build waits for their cleanup before starting another compiler;

‎docs/08-testing.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,18 @@ or a QEMU exit code is what a bare-metal runner is chosen to produce.
170170
`--no-runner` exists for a host that can execute the binaries natively and
171171
should not pay for an emulator.
172172

173+
`--runner <name>` (2026.11.6.1+) selects a named runner instead of the default,
174+
using the same declarations and argument substitution as `mcpp run --runner`.
175+
It also applies to `--print-launch` and tests read from an archive. An absent
176+
runner name is refused; `--runner` and `--no-runner` cannot be combined.
177+
178+
For a platform that declares `debuggee`, this builds one test and prints the
179+
command a debugger starts, without starting the test:
180+
181+
```bash
182+
mcpp test unit/math --runner debuggee --print-launch
183+
```
184+
173185
`--no-run` makes the narrower claim, and it has to be asked for. Without it, a
174186
target this host can neither execute nor reach through a runner leaves every
175187
test not run and the command exits 2: mcpp did not establish whether the tests

‎docs/24-openkal-cross.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ 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-
Both built-in openkal targets select platform 0.24.0 by default (2026.11.5.2+).
414+
Both built-in openkal targets select platform 0.24.0 by default (2026.11.6.1+).
415415
An explicit `platform` configuration overrides that selection. This platform
416416
preserves the emulated TLS convention through the final ThinLTO link.
417417

‎docs/25-home-indices-and-store.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ configuration, so it remains usable while the network is broken.
9090
An install tracks byte progress and source changes separately for each active
9191
download. Time spent waiting for a download slot does not consume that budget.
9292
Progress on another file does not renew a stalled file's budget.
93-
From 2026.11.5.2, a stalled-download diagnostic names the file, elapsed interval
93+
From 2026.11.6.1, a stalled-download diagnostic names the file, elapsed interval
9494
and source attempt. Provider preparation and process timeouts are reported
9595
separately. Mirror selection
9696
uses `mcpp self config --mirror auto`, `CN` or `GLOBAL`.

‎docs/30-build-mcpp.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ none to rely on), and the only interpolations are a closed set:
10971097
| `${mcpp.out_dir}` | the build output directory |
10981098
| `${mcpp.bin_dir}` | where produced binaries land: `bin/`, or, for an action a workspace member's build program declares, that member's product directory (2026.9.29.4+) |
10991099
| `${mcpp.compile_db}` | path to `compile_commands.json` (what clang-tidy's `-p` wants) |
1100-
| `${mcpp.contract}` *(2026.10.30.1+)* | path to the configuration's contract, `mcpp-contract.json`, beside its compile database: the compiler of each language with the words every unit is compiled with (target, sysroot, target-side headers, platform and profile flags), and the link driver, its words and the archiver. A foreign build system reads it to compile for the target as the engine does; a package's own include directories are not in it, nor the engine's C++ dialect and module words (`-std=`, `-fmodules`), which are its choice for its own units. Since 2026.11.5.2, link arguments describe the target configuration; the consuming package's link flags and libraries are excluded, since they can name outputs the foreign build has yet to produce |
1100+
| `${mcpp.contract}` *(2026.10.30.1+)* | path to the configuration's contract, `mcpp-contract.json`, beside its compile database: the compiler of each language with the words every unit is compiled with (target, sysroot, target-side headers, platform and profile flags), and the link driver, its words and the archiver. A foreign build system reads it to compile for the target as the engine does; a package's own include directories are not in it, nor the engine's C++ dialect and module words (`-std=`, `-fmodules`), which are its choice for its own units. Since 2026.11.6.1, link arguments describe the target configuration; the consuming package's link flags and libraries are excluded, since they can name outputs the foreign build has yet to produce |
11011101
| `${mcpp.target_file:<name>}` | the built file of target `<name>` |
11021102
| `${mcpp.stage_dir}` *(2026.9.11.1+)* | the tree `mcpp pack` staged, absolute. `artifact` role only, and only under `mcpp pack --pkg-format <name>` |
11031103
| `${mcpp.self}` *(2026.9.13.1+)* | the engine's own executable, absolute. An action's command is an argv with no shell, so a build program has no portable way to copy a file; the engine is present wherever a build runs, and `${mcpp.self} stage --verify content --output <dst> <src>` copies one file, creates the destination's parent, and writes only when the bytes differ. That argument shape is a contract from 2026.9.13.1 on; a build program that names it declares that release as its floor |

‎docs/50-machine-output.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,13 @@ starting it. `data` is `program`, `argv`, `cwd`, `env` and `via`, as
10021002
`launch` above. `--print-launch` takes no `--format`: on `mcpp run`, `--pkg-format`
10031003
names a distributable.
10041004

1005+
`data.configuration` (2026.11.6.1+) contains the selected program's `triple`,
1006+
`profile` and resolved `platform`, using the same fields as the build record's
1007+
configuration. For a target set it describes the leg selected for this launch.
1008+
`configuration.runners` lists the available named runners, including project
1009+
declarations when `platform` is null. Older engines omit `configuration`;
1010+
consumers check for its presence.
1011+
10051012
```
10061013
mcpp test <name> --print-launch [-- <arguments>]
10071014
```

‎docs/specs/concurrency.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| 状态 | 评审中 v1.1 |
88
| 版本 | 1.1 |
99
| 最后修改 | 2026-11-06 |
10-
| 对应实现 | 基础保证: mcpp >= 2026.10.26.1; §5.1: mcpp >= 2026.11.5.2 |
10+
| 对应实现 | 基础保证: mcpp >= 2026.10.26.1; §5.1: mcpp >= 2026.11.6.1 |
1111
| 相关设计文档 | `.agents/docs/2026-10-26-control-contract-runtime-and-ide-ecosystem-design.md` §3、§4、§5.4 |
1212
| 相关 issue | #839 |
1313
| 使用文档 | [50 — 机器可读输出](../zh/50-machine-output.md) §9、§11 |
@@ -88,7 +88,7 @@ CI。在 2026.10.24.1 上,同一配置的两次冷构建相隔 0.1–0.5 s 启
8888

8989
### 5.1 分离编译的执行单元与恢复
9090

91-
以下保证适用于 GCC 的 `bmi_schedule = "on"`(2026.11.5.2+):
91+
以下保证适用于 GCC 的 `bmi_schedule = "on"`(2026.11.6.1+):
9292

9393
1. 普通编译与分离代码生成**必须**共用实际的 `jobs` 总上限。等待任务与调度任务
9494
**禁止**作为编译名额的替代。内核锁已释放而原编译单元仍被占用或状态未知时,

‎docs/zh/04-mcpp-toml.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ bmi_schedule = "off" # auto (default, = off) | on | off
973973
`bmi_schedule` 决定 importer 何时被解除阻塞。
974974

975975
使用 GCC 且 `bmi_schedule = "on"` 时,普通编译与分离的代码生成共用同一个 `jobs` 总上限
976-
(2026.11.5.2+)。额外的调度和等待任务不增加编译器进程数量。
976+
(2026.11.6.1+)。额外的调度和等待任务不增加编译器进程数量。
977977
取消构建会结束本轮普通编译器和分离的编译器。紧接着的构建等待它们完成清理后
978978
才启动新的编译器;未完成的输出会重新构建。已完成模块的 object 缺失时,
979979
该次构建会重新生成它。输入和输出均不变的构建仍不进行编译。

0 commit comments

Comments
 (0)