Skip to content

Windows LPAC: compiler registration canonicalizes the granted runtime directory before IPC and transport publication #1049

Done

Description

@dreamyloong2005

Duplicate check (2026-12-06): No exact duplicate found in the documented search scope; scoped new-issue candidate

Live-source check: the owning current-main source still contains the relevant pattern. This is a static check, not a new runtime reproduction of current main. Search results are bounded and do not prove that no duplicate exists.

Summary and scope

At mcpp 2026.12.4.1, Witnesses::start() obtains an OS runtime-directory path,
canonicalizes it, passes the canonical result to the IPC listener, and publishes
the same directory to compiler controllers. In the restricted Windows harness,
this replaces an accessible Z: runtime path with a physical D: spelling
outside the OS capability layer's allowed preopen routes. Registration fails
after the real compiler-run owner lock has already been acquired.

This report concerns mcpp's choice of operational runtime spelling. It is
separate from the earlier owner-lock workspace-path issue and from the later
openkal-windows AF_UNIX backend problem. Fixing this mcpp line alone does not
establish that the native listener works in the same long-path LPAC layout.

Environment

  • Windows x64 LPAC harness, no network access or expanded grants.
  • Source pinned to mcpp 2026.12.4.1, commit
    332fea767afbb04207bb3f2a1806b64be5da0ca4.
  • Rebuilt candidates use saved local dependency resolution including
    mcpplibs.os 0.4.9, openkal 0.26.2 and openkal-windows 0.23.3.
    This is not a reconstruction of every dependency byte in the official release.
  • Runtime fixture: LLVM 22.1.8, Windows MSVC ABI, bundled xlings 2026.12.5.2,
    freestanding C++26 project; local mcpp rebuilds used LLVM 23.1.3.
  • Work/home/tool roots are presented through granted Z: spellings. The
    AppContainer-specific runtime lies beneath
    Z:/work/home/Packages/<profile>/AC/Temp. Its physical ancestor spelling is
    not an allowed preopen route.

Expected and actual behavior

Expected: retain the runtime directory's permitted operational spelling for
listener creation, transport publication, controller connect, and stop/wakeup.
All participants should use the same reachable directory and preserve the
existing admission/refusal and shutdown protocol.

Actual: with the separate owner-work correction in place, the real owner lock
succeeds but registration fails using the physical spelling:

cannot create a compiler registration endpoint: listening at mc-<id> in D:/<private-root>/<sandbox>/work/home/Packages/<profile>/AC/Temp: beneath no directory this program was given: not found

This is a preopen/path refusal, not the subsequent native invalid argument
failure and not a named-pipe capture failure. Those are separate stages with
different owners and fixes.

Reproduction and harness constraints

This is not a stock-terminal-only reproducer. The existing LPAC harness supplies
the restricted token, drive alias, allowed preopen routes, private runtime and
mounted offline inputs. A reviewed standalone harness/fixture subset is still
needed as a public attachment; full internal Agent logs are not an attachment.

  1. Start a fresh harness sandbox with workspace Z:/work/workspace, home
    Z:/work/home, toolchain Z:/bin/llvm, and an offline bundle
    Z:/bin/bundle. Keep the recorded private runtime setup and original rights.

  2. Use the actual pinned-source mcpp with only the separate operational-work
    owner-lock correction first. Unmodified mcpp may stop earlier at owner.lock
    and therefore does not exercise this report's target stage.

  3. Use the same freestanding C++26 fixture and set
    MCPP_HOME=Z:/work/home/.mcpp, MCPP_OFFLINE=1,
    MCPP_TOOLCHAIN=path:Z:/bin/llvm; use the mounted mcpp/LLVM bins on PATH.

  4. From Z:/work/workspace, run the original failing recipe's commands:

    mcpp fetch --from Z:/bin/bundle
    mcpp pack --profile release --pkg-format dir
    

    Fetch succeeds. Pack acquires the real owner lock, then reports the physical
    runtime-directory refusal above. The earlier owner-only reduced build also
    reaches this exact subsequent error.

  5. Retain the owner correction, change only mcpp's runtime-directory selection
    as below, rebuild and repeat. The observed error now names the granted Z:
    runtime and proceeds to a distinct native backend invalid argument. This
    confirms progression past the original physical-preopen refusal, not a
    green listener or complete pack
    . Do not hide that remaining failure.

Offline provider preparation sometimes fails independently. A run that stops
during preparation is not a registration reproduction.

Pinned source and minimal change

The local minimal change is:

-        std::error_code ec;result->directory_=fs::weakly_canonical(*runtime,ec);
+        std::error_code ec;result->directory_=fs::absolute(*runtime,ec).lexically_normal();

Here the directory is a transport/access path, not an output-identity or
certificate-authorization key. Keep the existing error handling, transport
schema, endpoint name, admission checks and stop behavior. No native backend
AF_UNIX implementation, address-length limit, global Temp policy, permission
mask or canonical transaction identity needs to change in this mcpp issue.

Actual evidence, with distinct verdicts

Recorded run/test Observed result What it does and does not prove
Owner-only real rebuilt mcpp in the original restricted fixture Owner lock acquired; physical D: registration preopen refusal Actual reproduction of this target stage; earlier owner failure is not confused with it
Runtime-spelling candidate on top of owner correction Error directory becomes Z:; listener still fails invalid argument Original physical-route refusal is no longer the failing stage; not a native-listener green result or complete isolated A/B/A
Actual CompilerPathSpelling/RuntimeTransportRoundtrip regression Pass: real listener, published directory equality, real client exchange, exact REFUSED outside-generation, clean stop Real protocol/refusal/shutdown coverage in an ordinary host directory; not a canonical-different LPAC alias test or successful compiler admission ACK
Later combined local repair, four original Debug/Release × two-home cells Actual compile/link/pack/run/atomic-export acceptance passes with unchanged assertions Integration regression for all combined repairs, including the separate native backend fix; not an isolated A/B proof for this mcpp change

The ordinary-host selected path/transaction run originally had 30 passes,
0 failures and 10 explicit skips; a later broader selected run had 43 passes,
0 failures and the same 10 skips. The transport case genuinely passed in both;
the whole counts are not attributed to this one issue. The native backend's
separate red/green controls must not be presented as mcpp-only runtime tests.

Acceptance criteria and safety boundaries

  • Add an alias-sensitive test where the OS returns a granted runtime spelling
    whose canonical physical route is not preopened. Assert that the listener
    argument and transport record preserve the permitted spelling. A source-text
    check alone is insufficient.
  • Where the backend can support that layout independently, require real
    listen/connect/exchange/stop with unchanged rights. Use a controlled short
    endpoint or a separately validated backend to avoid conflating this test with
    the native AF_UNIX issue. A matched isolated LPAC listener red/green remains
    a useful upstream acceptance gap in the current evidence.
  • Retain exact outside-generation refusal and malformed/foreign admission
    checks; do not manufacture an ACK, disable management or claim that the
    host refusal test exercised successful compiler-unit observation.
  • Keep the published transport path consistent with controller reconnect and
    shutdown wakeup. Preserve owner lock/capacity accounting and all transaction
    parent-identity/certificate protections.
  • Test relative/absolute runtime handling, failure to obtain a runtime directory
    and shutdown/error paths without hangs; broader concurrent alias-retarget,
    Unicode/UNC and all-platform guarantees are not established here.
  • No new network grants, physical-ancestor grants, relaxed LPAC or file ACLs,
    blanket fallback, global installation or official-release acceptance claim.

Activity

  1. speak-agent commented on Dec 6, 2026

    @speak-agent
    Member

    Fixed in 2026.12.7.1 (#1054). A compiler registration is published under the runtime directory as the system reports it, and the record holds the address, not a physical spelling (SPEC-020 §2). The transaction unit tests cover a registration reached through a link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions