Repository navigation
WIP: 1.5.0 row 11 (niu half) — M-3 Tier C exits (bind surface + kill faces), M-4 pin to rubash#1893, --debug/--dap host wiring - #626
Conversation
…t wiring - Bind registry gated: new crates/niubash-runtime/src/ bind_surface.rs is the only file naming the engine's bind registry; it converts to host-owned mirror types under the new `internals` feature. Shell and REPL consume the surface only (staleness via Shell::engine_bindings_stale); with the feature off the host compiles and runs with zero Tier C references (cargo check -p niubash-runtime --no-default-features). - Kill hooks exited: ctrl_c.rs calls rubash::script_driver::inject_console_ctrl_c(); the background-wrapper handshake in main.rs calls rubash::script_driver::consume_background_wrapper_handshake. No builtins::kill references remain in the workspace. - M-4: pin -> rubash bdc1d78b (PR unixwin/rubash#1893 head; takes the merge commit at integration refresh, noted in the pin file); Cargo floors (root + runtime) now state rubash 1.4.3, equal to the pinned crate version. - Host wiring: run_shell_invocation dispatches --dap to rubash::run_dap_stdio and the script form of --debug to rubash::run_debug_cli before the normal route; other --debug forms keep the existing route. - refs unixwin/rubash#595, unixwin/rubash#497.
Mirrors unixwin/rubash#1893's ledger v2 commit; the pairing cmp keeps the two copies identical from here on.
|
Status at submission (paired-PR transient, expected): this PR's cross-check/cross-target jobs compile against rubash master, which does not yet carry the four engine faces this migration consumes ( Local verification against the paired row-11 rubash tree (this PR's pin): |
1.5.0 PLAN row 11, niubash half (S5 / M1). Companion to
unixwin/rubash#1893 (the rubash half). Draft — do not merge
ahead of #1893.
Pin (M-4)
scripts/release/rubash-pin.jsonnow pins rubashbdc1d78b002e5d76c960d98a1e0f658bef2d2cba — PR #1893's head
at this PR's submission. The pin takes #1893's merge
commit in the integration refresh after #1893 merges; the
pin file's own note says so, in the file's established style.
Cargo floors are real from this bump: root
Cargo.tomlandcrates/niubash-runtime/Cargo.tomlboth staterubash = "1.4.3", equal to the pinned crate version (theypreviously lagged at 1.4.1 / 1.3.4 while the lock already
carried 1.4.3). The API RFC §7.2's literal
version = "1.5"floor lands with row 13's version bump; thecrate is 1.4.3 until then and stating "1.5" now would break
the pairing build it is meant to protect.
M-3: Tier C exits the main path
crates/niubash-runtime/src/bind_surface.rsis the onlyfile in the workspace naming
rubash::shell::bind_registryor the executor's registry accessors. It converts to
host-owned mirror types (
EngineBindEntry/EngineBindKind) under the newinternalsfeature ofniubash-runtime (default-on in this change; the main binary
enables it explicitly by depending with default features).
grep -rn bind_registry crates/niubash-runtime/src src/hits exactly one file. With the feature off,
load_engine_bindingsreturns empty andengine_bindings_stalenever fires — the host runsdegraded-but-correct, and
cargo check -p niubash-runtime --no-default-featurescompiles with zero Tier C references(run in this change's verification; the compile is the
evidence).
(
crates/niubash-runtime/src/ctrl_c.rs) now callsrubash::script_driver::inject_console_ctrl_c(); thebackground-wrapper handshake in
src/main.rscallsrubash::script_driver::consume_background_wrapper_handshake().grep -rn "builtins::kill" crates src= 0 hits. Thepubdemotion of the old hooks lands in a rubash follow-uponce this PR is on master (pairing CI compiles master
against the new rubash tree, so the demotion cannot precede
this migration).
M-2: main path on sanctioned faces
The runtime's engine contact now runs through Tier A
(Session/Executor public surface) plus Tier B driver helpers;
the two remaining Tier C families are disposed of above
(bind registry gated behind
internalsin one module; killhooks exited).
docs/api-ledger.mdis byte-identical to therubash copy (ledger v2, mirrored in this PR; pairing
cmpenforces it from here on).
Item 9: host wiring for --debug / --dap
src/main.rs::run_shell_invocationnow dispatches on theregistered invocation flags before the normal route:
niu --dap script [args…]→rubash::run_dap_stdio(DapLaunchPreset { program, args })(the spelled-out host form's stdio endpoint);
niu --debug script [args…](script form, no-c, notinteractive) →
rubash::run_debug_cli(DebugCliPreset { … })— the engine opens the controlling terminal for the command
stream and refuses with the reason when there is none, per
the debugger design;
--debugform (-c, interactive) keeps theexisting route untouched (engine extdebug semantics).
End-to-end evidence with the real niu binary from this tree
is recorded in the cluster REPORT (DAP over stdio;
--debugunder a PTY).
Verification (local; CI is the merge gate)
cargo check --workspace✓;cargo check -p niubash-runtime --no-default-features✓ (feature-offproof);
cargo build --locked✓;cargo fmt --check -p niubash✓;sh scripts/check-rename-clean.sh✓ (metadataconfirms rubash 1.4.3).
cargo test -p niubash-runtime --lib --locked: failure setcompared name-by-name against the pristine pair
(master niubash + master rubash) on this machine — see the
cluster REPORT for the two sets. The scripted
cargo test --workspaceroute does not execute the runtimelib binary; that standing gap is unchanged and recorded.