跳至内容

源文件索引:native

本页由 study-tools/generate-source-index.mjs 根据官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec 生成,共 16 个代码或界面源文件。每个标题对应一个真实路径;用途和拆分原因是面向初学者的结构化解释,自动索引不等于人工精读。

图例

本页所有条目共用以下说明:

  • 自动索引只提供定位线索,复杂行为需要回到源码和测试确认。
  • 条目中的行数、声明、结构线索和静态 import 数字是文件级定位证据,用来约束“为什么这样设计”的解释范围;它们用于定位,不替代人工源码阅读。
  • 源码链接固定到官方提交;如果当前条目与运行版本不同,应先重新生成索引再下结论。

native/landlock-run/packages/entry/src/index.ts

  • 所属层:与操作系统或原生沙箱连接的运行时边界
  • 文件角色:原生沙箱 Launcher API
  • 这个文件有什么用:它找到当前平台的预编译 launcher,生成 --ro/--rw allow-list 参数并探测 full、partial 或 unusable 能力。
  • 为什么这样设计:发布到 native 子包的入口仍要向上层提供统一 launcher API;把预编译产物定位和能力探测放在 package entry,工作区布局变化不会传到调用者。
  • 文件级设计证据:源码顶部注释把它定位为“The JavaScript API over the prebuilt landlock-run launcher: resolve the binary for this host, build its grant argv, and run its functional probe. This module owns the launcher's CLI contract (docs/cli-contract.md) so consumers never parse launcher output or...”;固定提交中扫描到的声明包括 LAUNCHER_BINLAUNCHER_FAILURE_EXITLandlockEnforcementLauncherGrantslauncherPath;本地静态 import 图显示它直接依赖 0 个源文件,并被 11 个源文件直接引用。
  • 直接协作者:native/landlock-run/packages/entry/README.mdnative/landlock-run/scripts/verify-packed-install.mjsnative/landlock-run/test/entry.test.jsnative/landlock-run/test/launcher.test.js
  • 对应测试:native/landlock-run/test/entry.test.jsnative/landlock-run/test/launcher.test.jspackages/examples/agent-spine-demo/tests/multi-project-sandbox.e2e.tspackages/sandbox/sandbox-local/tests/landlock.e2e.tspackages/sandbox/sandbox-local/tests/local.spec.tspackages/sandbox/sandbox-local/tests/packed-install.e2e.ts
  • 测试关联依据:固定提交源码中的本地静态 import 直接引用;测试用例直接导入了这个源文件。
  • 阅读顺序:先读 native/landlock-run/packages/entry/README.md、上游 Manifest 和平台说明,再读当前边界,沿 wrapper 和 native/landlock-run/scripts/verify-packed-install.mjsnative/landlock-run/test/entry.test.jsnative/landlock-run/test/launcher.test.js 确认平台影响,最后对照原生或兼容性测试。
  • 代码证据:固定提交归档实际读取结果:约 127 行;扫描到的声明包括 LAUNCHER_BINLAUNCHER_FAILURE_EXITLandlockEnforcementLauncherGrantslauncherPathgrantArgsprobe;源码顶部原注释(英文,仅作回查线索):The JavaScript API over the prebuilt landlock-run launcher: resolve the binary for this host, build its grant argv, and run its functional probe. This module owns the launcher's CLI contract (docs/cli-contract.md) so consumers never parse launcher output or...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/packages/entry/src/main.c

  • 所属层:与操作系统或原生沙箱连接的运行时边界
  • 文件角色:Landlock 沙箱 Launcher
  • 这个文件有什么用:它解析 probe、只读/读写 allow-list 和命令分隔符,创建 Landlock 规则并在限制当前进程后 exec 子命令;无法强制时 fail closed。
  • 为什么这样设计:原生发布包必须保留与源码 launcher 一致的 fail-closed 行为;独立的 C 入口让构建产物可以单独编译、探测和验证,不把平台规则隐藏在 JavaScript wrapper 中。
  • 文件级设计证据:源码顶部注释把它定位为“landlock-run: self-restrict-then-exec Landlock launcher. The Landlock rung of a consuming sandbox seam, for Linux hosts where bwrap is unusable (not installed, unprivileged user namespaces disabled, or an LSM profile that denies mount — Landlock is an indep...”;本地静态 import 图显示它直接依赖 0 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/packages/entry/README.md
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/packages/entry/README.md、上游 Manifest 和平台说明,再读当前边界,沿 wrapper 和所在包的入口或服务确认平台影响,最后对照原生或兼容性测试。
  • 代码证据:固定提交归档实际读取结果:约 298 行;源码顶部原注释(英文,仅作回查线索):landlock-run: self-restrict-then-exec Landlock launcher. The Landlock rung of a consuming sandbox seam, for Linux hosts where bwrap is unusable (not installed, unprivileged user namespaces disabled, or an LSM profile that denies mount — Landlock is an indep...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/assemble-prebuilds.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Assemble downloaded release artifacts into the platform packages and verify the result. The Release workflow's build legs upload one prebuild-<package> artifact per platform package (its bin/ payload); this script copies each into packages/<package>/bin/ an...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Assemble downloaded release artifacts into the platform packages and verify the result. The Release workflow's build legs upload one prebuild-<package> artifact per platform package (its bin/ payload); this script copies each into packages/<package>/bin/ an...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Assemble downloaded release artifacts into the platform packages and verify the result. The Release workflow's build legs upload one prebuild-<package> artifact per platform package (its bin/ payload); this script copies each into packages/<package>/bin/ an...”;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/scripts/repo.mjs
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和 native/landlock-run/scripts/repo.mjs 确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 51 行;源码顶部原注释(英文,仅作回查线索):Assemble downloaded release artifacts into the platform packages and verify the result. The Release workflow's build legs upload one prebuild-<package> artifact per platform package (its bin/ payload); this script copies each into packages/<package>/bin/ an...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/build.ts

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Build every native tool this host can build, into its per-platform package. Targets are derived from the checked-in matrix: each packages/<name>/prebuilds.json whose platform matches this host names the binaries to produce; the TOOLS table below maps each t...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Build every native tool this host can build, into its per-platform package. Targets are derived from the checked-in matrix: each packages/<name>/prebuilds.json whose platform matches this host names the binaries to produce; the TOOLS table below maps each t...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Build every native tool this host can build, into its per-platform package. Targets are derived from the checked-in matrix: each packages/<name>/prebuilds.json whose platform matches this host names the binaries to produce; the TOOLS table below maps each t...”;本地静态 import 图显示它直接依赖 0 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.md
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和相关类型、协议或实现确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 86 行;源码顶部原注释(英文,仅作回查线索):Build every native tool this host can build, into its per-platform package. Targets are derived from the checked-in matrix: each packages/<name>/prebuilds.json whose platform matches this host names the binaries to produce; the TOOLS table below maps each t...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/bump-release.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Bump the launcher workspace root and packages to one version, refresh the repository lockfile, and verify. Usage: pnpm release:bump <major|minor|patch|x.y.z>.”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Bump the launcher workspace root and packages to one version, refresh the repository lockfile, and verify. Usage: pnpm release:bump <major|minor|patch|x.y.z>.”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Bump the launcher workspace root and packages to one version, refresh the repository lockfile, and verify. Usage: pnpm release:bump <major|minor|patch|x.y.z>.”;固定提交中扫描到的声明包括 writeJsonrunpackageFilesparseVersionnextVersion;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/scripts/repo.mjs
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和 native/landlock-run/scripts/repo.mjs 确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 91 行;扫描到的声明包括 writeJsonrunpackageFilesparseVersionnextVersioncurrentPublishedVersion;源码顶部原注释(英文,仅作回查线索):Bump the launcher workspace root and packages to one version, refresh the repository lockfile, and verify. Usage: pnpm release:bump <major|minor|patch|x.y.z>.。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/commit-release.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Bump, stage, and commit a release in one command: pnpm release:commit <major|minor|patch|x.y.z>. The namespaced tag stays manual — create it from the merged release commit.”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Bump, stage, and commit a release in one command: pnpm release:commit <major|minor|patch|x.y.z>. The namespaced tag stays manual — create it from the merged release commit.”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Bump, stage, and commit a release in one command: pnpm release:commit <major|minor|patch|x.y.z>. The namespaced tag stays manual — create it from the merged release commit.”;固定提交中扫描到的声明包括 run;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/scripts/repo.mjs
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和 native/landlock-run/scripts/repo.mjs 确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 42 行;扫描到的声明包括 run;源码顶部原注释(英文,仅作回查线索):Bump, stage, and commit a release in one command: pnpm release:commit <major|minor|patch|x.y.z>. The namespaced tag stays manual — create it from the merged release commit.。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/github-matrix.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Derive the GitHub Actions matrices from the checked-in package matrix (packages/<name>/prebuilds.json). Single source: adding a platform package extends CI and Release without editing a workflow. node scripts/github-matrix.mjs ci → one leg per distinct plat...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Derive the GitHub Actions matrices from the checked-in package matrix (packages/<name>/prebuilds.json). Single source: adding a platform package extends CI and Release without editing a workflow. node scripts/github-matrix.mjs ci → one leg per distinct plat...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Derive the GitHub Actions matrices from the checked-in package matrix (packages/<name>/prebuilds.json). Single source: adding a platform package extends CI and Release without editing a workflow. node scripts/github-matrix.mjs ci → one leg per distinct plat...”;固定提交中扫描到的声明包括 runnerForplatformManifestsciMatrixreleasePrebuildMatrix;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/scripts/repo.mjs
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和 native/landlock-run/scripts/repo.mjs 确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 66 行;扫描到的声明包括 runnerForplatformManifestsciMatrixreleasePrebuildMatrix;源码顶部原注释(英文,仅作回查线索):Derive the GitHub Actions matrices from the checked-in package matrix (packages/<name>/prebuilds.json). Single source: adding a platform package extends CI and Release without editing a workflow. node scripts/github-matrix.mjs ci → one leg per distinct plat...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/pack-release.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Pack every published package into release tarballs, in publish order (platform packages first, then the entries that optionally depend on them), and write publish-order.txt next to them. pnpm pack produces the EXACT bytes pnpm publish would upload and runs ...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Pack every published package into release tarballs, in publish order (platform packages first, then the entries that optionally depend on them), and write publish-order.txt next to them. pnpm pack produces the EXACT bytes pnpm publish would upload and runs ...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Pack every published package into release tarballs, in publish order (platform packages first, then the entries that optionally depend on them), and write publish-order.txt next to them. pnpm pack produces the EXACT bytes pnpm publish would upload and runs ...”;固定提交中扫描到的声明包括 hostPlatformDirsruntarballName;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/scripts/repo.mjs
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和 native/landlock-run/scripts/repo.mjs 确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 76 行;扫描到的声明包括 hostPlatformDirsruntarballName;源码顶部原注释(英文,仅作回查线索):Pack every published package into release tarballs, in publish order (platform packages first, then the entries that optionally depend on them), and write publish-order.txt next to them. pnpm pack produces the EXACT bytes pnpm publish would upload and runs ...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/publish-release.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Publish the packed launcher family from the tarballs pack-release.mjs produced, in publish-order.txt order. What goes out is decided per package against the registry, never from the order file alone: a version the registry lacks is published, a version whos...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Publish the packed launcher family from the tarballs pack-release.mjs produced, in publish-order.txt order. What goes out is decided per package against the registry, never from the order file alone: a version the registry lacks is published, a version whos...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Publish the packed launcher family from the tarballs pack-release.mjs produced, in publish-order.txt order. What goes out is decided per package against the registry, never from the order file alone: a version the registry lacks is published, a version whos...”;固定提交中扫描到的声明包括 isTransientFailureintegrityOfpackedIdentityregistryStatepublishTarball;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/scripts/repo.mjs
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和 native/landlock-run/scripts/repo.mjs 确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 165 行;扫描到的声明包括 isTransientFailureintegrityOfpackedIdentityregistryStatepublishTarball;源码顶部原注释(英文,仅作回查线索):Publish the packed launcher family from the tarballs pack-release.mjs produced, in publish-order.txt order. What goes out is decided per package against the registry, never from the order file alone: a version the registry lacks is published, a version whos...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/repo.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Shared helpers for the repo scripts: package discovery, the checked-in prebuild matrix, and binary verification. The package matrix is explicit metadata — packages/<name>/prebuilds.json marks a platform package and declares its binaries; everything else und...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Shared helpers for the repo scripts: package discovery, the checked-in prebuild matrix, and binary verification. The package matrix is explicit metadata — packages/<name>/prebuilds.json marks a platform package and declares its binaries; everything else und...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Shared helpers for the repo scripts: package discovery, the checked-in prebuild matrix, and binary verification. The package matrix is explicit metadata — packages/<name>/prebuilds.json marks a platform package and declares its binaries; everything else und...”;固定提交中扫描到的声明包括 rootreadJsonplatformDirsentryDirspackageDirs;本地静态 import 图显示它直接依赖 0 个源文件,并被 9 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/scripts/assemble-prebuilds.mjsnative/landlock-run/scripts/bump-release.mjsnative/landlock-run/scripts/commit-release.mjs
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和相关类型、协议或实现确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 88 行;扫描到的声明包括 rootreadJsonplatformDirsentryDirspackageDirsverifyPlatformBinaries;源码顶部原注释(英文,仅作回查线索):Shared helpers for the repo scripts: package discovery, the checked-in prebuild matrix, and binary verification. The package matrix is explicit metadata — packages/<name>/prebuilds.json marks a platform package and declares its binaries; everything else und...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/verify-entry-lib.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Prepack gate for entry packages: refuse to pack a tarball whose built lib/ is missing. Entry files lists use globs, and a glob matching nothing packs a silently JS-less tarball instead of failing — this gate turns that into a loud refusal on a checkout that...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Prepack gate for entry packages: refuse to pack a tarball whose built lib/ is missing. Entry files lists use globs, and a glob matching nothing packs a silently JS-less tarball instead of failing — this gate turns that into a loud refusal on a checkout that...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Prepack gate for entry packages: refuse to pack a tarball whose built lib/ is missing. Entry files lists use globs, and a glob matching nothing packs a silently JS-less tarball instead of failing — this gate turns that into a loud refusal on a checkout that...”;本地静态 import 图显示它直接依赖 0 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.md
  • 对应测试:native/landlock-run/test/entry.test.js
  • 测试关联依据:按同包文件名保守推断,未确认直接 import;这不是完整覆盖证明。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和相关类型、协议或实现确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 25 行;源码顶部原注释(英文,仅作回查线索):Prepack gate for entry packages: refuse to pack a tarball whose built lib/ is missing. Entry files lists use globs, and a glob matching nothing packs a silently JS-less tarball instead of failing — this gate turns that into a loud refusal on a checkout that...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/verify-launcher-binary.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Prepack gate for platform packages: refuse to pack a tarball whose declared binaries are missing or built for the wrong architecture. Without it, pnpm pack on a checkout that never ran pnpm run build:native would ship an EMPTY platform package — the binary'...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Prepack gate for platform packages: refuse to pack a tarball whose declared binaries are missing or built for the wrong architecture. Without it, pnpm pack on a checkout that never ran pnpm run build:native would ship an EMPTY platform package — the binary'...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Prepack gate for platform packages: refuse to pack a tarball whose declared binaries are missing or built for the wrong architecture. Without it, pnpm pack on a checkout that never ran pnpm run build:native would ship an EMPTY platform package — the binary'...”;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/scripts/repo.mjs
  • 对应测试:native/landlock-run/test/launcher.test.js
  • 测试关联依据:按同包文件名保守推断,未确认直接 import;这不是完整覆盖证明。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和 native/landlock-run/scripts/repo.mjs 确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 30 行;源码顶部原注释(英文,仅作回查线索):Prepack gate for platform packages: refuse to pack a tarball whose declared binaries are missing or built for the wrong architecture. Without it, pnpm pack on a checkout that never ran pnpm run build:native would ship an EMPTY platform package — the binary'...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/verify-packed-install.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Publish-path rehearsal without publishing: verify the packed tarballs are exactly what a consumer install needs. pnpm pack already produced the bytes pnpm publish would upload; this script checks the payload (coverage, concrete dependency versions, NO lifec...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Publish-path rehearsal without publishing: verify the packed tarballs are exactly what a consumer install needs. pnpm pack already produced the bytes pnpm publish would upload; this script checks the payload (coverage, concrete dependency versions, NO lifec...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Publish-path rehearsal without publishing: verify the packed tarballs are exactly what a consumer install needs. pnpm pack already produced the bytes pnpm publish would upload; this script checks the payload (coverage, concrete dependency versions, NO lifec...”;固定提交中扫描到的声明包括 tarballNametarballPathrunrunCapturereadPackedManifest;本地静态 import 图显示它直接依赖 2 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/packages/entry/src/index.tsnative/landlock-run/scripts/repo.mjs
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和 native/landlock-run/packages/entry/src/index.tsnative/landlock-run/scripts/repo.mjs 确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 223 行;扫描到的声明包括 tarballNametarballPathrunrunCapturereadPackedManifestverifyPackedManifestsha256packageInstallDir;源码顶部原注释(英文,仅作回查线索):Publish-path rehearsal without publishing: verify the packed tarballs are exactly what a consumer install needs. pnpm pack already produced the bytes pnpm publish would upload; this script checks the payload (coverage, concrete dependency versions, NO lifec...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/scripts/verify-release.mjs

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:仓库自动化脚本
  • 这个文件有什么用:它执行原生边界、运行驱动相关的构建、检查、打包、发布或开发辅助步骤,把容易重复出错的操作固定成可复用命令;固定提交的顶部注释把它定位为“Release verification. Always: every published package carries one shared version, and — when running from a tag or publishing — the landlock-run-vX.Y.Z tag matches it. With --prebuilds: every platform package's declared binaries exist with the right ELF arc...”,具体命令和输入输出仍应回到源码确认。
  • 为什么这样设计:固定提交的文件顶部注释把它定位为“Release verification. Always: every published package carries one shared version, and — when running from a tag or publishing — the landlock-run-vX.Y.Z tag matches it. With --prebuilds: every platform package's declared binaries exist with the right ELF arc...”;把这项职责单独放置,可以让边界、输入和失败处理在一个地方被阅读和测试。
  • 文件级设计证据:源码顶部注释把它定位为“Release verification. Always: every published package carries one shared version, and — when running from a tag or publishing — the landlock-run-vX.Y.Z tag matches it. With --prebuilds: every platform package's declared binaries exist with the right ELF arc...”;固定提交中扫描到的声明包括 verifyVersionsverifyPrebuilds;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/scripts/repo.mjs
  • 对应测试:没有确认到直接测试;公共入口可能仍有间接覆盖。
  • 测试关联依据:固定提交中没有找到直接或传递的本地静态 import,也没有找到明显的同包同名测试;公共入口可能仍有间接覆盖。
  • 阅读顺序:先读 native/landlock-run/README.md 和贡献/发布配置,再读当前脚本,沿它调用的配置、命令和 native/landlock-run/scripts/repo.mjs 确认输入输出,最后对照同目录的门禁或发布测试。
  • 代码证据:固定提交归档实际读取结果:约 54 行;扫描到的声明包括 verifyVersionsverifyPrebuilds;源码顶部原注释(英文,仅作回查线索):Release verification. Always: every published package carries one shared version, and — when running from a tag or publishing — the landlock-run-vX.Y.Z tag matches it. With --prebuilds: every platform package's declared binaries exist with the right ELF arc...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/test/entry.test.js

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:测试用例
  • 这个文件有什么用:它围绕“entry”写出可重复运行的断言,覆盖成功、失败或边界行为;读者可以从测试输入、触发动作和断言反推实现契约。
  • 为什么这样设计:把测试文件 entry 写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
  • 文件级设计证据:源码顶部注释把它定位为“Keyless entry-package tests — run on every host, no kernel or binary required. Cover the JavaScript API's pure surface: grant-argv construction, the resolution contract (platform package → fallback), and probe verdicts over fake launchers. Requires built li...”;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/packages/entry/src/index.ts
  • 对应测试:本文件本身就是测试用例。
  • 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
  • 阅读顺序:先看它直接导入的被测实现 native/landlock-run/packages/entry/src/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。
  • 代码证据:固定提交归档实际读取结果:约 76 行;源码顶部原注释(英文,仅作回查线索):Keyless entry-package tests — run on every host, no kernel or binary required. Cover the JavaScript API's pure surface: grant-argv construction, the resolution contract (platform package → fallback), and probe verdicts over fake launchers. Requires built li...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec

native/landlock-run/test/launcher.test.js

  • 所属层:原生包的构建、发布和验证自动化
  • 文件角色:测试用例
  • 这个文件有什么用:它围绕“launcher”写出可重复运行的断言,覆盖成功、失败或边界行为;读者可以从测试输入、触发动作和断言反推实现契约。
  • 为什么这样设计:把测试文件 launcher 写成独立测试用例,读者可以从输入、触发动作和断言反推实现的不变量;不同回归问题也不会互相遮蔽。
  • 文件级设计证据:源码顶部注释把它定位为“Behavioral tests against the REAL launcher binary on a real kernel: the CLI contract (usage errors, exit codes, argv passthrough) and the confinement world-proofs (denied writes stay off disk, grants land). Preconditions and their skip semantics: - Non-Linu...”;本地静态 import 图显示它直接依赖 1 个源文件,并被 0 个源文件直接引用。
  • 直接协作者:native/landlock-run/README.mdnative/landlock-run/packages/entry/src/index.ts
  • 对应测试:本文件本身就是测试用例。
  • 测试关联依据:本文件本身就是测试用例,不把同目录的其他测试冒充成它的“对应测试”。
  • 阅读顺序:先看它直接导入的被测实现 native/landlock-run/packages/entry/src/index.ts,再读本文件的测试主题、输入和断言;最后对照测试支持和失败输出。
  • 代码证据:固定提交归档实际读取结果:约 137 行;源码顶部原注释(英文,仅作回查线索):Behavioral tests against the REAL launcher binary on a real kernel: the CLI contract (usage errors, exit codes, argv passthrough) and the confinement world-proofs (denied writes stay off disk, grants land). Preconditions and their skip semantics: - Non-Linu...。
  • 固定版本:源码链接固定到官方提交 aa6c361a972c8369148dea7380bb5c21c24e07ec