Repository navigation
WIP: posix interactive shells load the generated plugin loader (#603) - #617
Merged
Merged
Conversation
Baseline refresh for the #603 branch. Rolls up the rubash clearance wave merged since 8fffc99e, including the stacker dependency rubash#1836 added for the #1801 stack-growth fix; the root Cargo.lock gains stacker/psm (and their object/ar_archive_writer deps) with this bump.
…shells (#603) run_startup_files' posix branch sourced $ENV and returned without ever loading the generated plugin loader, so posix interactive shells silently lost every plugin and theme in both login states — the #590 defect class on the one branch #590 could not reach. Per the product-semantics ruling on #603, the loader is niu's own activation plane, not a user file: posix mode governs the choice and order of user files (profile chain, then $ENV), not whether the product integration loads. The posix branch now loads the loader before $ENV, mirroring the ordinary branch's relative order — a login shell has just sourced the profile chain, so the loader lands after it (the #590 slot) and before $ENV; a non-login shell loads it at its rc face's seat, before $ENV, so $ENV lines win just as rc lines do. An exit inside the loader unwinds before $ENV and the login tail, like any startup file. No rc is sourced in posix mode, so the double-execution guard gets None, as on the login branch; the NIU_PLUGIN_LOADER=off switch and the validate gate still apply. Regression pins (tests/issue603_posix_loader.rs): the four-cell login/non-login x posix/ordinary matrix asserting loader effect and order via an ORDER sequence (PLE / LE / PL / LR), plus a login-posix loader-exit unwind pin.
advanced-usage.md's startup section and getting-started.md's plugin section now state that POSIX interactive shells load the generated loader — after the profile chain and before $ENV for login shells, before $ENV otherwise — with $ENV in the rc's seat.
Member
Author
CI 红归因(与本 PR 的 #603 改动无关,证据如下)本 PR head 50807f7 的 CI 8 项红中,7 项(build-and-test、各 cross-check / cross-target)死在同一处编译错误:
|
Member
Author
本地门证据(日志在簇 logs/,gates.done 落盘)构建口径:单槽位、JOBS=1、RUSTFLAGS="-C debuginfo=0"、净化 env。
CI 红的归因见上一条评论(rubash e766471a 的 unused_parens 在 -D warnings 下为硬错误,堵所有升过 rubash#1829 的 pin)——rubash 侧修复合入后本分支 pin 需再升一格,CI 的 lib 全量判定届时补齐。本 PR 保持 draft,待主会话处置。 |
# Conflicts: # scripts/release/rubash-pin.json
Integration of PR #617 onto niubash master d7dcce5 (after #615 landed): the pin moves from this branch's 0e9f8d45 to current rubash master 252ff19e (through rubash #1850/#1851/#1855/#1857, including the #1855 stacker target-gate that unbreaks the aarch64-unknown-linux-ohos cross-target check). Root Cargo.lock refresh was performed against the new pin's tree and verified a no-op (both merged branches had already refreshed the lock to identical content; the stacker cfg-gate does not change the lock's dependency representation) -- cargo check --workspace --locked passes in the build slot.
Member
Author
集成证据(#615 合并后接棒,2026-10-27)PR #615 合并(master
PR 现 MERGEABLE,待主会话合并裁定。 |
# Conflicts: # scripts/release/rubash-pin.json
Member
Author
集成证据·二轮(#618 合并后再次接棒,2026-10-27)上一条证据(head
PR 现 MERGEABLE,待主会话合并裁定。 |
caomengxuan666
marked this pull request as ready for review
October 27, 2026 11:08
caomengxuan666
added a commit
that referenced
this pull request
Oct 27, 2026
…t statement (pathmatrix ruling (a)) (#619) * chore(pin): bump rubash pin to ab2372f6 (master through rubash#1855) + refresh root Cargo.lock for stacker Pin refresh on the namespace-bridge exclusion line (pathmatrix final ruling 2026-10-27 item (a)). Rolls up the rubash master wave merged since 8fffc99e; the lock delta is the stacker target gate (rubash#1855): stacker 0.1.25 + psm + object + ar_archive_writer enter the root lock. The lock was bumped BY HAND (pure +42/-0): cargo update -p rubash re-resolves the subtree and rewires windows-sys refs off 0.61.2, which the CI comment on this file's workflow warns drops the patched crate's target-specific windows-sys features (E0432 CreateFileW). Verified with scripts/release/verify-rubash-pin.py against a clean ab2372f6 checkout: matches the pin (v1.4.3). The bridge exclusion itself (rubash PR #1856) lands on rubash master separately and enters this pin with the next bump after it merges; niubash CI compiles rubash master HEAD, so CI behaviour follows the merge without waiting for the release pin lane. * docs(path-contract): namespace bridges stand outside the translation boundary windows-path-contract.md, Shell Namespace Ownership: state the pathmatrix ruling (a) property — wsl and the OpenSSH client family (ssh/scp/sftp) receive every argument byte-for-byte verbatim (no root map, no drive-form rewrite, no /dev/null rewrite), because their argv is interpreted inside another filesystem namespace. Points at the Rubash pins (is_namespace_bridge_program, pathmatrix_bridge_*). * chore(pin): bump rubash pin to a268db28 (master through rubash#1856) — integration refresh onto niubash master d7dcce5; root Cargo.lock unchanged (rubash deps identical across ab2372f6..a268db28) * chore(pin): integration addendum — second merge-up onto niubash master 87a3b70 (after #618); pin unchanged at a268db28 * chore(pin): integration addendum 2 — third merge-up onto niubash master 49b391b (after #617); pin unchanged at a268db28 --------- Co-authored-by: 曹梦轩 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #603
裁定(issue 评论 comment-6438427011)
generated loader 是 niu 自家的产品集成面(启动契约),不是用户文件;posix 模式只管辖用户文件的选择与次序,不管辖产品集成是否加载。posix 交互壳在任何登录态下都不加载 loader 与 #590 已定性的缺陷同类。
本 PR 内容
run_startup_files的 posix 分支在$ENV之前加载 generated loader,镜像普通分支的相对次序——登录 posix = profile 链之后([P3][startup] 登录交互 shell 连 generated loader 一并跳过,且文档未声明此例外 #590 同位)、$ENV之前;非登录 posix = 随其 rc(ENV)面同位、$ENV之前。loader 内exit按启动文件纪律在 $ENV 与登录尾之前展开。posix 模式不源任何 rc,双执行守卫传 None(与登录分支同口径);NIU_PLUGIN_LOADER=off与 validate 门照常生效。门与验证口径见簇 REPORT(随交卷补齐)。不自合。