Repository navigation
WIP: test(history): re-verify #2006/#2007 — session faces GNU-true; provider faces pinned as ignored GNU assertions (contract gap) - #2021
Merged
Conversation
… provider path ignored on a contract gap Re-verification of niubash#670 D2 on master 16a42d7, both engine consumption paths driven against the GNU bash 5.3.20 oracle: - Session path (standalone binary, pipe-driven -i): fc -l lists the two prior commands and excludes the fc line itself, matching GNU (builtins/fc.def:334-335 last_hist = i - rh - hist_last_line_added). Pin is live. - Provider path (host HistoryProvider, the niubash REPL shape; the host records the submitted line before the engine executes it, as bashhist.c does): fc -l prints the fc line itself as entry 3. The executor's provider call site hard-codes last_line_added=false and remember_on_history=false, and the HistoryProvider contract carries no channel for either fact, so the GNU range cannot be computed. Pin carries the GNU assertion under #[ignore] pending the contract adjudication recorded in #2006. Refs #2006
…th GNU-true, provider path ignored on a contract gap Re-verification of niubash#670 D3 on master 16a42d7 against the GNU bash 5.3.20 oracle (HISTSIZE=3, echo h1..h4, history): - Session path: the display shows the global numbers 4, 5, 6 — SessionHistory::stifle advances history_base as entries drop (lib/readline/history.c stifle_history) and history_exec prints base + index. Both the trimmed and the plain numbering pins are live. - Provider path: the display renumbers the stifled tail from 1. builtins/history.rs numbers the provider's bare entry strings from 1 because the HistoryProvider contract carries no history_base channel. Pin carries the GNU assertion (4, 5, 6) under #[ignore] pending the contract adjudication in #2007. Refs #2007
caomengxuan666
marked this pull request as ready for review
October 29, 2026 01:30
This was referenced Oct 29, 2026
Closed
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.
What this is
Re-verification of the two niubash#670 audit shapes on current master (16a42d7), driven through BOTH engine history-consumption paths against the GNU bash 5.3.20 oracle with identical input lines. Tests only — no product code changes. Full adjudication in the cluster REPORT (workspace fix-history-batch/REPORT.md).
#2006 — fc -l lists the fc command itself
-i): CORRECT.fc -lafter two commands lists entries 1,2 and excludes itself — the engine's SessionHistory path computes GNU's range (builtins/fc.def:334-335,last_hist = i - rh - hist_last_line_added). Live pin:session_path_fc_list_excludes_itself.last_line_added=false, remember_on_history=false, sofc -lprints the fc line itself as entry 3 (verified output:1 echo alpha / 2 echo beta / 3 fc -l).#2007 — history numbering resets after HISTSIZE trimming
HISTSIZE=3+ four commands +historyshows the global numbers 4, 5, 6 —SessionHistory::stifleadvanceshistory_base(lib/readline/history.c stifle_history) and the session display prints base + index. Live pins:session_path_history_numbering_survives_histsize_trim,session_path_history_plain_numbering.1 echo h3 / 2 echo h4 / 3 history): builtins/history.rs numbers the provider's bare entry strings from 1, and the HistoryProvider contract carries no history_base channel.Why no engine fix in this PR
Both divergences reduce to state the
HistoryProvidercontract does not carry — for fc, whether the host recorded the in-flight line (hist_last_line_added); for the display,history_base. The contract was deliberately re-exported unchanged in the 1.5.0 Session API, so extending it is a contract adjudication (same class as #2001), not a cluster-level fix; host-side workarounds would corrupt faces the host owns (the store must remain the true list for its file/ledger accounting). The two provider pins therefore carry the GNU assertions under#[ignore]with the gap named inline, ready to un-ignore when the contract lands a channel.Gates
cargo test --test issue2006_2007_history_faces→ 3 passed, 2 ignored.cargo check --test issue2006_2007_history_faceswith-D warnings→ clean. rustfmt clean, CR=0.Refs #2006
Refs #2007