Repository navigation
WIP: feat(executor): Executor::bind_readline_variable host read probe (#2183) - #2185
Merged
Merged
Conversation
Refs #2183 niubash's REPL (niubash#704) reads the keyseq-timeout readline variable through shell.executor().bind_readline_variable(...), but the Executor had no such method: the registry getter BindRegistry::variable_value existed all along, with no host-facing probe beside bind_registry_snapshot / bind_registry_generation / bind_editing_mode. That absence is the single E0599 failing all eight of niubash#704's CI jobs. Add the probe delegating to variable_value (no new state, no caching), record it in the API ledger (header addendum, the SS2.2 retained-set row, the SS6 method entry), and pin it at lib level: bind 'set keyseq-timeout ...' reads back through the accessor, the fresh-registry default is 500, a changed value is reported, and an unknown name returns None.
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.
Refs #2183
What
Adds
Executor::bind_readline_variable(&self, name: &str) -> Option<String>, the host read probe niubash's REPL already calls in niubash#704:The method did not exist on the engine side — that absence is the single
E0599failing all eight of niubash#704's CI jobs (run 40998846835), and #704 blocks #710. The state and its getter were already here: the accessor is a thin delegation toBindRegistry::variable_value(src/shell/bind_registry.rs), reached through the sameshell_state.bind_registry.borrow()path as its sibling probesbind_registry_snapshot/bind_registry_generation/bind_editing_modeinsrc/executor/bind_builtins.rs. No new state, no caching, no side effects.Ledger
Recorded in
docs/api-ledger.md: header addendum, the §2.2 retained-set row (bind_readline_variable, 1 call), and the §6 entrymethod rubash::executor::Executor::bind_readline_variable. Tier: C, via the §4 executor seam, alongside the other bind-registry faces.scripts/check-api-ledger.pypasses (159 symbols present).Merge-order note (for the main session): the matching niubash-side ledger line goes in a separate niubash PR that the main session merges FIRST; this PR merges second. Until the niu mirror lands, the pairing job's same-source
cmpis expected to flag the one-line ledger delta; that is the staged-record flow, not a defect in this PR.Pins
Lib-level, in
src/executor/bind_builtins.rstests:issue2183_bind_readline_variable_reads_back_bind_set_value— fresh registry reads the GNU default (keyseq-timeout=500);bind 'set keyseq-timeout 250'through the engine's own bind path reads back250; a later set to125is what the accessor reports.issue2183_bind_readline_variable_unknown_name_is_none— a name outside the readline variable table returnsNone.Red on master by construction: the method does not exist at 786e121 (only
unbind_readline_variablescomment hits), so the pins cannot compile there — the same E0599 niubash#704's CI shows. Post-fix:cargo test --lib bind_builtins= 10 passed / 0 failed.Acceptance (verify-only, separate report in the cluster REPORT)
niubash
feat/bind-mode-toggle(PR #704 head) checked against this rubash tree via its[patch]sibling layout: see the cluster REPORT.md for whether the E0599 is gone and whether any further missing-engine-method errors surface behind it.