Skip to content

WIP: history list stays cleared after -c (#614) - #618

Merged
caomengxuan666 merged 4 commits into
masterfrom
fix/614-history-list-view
Oct 27, 2026
Merged

caomengxuan666 merged 4 commits into
masterfrom
fix/614-history-list-view

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Fixes #614

会话内 history 列表在 history -c 后复活已清行(列表面)。机制:-c 按 #182/#569 的口径不动文件、清行留待会话终写移除,但 reedline 的 sync/refresh 每次都把文件全量并回 reader,于是 -c 后任何一次追加触发的 refresh 都把清前行整表带回列表。

处置(按立案的代次/过滤方向):SessionLedger 增 view 代次——-c 记录清时 raw 列表长度为隐藏前缀,两个实例(provider/editor)在回答列表查询前应用最新代次、把前缀从视图中扣除;显式 -r/-n 重读与权威 replace 消费该代次(GNU -r 把文件读回列表、bash-it -c && -r 循环依赖于此)。文件面与 #569 的 ledger/sync 语义不动。

含 chore(pin):rubash pin 升至 0e9f8d45 + 根 Cargo.lock 刷新(stacker 入锁)。

门与证据随 REPORT 回填中。

Rubash master 0e9f8d45 rolls up the issue-clearance wave-1 merges
through rubash#1827 and rubash#1836; the latter's new stacker
dependency (plus psm) enters the root Cargo.lock with this bump.
-c emptied the reader, but the file deliberately keeps the cleared
lines until the session-end write (#569) and reedline's sync/refresh
merges the whole file back into the reader — so the first list query
after any later append resurrected the entire pre-clear list. GNU
lists only the post-clear lines.

Apply the filed clear-generation/filter direction in the session
ledger shared by the provider and editor instances: -c records the
raw list length at clear time as a hidden prefix and bumps the view
generation; list queries (search/count/load) apply the latest
generation and answer from the suffix past the prefix, with ids
re-based onto the view. An explicit re-read (-r/-n) or an
authoritative replace ends the hide (GNU -r loads the file back on
purpose; the bash-it -c && -r cycle depends on it), while the -a
accounting rebuild keeps it. The file face and the #569 ledger/sync
semantics are untouched: all internal flush/save paths still read
the raw reader directly.

Pins: three lib tests (resurrection grid over the twin instances,
dual-session interleave, -r restoration) and a pty suite asserting
the builtin's list through history > file redirects.
@caomengxuan666

Copy link
Copy Markdown
Member Author

集成证据(主会话合并裁定用)

  • build-and-test(Windows runner):lib 649 过 / 8 败,8 条逐名 = 已裁定 runner 环境集(6× plugins::sources + plugins::sync::sync_isolates_a_stalled_source... 的 git-not-found 族 + shell::tests::execute_line_syncs_cd_before_following_windows_child_command 的 RUNNER~1 短名形),与 WIP: niu history pollution fixes (#569 #570 #571 #572) #583 合并树 CI 的 646/8 逐名全等;多出的 3 过为本单新钉(lib 3 条),集外新红 0。全 run 92 个测试二进制 ok、仅 lib 一个 FAILED。本单 PTY 两钉在 runner 上实跑通过(cleared_lines_stay_cleared_in_the_session_list / reread_after_clear_restores_the_list 均 ok)。
  • 本地门(构建槽、JOBS=1、净化 env,日志+ .done 在簇内):build rc=0;lib history 过滤 37 过 / 1 败——唯一败 session_end_write_appends_missing_entries_without_duplicates 为已裁定的 uid-0 只读伪影(root 绕 DAC,第一腿断言同形;WIP: niu history pollution fixes (#569 #570 #571 #572) #583 集成报告 §4 在案),本地口径以此为准、该钉以 CI 为据(runner 上 ok);pty issue614 2/2、issue569/570/571 三套件全过、issue182 互锁套件过;clippy -p niubash-runtime --all-targets -D warnings rc=0;改动文件 rustfmt + CR=0。
  • 唯一集外红:cross-target-check (aarch64-unknown-linux-ohos)——归因不在 [history] 会话内 history 列表在 -c 后复活已清行(列表面;文件面已随 #569 修复) #614 代码、也不在本 PR 的 pin 动作本身:master 自身的 scheduled run(40478648688 @4e3e6b0c)该 job 已红,但红在 lock 漂移(--locked 拒绝,编译前退出——CI 的 rubash 检出取 master HEAD,已含 stacker,而 master 的 niu 锁未刷新)。本 PR 把锁刷新后该 job 越过 lock 步,改红在 psm 0.1.32 的 aarch64 汇编被 ohos 汇编器拒绝——即 rubash #1836 的 stacker 依赖不支持 aarch64-unknown-linux-ohos 目标,属 rubash 线待处置(stacker 需按目标收门或在不支持目标上给 no-op 回退);本簇按纪律只记 REPORT、不越界修 rubash。同形状红也会出现在任何 pin 越过 #1836 的 niu PR(如 WIP: host signal family — REPL SIGINT discard classification, prompt $? and ^C echo (#610 #611 #600) #615 集成)上。

…t-view

# Conflicts:
#	scripts/release/rubash-pin.json
Integration refresh riding the niubash#618 merge-up onto niubash master d7dcce5 (after #615). Rolls up rubash#1848 (unused-parens lint fix), rubash#1850 (#1807/#1832 exec seams), rubash#1855 (stacker target gating - unbreaks the aarch64-unknown-linux-ohos cross-target check) and rubash#1857 (#1852/#1854).

Root Cargo.lock refreshed against the new pin and verified byte-identical (no dependency-set change in this range: #1855 only re-gates stacker by target expression); cargo check --workspace --locked rc=0 in the build slot.
@caomengxuan666

Copy link
Copy Markdown
Member Author

集成接棒证据(2026-10-27,主会话派单)

集成结果:merge niu master d7dcce57(#615 合并后)→ merge commit 818dea1,普通 push 快进至 04ddcc6,PR 已转 MERGEABLE。唯一文本冲突 = scripts/release/rubash-pin.json 的 rev 行,按分支侧解后由 chore(pin) 统一升版。

双边保全(逐行核):

pin:独立 commit 04ddcc6 升 rubash pin 至 rubash master 252ff19e(含 #1848 括号 lint、#1850、#1855 stacker 目标门控、#1857);根 Cargo.lock 刷新后逐字节无变化(该区间无依赖集变化),槽内 cargo check --workspace --locked rc=0 复验。

本地门(构建槽/JOBS=1/净化 env):build rc=0;issue614 PTY 两钉、issue569/570/571、issue182、tests/interactive 全 rc=0;lib 全量 591 过 / 21 败,失败集与 pristine master d7dcce5 同命令实跑(588/21)逐名全等——21 条全为先存 Linux 环境族(paste-chunk 计时、winuxcmd Windows 路径语义、shell 两条、plugins git 探针等),合并与 #614 零引入;+3 过 = 本单新钉。

CI(run 40491701924):cross-check 双平台、全部 cross-target(含 ohos 过——rubash #1855 门控坐实)、API ledger 全绿;build-and-test lib 649 过 / 8 败,8 条与已裁定 runner 环境集逐名全等(7× plugins git must be available: program not found + 1× shell::tests::execute_line_syncs_cd_before_following_windows_child_command 8.3 短名)。按裁定口径 = 绿。未自合,待主会话合并。

@caomengxuan666
caomengxuan666 marked this pull request as ready for review October 27, 2026 10:59
@caomengxuan666
caomengxuan666 merged commit 87a3b70 into master Oct 27, 2026
9 of 10 checks passed
caomengxuan666 added a commit that referenced this pull request Oct 27, 2026
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]>
@caomengxuan666
caomengxuan666 deleted the fix/614-history-list-view branch October 30, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[history] 会话内 history 列表在 -c 后复活已清行(列表面;文件面已随 #569 修复)

1 participant