Skip to content

2026.10.5.1: mcpp run hands the terminal to the program, and the follow-ups of #766 - #767

Merged
Sunrisepeak merged 2 commits into
mainfrom
feat/run-owns-the-terminal-and-766-follow-ups
Oct 5, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
feat/run-owns-the-terminal-and-766-follow-ups

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Summary

This pull request releases 2026.10.5.1. It gives the program that mcpp run starts the terminal, and it closes every follow-up of #761, #763 and #765 recorded in #766. The design record is .agents/docs/2026-10-05-run-terminal-handoff-and-766-follow-ups-design.md (revision 3, which lists where the implementation departs from the reviewed revision 2).

mcpp run and the terminal

run_exec starts every child in a process group of its own, so that a killed mcpp does not leave ninja running (#555). mcpp run used the same launcher for the user's program. On a terminal that group is a background group: the program's first read stopped it with SIGTTIN, and Ctrl-C reached mcpp, which killed the program instead of letting its handler run.

  • POSIX: process::run_foreground replaces mcpp with the program (execve) once the build is done. The program reads the terminal, receives Ctrl-C, Ctrl-\ and Ctrl-Z, and runs with the process id the shell started, so nothing of mcpp outlives it. A refused exec keeps the existing classification (125-127).
  • Windows: winproc::run_foreground starts the program without CREATE_NEW_PROCESS_GROUP in a kill-on-close job, and mcpp ignores Ctrl-C and Ctrl-Break while it waits.
  • Closing notices are printed before the Running line.
  • A death by signal reaches the caller as that signal, as in a direct run, instead of 128+n.

The follow-ups of #766

Item Change
P0 key name auto_export becomes windows_auto_export before its first release. SPEC-004 §5.3: a key that takes effect on one platform carries that platform's prefix.
P0 exports on PE coff-def --exports-file narrows the discovered symbols. Source declarations still decide the export set, and exports beside them is a warning. windows_auto_export = false with exports is refused when an MSVC-ABI row is planned. --required makes an empty export surface an error when a program of the build links the DLL.
P1 placement One predicate, links_objects_of, decides a member's or an artifact's objects and the packages whose shared dependencies it links. It covers statics placed in the owner's own image and excludes statics placed in another package's image.
P1/P2 glob inputs The walk of sources globs moved to mcpp.modgraph.glob (walk_glob_tree), and the scanner and the fingerprint now share it (symlinks followed with the cycle guard, same exclusions). A pattern no walk can enter is reported. Absolute patterns match absolute paths. A pattern that leaves a registry or git dependency is refused.
P2 IR text SPEC-009 §10.5 adds gate G7: E2E 881 must pass with a candidate LLVM release on MSVC-ABI rows.
P3 The coff-def tool runs concurrently. docs/04 covers an executable and its package's own shared library. SPEC-004's dangling references are fixed. run_all.sh bounds each test on hosts without GNU timeout (_timeout.py), which is the cause of the macOS 721 hang.

Closes #766.

Test plan

  • E2E 883 (new) drives mcpp run through a pseudo-terminal. It covers line input on the fast and prepared paths, Ctrl-C reaching the program's handler (status 3), piped input, signal status parity with a direct run, and a terminated run leaving no process. It fails against a binary without the change (STATUS hung).
  • E2E 880 has a placed-static variant that fails before the change with undefined reference to delta@t880_support().
  • E2E 882 adds an absolute pattern, an unwatchable-pattern warning, and the refusal in a git dependency.
  • E2E 881 adds cases I-L (narrowing, the warning beside declarations, the refusal, --required). It requires MSVC and runs on the Windows shards.
  • Local Linux x86_64 / gcc 16.1 with a fresh 2026.10.5.1 binary: full mcpp test passes (146 test binaries, 0 failing); mcpp test -p mcpp.buildmcpp passes; E2E 00, 01, 113, 194, 612, 872, 880, 882 and 883 pass.
  • check_docs_style, check_docs_structure, check_modules_wiring, check_narrow_conversions, check_version_pins, check_file_lengths, check_workflow_assertions and git diff --check pass.
  • All CI checks pass.

xlings-ci added 2 commits October 5, 2026 13:11
…ow-ups of #766

mcpp run, mcpp run -q --release and the named runners started the program in a
process group of its own, a background group on a terminal: its first read
stopped it with SIGTTIN, and Ctrl-C killed it instead of reaching its handler.
On POSIX mcpp now replaces itself with the program; on Windows the program runs
in mcpp's console and process group while mcpp ignores Ctrl-C. Closing notices
are printed before the Running line.

The follow-ups of #761, #763 and #765 recorded in #766:
- A workspace member's executable and an artifact link the shared dependencies
  of the statics placed in their own image, and do not link the objects of a
  static placed in another package's image.
- exports narrows the discovered symbols on the MSVC ABI; beside source
  declarations it is a warning; an empty export surface that a program of the
  build links fails at the .def step.
- auto_export is renamed windows_auto_export before its first release, under
  the new SPEC-004 section 5.3; with exports it is refused on MSVC-ABI rows.
- Build-program glob inputs use the walk of sources globs, report a pattern no
  walk can enter, match absolute patterns, and refuse a pattern that leaves a
  registry or git dependency.
- run_all.sh bounds each test where GNU timeout is absent.

SPEC-004 v1.11, SPEC-009 v0.2, docs 04, 09, 12 and 30 in both languages, and
the design record .agents/docs/2026-10-05-run-terminal-handoff-and-766-follow-ups-design.md.
Git Bash's pwd prints /d/a/..., which is not an absolute Windows path; the
fixture now writes the host_path spelling, D:/a/..., into build.mcpp.
@Sunrisepeak
Sunrisepeak merged commit c94234b into main Oct 5, 2026
55 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.

Follow-ups from #761/#763/#765: link-planning gaps, PE export surface and key naming, glob input boundaries

1 participant