Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ jobs:
-Db_lundef=false
# The chain executable already depends on libish + libish_emu; fakefs
# is the only additional archive consumed by the outer Meson build.
meson compile -C build-ci-ish dirty-page-chain-test fakefs
meson compile -C build-ci-ish arm64-neon-reverse-test dirty-page-chain-test fakefs
meson test -C build-ci-ish --print-errorlogs --repeat 5 \
arm64-neon-reverse \
dirty-page-chain
meson setup build-ci \
-Dish_src="$PWD/third_party/ish" \
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,23 @@ Chinese is the primary changelog and this file is its maintained English mirror.
explicitly unapproved for distribution without changing the XCFramework
Release's RootFS exclusion policy.

## v0.4.0-abi.12 (planned Stage1 maintenance prerelease)
## v0.4.0-abi.13 (planned Stage1 maintenance prerelease)

This is a compatibility maintenance release after `v0.4.0-abi.12`. It remains
a prerelease and is **not stable v0.4.0**.

- `third_party/ish` advances to `b61c2147` and adds the AArch64 AdvSIMD vector
`REV16` instruction. The
`.8B` and `.16B` forms swap the two bytes in every 16-bit element, and the
64-bit form also clears the destination vector's upper 64 bits.
- Rust/TLS network paths no longer terminate the guest with `SIGILL` when they
execute `REV16 Vd.16B, Vn.16B`. Focused 64-bit and 128-bit regressions cover
the instruction family that failed on a physical device, with an explicit CI
gate.
- The public C ABI remains version 1, wire protocol remains v4, and Swift API is
unchanged. RootFS remains outside the Release.

## v0.4.0-abi.12 (published Stage1 maintenance prerelease)

This is a compatibility maintenance release after `v0.4.0-abi.11`. It remains
a prerelease and is **not stable v0.4.0**.
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@
`fs.tar.gz`,环境差异仍保留在外部证据中。CI 不上传制品,候选仍明确标记为未获分发
批准,不改变 XCFramework Release 的 RootFS 排除策略。

## v0.4.0-abi.12(计划中的 Stage1 维护预发布)
## v0.4.0-abi.13(计划中的 Stage1 维护预发布)

这是 `v0.4.0-abi.12` 之后的兼容性维护版本,仍是 prerelease,**不是稳定
v0.4.0**。

- `third_party/ish` 更新到 `b61c2147`,补齐 AArch64 AdvSIMD `REV16` 向量指令。`.8B` 与 `.16B` 形式均按
架构语义交换每个 16 位元素内的两个字节;64 位形式同时清零目标向量高 64 位。
- 修复 Rust/TLS 网络路径执行 `REV16 Vd.16B, Vn.16B` 时 guest 以 `SIGILL` 退出的问题,
并为导致真机失败的指令族增加 64/128 位定向回归测试及显式 CI 门禁。
- 公开 C ABI 仍为 1,wire protocol 仍为 v4,Swift API 不变;RootFS 不进入 Release。

## v0.4.0-abi.12(已发布的 Stage1 维护预发布)

这是 `v0.4.0-abi.11` 之后的兼容性维护版本,仍是 prerelease,**不是稳定
v0.4.0**。
Expand Down
27 changes: 14 additions & 13 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ and simulator slices are arm64.

## Current phase: native ABI transition

The default branch has published `v0.4.0-abi.11` and is preparing the compatible
maintenance prerelease `v0.4.0-abi.12`. Both belong to the Stage1 **native ABI
The default branch has published `v0.4.0-abi.12` and is preparing the compatible
maintenance prerelease `v0.4.0-abi.13`. Both belong to the Stage1 **native ABI
transition**. Neither is stable `v0.4.0` or the complete v0.4 Swift API. Keep
these four version surfaces distinct:

| Surface | Current `v0.4.0-abi.11` | Planned `v0.4.0-abi.12` |
| Surface | Current `v0.4.0-abi.12` | Planned `v0.4.0-abi.13` |
| --- | --- | --- |
| Public C ABI | `ISH_EMBED_ABI_VERSION == 1`; forced-teardown and destructive-wait/reap lifetime fixes are public | Still ABI 1; only the internal Apple rwlock and deferred supervisor reap change |
| Public C ABI | `ISH_EMBED_ABI_VERSION == 1`; forced teardown, destructive wait/reap, and Apple lock fixes are public | Still ABI 1; only internal AArch64 AdvSIMD `REV16` emulation is added |
| Internal wire protocol | exact-match v4 between host and embedded supervisor | still v4; this is not the public C ABI version |
| `Package.swift` | pins the public `v0.4.0-abi.11` URL/checksum | the release transaction creates a manifest-only release commit pinned to the maintenance binary |
| `Package.swift` | pins the public `v0.4.0-abi.12` URL/checksum | the release transaction creates a manifest-only release commit pinned to the maintenance binary |
| Swift source | remains v0.3.3-ABI compatible and includes typed rename plus per-call stdin timeouts | unchanged |

Stage1 native code adds session retain/release, a joinable kernel thread,
Expand Down Expand Up @@ -90,15 +90,15 @@ gives those narrow differences independent PRs, CI, and an exact gitlink, making
PocketRoot builds and releases reproducible. We do not directly rewrite somebody
else's local upstream repository; generally useful fixes can still be contributed
to [iSH upstream](https://github.com/ish-app/ish), while the fork carries project
gates until upstream accepts and releases them. The current `v0.4.0-abi.12`
gates until upstream accepts and releases them. The current `v0.4.0-abi.13`
source change includes neither RootFS content nor any prebuilt XCFramework/guest
binary; binaries may be produced and published only by a later release
transaction after its gates pass.

## Installation status

`v0.4.0-abi.11` is public and [`Package.swift`](Package.swift) currently pins it.
Until `v0.4.0-abi.12` is published, the manifest keeps pointing at that verified
`v0.4.0-abi.12` is public and [`Package.swift`](Package.swift) currently pins it.
Until `v0.4.0-abi.13` is published, the manifest keeps pointing at that verified
asset instead of advertising a future 404 URL. Use Xcode's
**File → Add Package Dependencies…** with:

Expand All @@ -110,11 +110,12 @@ Select a version whose tag, `libIshKernel.xcframework.zip`, Corresponding Source
and manifest URL/checksum all match. Consumer projects do not need Meson, Zig,
or LLVM.

`v0.4.0-abi.11` provides guest-atomic rename without a shell, bounded stdin
deadlines, per-call write/close timeouts, forced guest-task teardown, and delays
destructive waits until the full thread group is quiescent. `v0.4.0-abi.12`
further prevents writer starvation in the Apple-platform rwlock and lets the
supervisor boundedly wait for destructive reap after observing a zombie. It does not
`v0.4.0-abi.12` provides guest-atomic rename without a shell, bounded stdin
deadlines, per-call write/close timeouts, forced guest-task teardown,
thread-group quiescence boundaries, and an Apple writer-preferring lock.
`v0.4.0-abi.13` adds the AArch64 AdvSIMD vector `REV16` instruction used by
Rust/TLS network paths so an otherwise valid guest no longer exits with
`SIGILL`. It does not
implement a native Agent Loop or
install Codex CLI in the app.
Node.js/npm remain optional choices of the RootFS/guest package-management flow,
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ RootFS 安装、产品级命令策略、Swift Concurrency 隔离和界面。项

## 当前阶段:Native ABI 过渡

当前默认分支已发布 `v0.4.0-abi.11`,正在准备兼容性维护预发布
`v0.4.0-abi.12`。它们都属于 **Stage1 native ABI 过渡**,不是稳定 `v0.4.0`,
当前默认分支已发布 `v0.4.0-abi.12`,正在准备兼容性维护预发布
`v0.4.0-abi.13`。它们都属于 **Stage1 native ABI 过渡**,不是稳定 `v0.4.0`,
也不是完整 v0.4 Swift API。请同时区分下面四个版本面:

| 版本面 | 当前 `v0.4.0-abi.11` | 计划中的 `v0.4.0-abi.12` |
| 版本面 | 当前 `v0.4.0-abi.12` | 计划中的 `v0.4.0-abi.13` |
| --- | --- | --- |
| 公开 C ABI | `ISH_EMBED_ABI_VERSION == 1`;强制 teardowndestructive wait/reap 生命周期修复已发布 | 仍为 ABI 1;只收紧 Apple 内部读写锁与 supervisor 延迟 reap |
| 公开 C ABI | `ISH_EMBED_ABI_VERSION == 1`;强制 teardowndestructive wait/reap 和 Apple 锁修复已发布 | 仍为 ABI 1;只补齐内部 AArch64 AdvSIMD `REV16` 模拟 |
| 内部 wire protocol | host 与内嵌 supervisor 精确匹配 v4 | 仍为 v4;它不是公开 C ABI 版本 |
| `Package.swift` | 固定已公开的 `v0.4.0-abi.11` URL/checksum | 发布事务生成只改 manifest 的 release commit,固定到维护二进制 |
| `Package.swift` | 固定已公开的 `v0.4.0-abi.12` URL/checksum | 发布事务生成只改 manifest 的 release commit,固定到维护二进制 |
| Swift 源 | 保持 v0.3.3 ABI 兼容,已提供类型化 rename 与单次 stdin timeout | 不变 |

Stage1 的 native runtime 已加入 session retain/release、可等待 kernel 线程、soft-halt、
Expand Down Expand Up @@ -69,13 +69,13 @@ JIT 脏页一致性必须修改模拟器核心,无法只在 outer package 或
窄差异拥有独立 PR、CI 和精确 gitlink,PocketRoot 的构建与发布也因此可复现。我们不会在
本地直接改写别人维护的上游仓库;适合通用化的修复仍可回馈
[iSH upstream](https://github.com/ish-app/ish),但在上游接受并发布前由 fork 承担项目门禁。
当前 `v0.4.0-abi.12` 源码变更不纳入 RootFS,也不提交任何预构建
当前 `v0.4.0-abi.13` 源码变更不纳入 RootFS,也不提交任何预构建
XCFramework/guest binary;二进制只能在后续发布事务通过后生成和发布。

## 安装状态

`v0.4.0-abi.11` 已公开且当前 [`Package.swift`](Package.swift) 固定到它。
`v0.4.0-abi.12` 发布前,manifest 继续指向这个已验证的资产,不会提前引用 404 URL。
`v0.4.0-abi.12` 已公开且当前 [`Package.swift`](Package.swift) 固定到它。
`v0.4.0-abi.13` 发布前,manifest 继续指向这个已验证的资产,不会提前引用 404 URL。
在 Xcode 的 **File → Add Package Dependencies…** 中使用:

```text
Expand All @@ -85,10 +85,10 @@ https://github.com/jacklv-coder/ish-arm64-pkg
请选择明确包含 `libIshKernel.xcframework.zip`、对应源码归档,并且 manifest URL/checksum
与同一标签匹配的版本。业务工程不需要安装 Meson、Zig 或 LLVM。

`v0.4.0-abi.11` 已提供无 shell 的 guest 原子重命名、有界 stdin deadline、单次
write/close timeout、强制 guest task teardown,并让破坏性 wait 在完整 thread group
静止后才发布进程退出。`v0.4.0-abi.12` 进一步避免 Apple 平台读写锁的写者饥饿,并允许
supervisor 在已观察 zombie 后有界等待 destructive reap 真正可用。它不实现原生
`v0.4.0-abi.12` 已提供无 shell 的 guest 原子重命名、有界 stdin deadline、单次
write/close timeout、强制 guest task teardown、thread-group 静止边界以及 Apple 写者
优先锁。`v0.4.0-abi.13` 补齐 Rust/TLS 网络路径会使用的 AArch64 AdvSIMD `REV16` 向量
指令,避免 guest 因该指令未实现而 `SIGILL` 退出。它不实现原生
Agent Loop,也不会
在 App 内安装 Codex CLI。Node.js/npm 如有需要仍由
RootFS/guest 包管理流程选择,不属于 runtime 的强制依赖。
Expand Down
10 changes: 5 additions & 5 deletions docs/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ primary language; the English mirrors support collaboration and release review.
authoritative. Stage1 uses exact-match v4 between host and embedded supervisor.
3. **Swift source and manifest binary**: Stage1 Swift remains v0.3.3-ABI
compatible and does not call retain/release. The manifest currently pins the
public `v0.4.0-abi.11`; the release transaction moves it to the
`v0.4.0-abi.12` maintenance binary only after those assets are public and
public `v0.4.0-abi.12`; the release transaction moves it to the
`v0.4.0-abi.13` maintenance binary only after those assets are public and
verified.
4. **RootFS and PocketRoot**: RootFS is an independent asset and PocketRoot is
the product layer. Neither is completed automatically by a runtime PR or Release.

`v0.4.0-abi.11` and its `v0.4.0-abi.12` maintenance release are native-first
`v0.4.0-abi.12` and its `v0.4.0-abi.13` maintenance release are native-first
transition prereleases, not stable v0.4. The complete Swift lifecycle, typed
statuses, Terminal callback queue, and VT parser changes belong to Stage2.

Expand All @@ -44,7 +44,7 @@ statuses, Terminal callback queue, and VT parser changes belong to Stage2.
| [Architecture and lifecycle](architecture.en.md) | How is the runtime implemented? How do ABI 1 and wire v4 differ? |
| [Testing and acceptance](testing.en.md) | What do native, sanitizer, Swift/iOS 18, documentation, and supply-chain gates prove? |
| [Troubleshooting](troubleshooting.en.md) | Where should boot, link, protocol, output, shutdown, or release diagnosis start? |
| [Release transaction](releasing.en.md) | Why does the merged maintenance source still pin `v0.4.0-abi.11`, and when does it become `v0.4.0-abi.12`? |
| [Release transaction](releasing.en.md) | Why does the merged maintenance source still pin `v0.4.0-abi.12`, and when does it become `v0.4.0-abi.13`? |
| [Changelog](../CHANGELOG.en.md) | What is Stage1's scope and compatibility boundary? |

## Architecture on one page
Expand Down Expand Up @@ -99,7 +99,7 @@ fixes can still go upstream. See the
A direct-chain or RET target returns to the dispatcher only when it intersects
pending dirty code pages; data-only writes may keep chaining.
- RootFS is outside the package/Release and must not enter Corresponding Source.
- The current `v0.4.0-abi.12` source change carries no RootFS or prebuilt binary;
- The current `v0.4.0-abi.13` source change carries no RootFS or prebuilt binary;
a later release transaction must produce the XCFramework.

## Authoritative sources
Expand Down
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
2. **内部 wire protocol**:权威定义为 [`protocol/proto.h`](../protocol/proto.h),
Stage1 是 host 与内嵌 supervisor 精确匹配的 v4。
3. **Swift 源与 manifest binary**:Stage1 Swift 保持 v0.3.3 ABI 兼容且不调用
retain/release。manifest 当前固定已公开的 `v0.4.0-abi.11`;只有
`v0.4.0-abi.12` 资产公开并验证后,发布事务才将其切到维护 binary。
retain/release。manifest 当前固定已公开的 `v0.4.0-abi.12`;只有
`v0.4.0-abi.13` 资产公开并验证后,发布事务才将其切到维护 binary。
4. **RootFS 与 PocketRoot**:RootFS 是独立资产;PocketRoot 是上层产品。两者均不因
runtime PR 或 Release 自动完成。

`v0.4.0-abi.11` 与维护版本 `v0.4.0-abi.12` 都是 native-first 过渡预发布,不是稳定
`v0.4.0-abi.12` 与维护版本 `v0.4.0-abi.13` 都是 native-first 过渡预发布,不是稳定
v0.4。完整 Swift lifecycle、类型化状态、Terminal callback 队列和 VT parser 改造
属于 Stage2。

Expand All @@ -39,7 +39,7 @@ v0.4。完整 Swift lifecycle、类型化状态、Terminal callback 队列和 VT
| [架构与生命周期](architecture.md) | runtime 怎样实现?ABI 1 与 wire v4 有什么区别? |
| [测试与验收](testing.md) | native、sanitizer、Swift/iOS 18、文档与供应链门禁各证明什么? |
| [故障排查](troubleshooting.md) | boot、链接、协议、输出、shutdown 或发布失败时从哪里查? |
| [发布事务](releasing.md) | 为什么维护源码合入后 manifest 仍是 `v0.4.0-abi.11`?何时变成 `v0.4.0-abi.12`? |
| [发布事务](releasing.md) | 为什么维护源码合入后 manifest 仍是 `v0.4.0-abi.12`?何时变成 `v0.4.0-abi.13`? |
| [变更日志](../CHANGELOG.md) | Stage1 的范围和兼容边界是什么? |

## 一页架构
Expand Down Expand Up @@ -85,7 +85,7 @@ Swift 对象不是另一套 runtime。它们包装 C handle;C 层管理线程
- JIT 单页写及显式 `invalidate_page` 按精确页过滤;仅多页哈希位图可能因碰撞保守多
失效。下一直链/RET 目标命中待处理代码脏页时才回到 dispatcher;纯数据写可继续直链。
- RootFS 不属于 package/release,禁止将其混入 Corresponding Source。
- 当前 `v0.4.0-abi.12` 源码变更不携带 RootFS 或预构建二进制;XCFramework 必须由
- 当前 `v0.4.0-abi.13` 源码变更不携带 RootFS 或预构建二进制;XCFramework 必须由
后续发布事务生成。

## 权威来源
Expand Down
Loading
Loading