Repository navigation
WIP: feat(api): publish the 1.5.0 Session API contract in-tree - #1986
Merged
Merged
Conversation
Tier A of the #595 design, published at rubash::api per the full-contract ruling for 1.5.0 (the workspace split stays post-release and moves the module unchanged): - Session/SessionBuilder: builder-time configuration and capability injection (history provider — the design's unchanged trait — external-command and elevation handlers, completion provider, diagnostic sink, RcPolicy), the run path (run/run_line/run_stdin/run_interactive_stdin) over the sanctioned driver seams, parse with owned tier-B syntax views, prepare_line, completion, prompt expansion, call_function, signal injection, startup sourcing, and the close() finish contract. - RunOutcome/Flow: exit and errexit are values, not process exits; exit_requested reaches the observer. - SessionEvents observer + diagnostics as values (Diagnostic/ParseFailure/SessionError, Q7 opaque wrapping). - State views (§5.3) and tier-B syntax views (Q4) republished through the module; Session is !Send/!Sync by construction (Q5, one session per thread). - script_driver::bind_terminal_size: the one-hop wrapper behind Session::notify_terminal_size; Executor gains variables_view/options_view one-hop constructors. - tests/session_api{,_interrupt}.rs: the external-consumer surface — only rubash::api + std — driving build/run/views/ events/completion/parse/history/startup/close end to end, plus the §6.4 trapped-signal boundary dispatch. Zero engine semantic changes: every face is a façade over an existing seam. Signal adjudication docs state the measured contract (traps dispatch at boundaries; untrapped non-interactive deliveries are kernel-adjudicated, #1662 DISCARD covers the interactive and idle cases). Refs #1978 Refs #595
…nsus missed - §6 records the debugger front doors (run_dap_stdio, run_debug_cli, DapLaunchPreset, DebugCliPreset), the builtins::bind spec-helper family, KEYMAP_NAMES, parser::Ast, and SessionHistory::size_limit — all consumed by niubash and verified against its master f34d6634 (77 distinct paths with use-list items); script_driver::run_script_with_history leaves the consumed surface (unreferenced in niubash). - check-api-ledger.py gains --niu: every rubash:: path the paired niubash tree consumes must be recorded (exact entry or module prefix); recorded-but-unconsumed item/variant entries warn only, method entries are exempt from the warning. Self-test covers both halves. - niu-canary pairing job runs the completeness check after the ledger cmp step. - §0/§2.1/§4 updated: v3 census basis + publication status — the Tier A homes are landed in-tree at rubash::api. Refs #1978 Refs #595
…unterparty now byte-identical)
…ipt_text) Same bytes as the niubash-side top-up PR (docs/api-ledger-topup-663); records the two script_driver faces niubash began consuming with PR #663 after ledger v3 froze, clearing the pairing completeness check on this PR. The same-source cmp against niubash master stays red until that top-up PR merges — expected intermediate state.
caomengxuan666
marked this pull request as ready for review
October 28, 2026 17:17
This was referenced Oct 28, 2026
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.
Publishes the rubash 1.5.0 Session API public contract in-tree at
rubash::api(full-contract ruling, step 1 of 2; step 2 is the niubash migration cluster, which lands separately).Scope: façade + publication only — zero engine semantic changes. Session/SessionBuilder over the existing driver seams, RunOutcome/Flow, the §5.3 state views and tier-B syntax views republished, capability traits (HistoryProvider unchanged per the finalized design), SessionEvents observer, diagnostics as values, !Send/!Sync by construction (Q5). External-consumer integration tests use only
rubash::api+ std.Ledger v3 rides along: the completeness half of the canary (
check-api-ledger.py --niu, wired into the pairing job) + the two consumed families the v2 census missed (debugger front doors, builtins::bind helpers) recorded in §6. NOTE: the niubash mirror copy of docs/api-ledger.md must be updated in the same release train or the pairing cmp step goes red — that update belongs to the migration step.Refs #1978
Refs #595