Repository navigation
ci(tui): run the pi-sandbox tests in TUI CI, with enforcement required - #59
Merged
Merged
Conversation
Add pi-sandbox to the baseline manifest (105 passed, 3 skipped), install bubblewrap in the test job, lift the AppArmor block on unprivileged user namespaces of ubuntu-24.04, and set SANDBOX_E2E_REQUIRE_ENFORCEMENT=1 so a runner without Landlock or a working bwrap fails instead of passing empty. Co-authored-by: z123385708 <[email protected]>
cursor
Bot
force-pushed
the
ci/tui-sandbox-gate
branch
from
October 30, 2026 18:17
386f792 to
cc2817c
Compare
Co-authored-by: z123385708 <[email protected]>
This was referenced Oct 31, 2026
This was referenced Oct 31, 2026
Merged
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.
结论
pi-sandbox现在在TUI CI里跑(nextest),并且 CI 要求内核真的执行沙箱:runner 没有 Landlock 或没有可用的bwrap时,job 失败,不会空转通过。基准是 PR #58(test/tui-landlock-verification),所以 diff 只有这一轮的改动。没有改产品代码,没有改 #58 的分支,没有合入任何东西。改了什么
scripts/tui_baseline.toml:新 suitepi-sandbox(--lib加四个集成文件),reference_passed = 105,min_passed = 100。.github/workflows/tui-ci.yml(testjob):bubblewrap;sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0;Test suites一步设SANDBOX_E2E_REQUIRE_ENFORCEMENT=1。scripts/tests/test_tui_baseline.py:一个测试守住上面三件事(清单里有pi-sandbox,变量设了,装bubblewrap与 sysctl 在测试之前)。docs/baselines/tui.md(11 个 suite,8,595 通过 / 25 跳过);计划与执行记录 §10.28(r25)。0.9 的复选框没有勾(macOS 与 Windows 没做)。为什么要这个 workaround
探针(一次性 job,
ubuntu-24.04,已删除)显示:内核7.0.0-1017-azure,LSM 里有landlock,Landlock ABI 8,没有bwrap;装了bwrap以后还是不能用,因为 Ubuntu 24.04 用 AppArmor(kernel.apparmor_restrict_unprivileged_userns=1)挡了非特权用户命名空间:bwrap: setting up uid map: Permission denied。把 sysctl 设为 0 是最小的办法:只放开这一项,只影响这台一次性的 runner;第二次探针确认bwrap随后可用。变量放在 workflow 里,不放清单的
[test.env]:清单在本地也读,放进去会让没有bwrap的开发机、macOS 与 Windows 的运行失败。证据(CI 运行)
bwrap可用TUI CI41099099458(cc2817c,要求满足)pi-sandbox105 通过 / 0 失败 / 3 跳过,合计 8,596 / 0 / 25TUI CI41102790276(一次性提交,去掉 sysctl 那一行)pi-sandbox98 通过 / 7 失败:enforcement required (SANDBOX_E2E_REQUIRE_ENFORCEMENT) but bwrap unavailable;其余 10 个 suite 全过。一次性提交已从分支拿掉哪个失败来自哪里
TUI CI41097019349(02e1f69)在pi-pager的app::app_view::tests::needs_animation_gates_prompt_history_tick_delivery失败。这一轮没有改pi-pager,同一个基准之上的两次运行里该 suite 5,651 个用例全过。没有查原因,没有修;由 test(tui): verify the Landlock layer of pi-sandbox (plan 0.9) #58 的负责人处理。没验证的
pi-sandbox的 job);0.9 保持未勾。ruff check与ruff format --check通过。pi-file-utils在 CI 里是 217,清单的reference_passed是 216;与这一轮无关,没有改。