You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] Interactive history expansion broken: !! and !$ do not reexecute/reuse (typed at prompt, no output; history file persistence itself works) #286
niubash interactive harness (tests/interactive.rs, worktree wt/interactive) findings — typed at a live prompt after a prior command: echo bang-target then !! times out with no reexecution output; echo got:$1 one-arg-style then !!/!$ reuse also nothing. Non-interactive history file persistence across sessions PASSES, alias-live and PS1 re-render PASS — the expansion-at-prompt path (history expansion during interactive read, histexp) is the broken piece. bashhist.c pre_process_comment/dbl_register... anchor: bashhist.c pre_process_line history expansion in the interactive reader. Repro harness: D:/repo/niubash-wt-interactive tests/interactive.rs (NIU_INTERACTIVE_TESTS=1 cargo test --test interactive history_bang).
lane wt8/interactive2 verification note (acceptance machine): commit b2f3d0da delivers the #286 API + tests, but the new test target script_driver_history_in_regressions is 7/8 — host_session_history_feeds_and_collects_script_expansions FAILS:
bash: !echo: event not found
panicked at 'expanded command output file: NotFound'
Repro: cargo test --test script_driver_history_in_regressions in the lane worktree (clean env, no HIST* vars set). The host-preloaded echo seedmark entry is not found by the !echo prefix lookup in run_history_group's session.expand path. Not cherry-picked to master; the lane needs a fix pass with the full test target green before recovery (lib tests 486/486 pass; only the new target is red).
Fixed and recovered via wt10/i2re (045b649b cherry-pick of the lane's API work + 6a856dfa): the public pre_process_interactive_line seam (bashhist.c:562 pre_process_line port, integrated like the GNU interactive reader) is on master, and the acceptance-blocking S1 test turned out to be its OWN preload bug — record(..., Some(0)) meant HISTSIZE=0, and SessionHistory::record stifle-clears under it exactly like GNU (variables.c:6066 sv_histsize -> history.c:675 stifle_history frees everything past max). The test now preloads unstifled with a sealed HISTFILE/HISTSIZE environment.
Full gates: 8/8 history regressions, 497 lib, 26 regression suite, niubash host_contract 42/42 (patch pointed at the lane tree during verification, restored after), strict -D warnings clean across all targets, WSL GNU Bash 5.3.0 byte-identical on an 8-line interactive session covering !string+redirect tail, !$, !!, failed !string/!N (event-not-found, no execution, no recording), and history recording the expanded text. Artifacts: target/issue-suites/results/i2re/
Activity
docs: queue prompts updated - interactive harness landed (f7a5b69), f…
caomengxuan666 commentedon Sep 28, 2026
lane wt8/interactive2 verification note (acceptance machine): commit b2f3d0da delivers the #286 API + tests, but the new test target
script_driver_history_in_regressionsis 7/8 —host_session_history_feeds_and_collects_script_expansionsFAILS:Repro:
cargo test --test script_driver_history_in_regressionsin the lane worktree (clean env, no HIST* vars set). The host-preloadedecho seedmarkentry is not found by the!echoprefix lookup in run_history_group's session.expand path. Not cherry-picked to master; the lane needs a fix pass with the full test target green before recovery (lib tests 486/486 pass; only the new target is red).interactive: host-facing pre_process_line for live history expansion (#…
history: fix S1 lane test preload — HISTSIZE=0 stifles the seed entry
caomengxuan666 commentedon Sep 28, 2026
Fixed and recovered via wt10/i2re (045b649b cherry-pick of the lane's API work + 6a856dfa): the public pre_process_interactive_line seam (bashhist.c:562 pre_process_line port, integrated like the GNU interactive reader) is on master, and the acceptance-blocking S1 test turned out to be its OWN preload bug — record(..., Some(0)) meant HISTSIZE=0, and SessionHistory::record stifle-clears under it exactly like GNU (variables.c:6066 sv_histsize -> history.c:675 stifle_history frees everything past max). The test now preloads unstifled with a sealed HISTFILE/HISTSIZE environment.
Full gates: 8/8 history regressions, 497 lib, 26 regression suite, niubash host_contract 42/42 (patch pointed at the lane tree during verification, restored after), strict -D warnings clean across all targets, WSL GNU Bash 5.3.0 byte-identical on an 8-line interactive session covering !string+redirect tail, !$, !!, failed !string/!N (event-not-found, no execution, no recording), and history recording the expanded text. Artifacts: target/issue-suites/results/i2re/